Closed Bug 1512353 Opened 6 years ago Closed 5 years ago

"nativeTab is null" when using browser.tabs.move to move regular tab to incognito window

Categories

(WebExtensions :: Frontend, defect, P3)

63 Branch
defect

Tracking

(firefox67 fixed)

RESOLVED FIXED
mozilla67
Tracking Status
firefox67 --- fixed

People

(Reporter: rob, Assigned: mixedpuppy)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

Attached file background.js
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:63.0) Gecko/20100101 Firefox/63.0

Steps to reproduce:

  * Set up test WebExtension to move tabs in a regular (non-incognito) window to an incognito one (manifest and background JS attached) - run via web-ext
  * Open the browser console 
  * Open an incognito window
  * Right click on the tab in the non-incognito window (which we'll call tab A)
  * Under the "Incognito Move Window Test" menu, click the "Move Tab to Incognito Window" action


Actual results:

  * The return value from browser.tabs.move returns a non-empty array, implying that tab A was successfully moved
  * A new, empty tab (which we'll call tab B) is added to the incognito window, alongside the tab that was there when the window was created (which we'll call tab C)
  * Repeating the "Incognito Move Window Test" action on tab A moves B to the right-most position in the incognito window, implying that tab B is somehow bound to the menu associated with tab A
  * If you close tab B and activate the "Get Tab Data" action on tab A, you'll see console output referring to information associated with tab B, and browser.tabs.get will be unable to resolve the tab ID supplied to the menu onClick event listener.


Expected results:

I would expect browser.tabs.move to ignore moving tabs between regular and non-incognito windows entirely, and for the return value of browser.tabs.move to omit any such tabs.
Attached file manifest.json
Component: Untriaged → Tabbed Browser
Component: Tabbed Browser → Frontend
Product: Firefox → WebExtensions
NI Shane to see if this is covered in the upcoming private browsing work
Flags: needinfo?(mixedpuppy)
Priority: -- → P3
maybe addressed in bug 1345474, I'll look later.
See Also: → 1345474

As of 67, I get an error "nativeTab is null"[1], however since that changes when we turn on the incognito support, I'm going to close this. You cannot move a non-private tab to a private window.

[1] https://searchfox.org/mozilla-central/rev/6e3cc153566f5f288ae768a2172385b8436d61dd/browser/components/extensions/parent/ext-tabs.js#918

Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Flags: needinfo?(mixedpuppy)
Resolution: --- → WORKSFORME

On second thought, the error in comment 4 does need to be addressed.

I suspect the incognito work changed the prior behavior, but we actually want something better than an internal error.

Assignee: nobody → mixedpuppy
Status: RESOLVED → REOPENED
Ever confirmed: true
Resolution: WORKSFORME → ---
Summary: Unusual behavior when using browser.tabs.move to move regular tab to incognito window → "nativeTab is null" when using browser.tabs.move to move regular tab to incognito window
Pushed by scaraveo@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e42ba4e47d65
skip moving windows between pb and non-pb windows r=zombie
Status: REOPENED → RESOLVED
Closed: 6 years ago5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
Flags: qe-verify-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: