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

RESOLVED FIXED in Firefox 67

Status

defect
P3
normal
RESOLVED FIXED
7 months ago
5 months ago

People

(Reporter: rob, Assigned: mixedpuppy)

Tracking

(Blocks 1 bug)

63 Branch
mozilla67
Dependency tree / graph
Bug Flags:
qe-verify -

Firefox Tracking Flags

(firefox67 fixed)

Details

Attachments

(3 attachments)

Posted 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.
Posted 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 months 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 months ago5 months 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.