Closed Bug 1559216 Opened 3 months ago Closed 2 months ago

Missing host permission for the tab for tabs.execute inside tabs.duplicate

Categories

(WebExtensions :: General, defect, P2)

Firefox 68
defect

Tracking

(firefox-esr60 unaffected, firefox-esr68 verified, firefox68 wontfix, firefox69 verified, firefox70 verified)

VERIFIED FIXED
mozilla70
Tracking Status
firefox-esr60 --- unaffected
firefox-esr68 --- verified
firefox68 --- wontfix
firefox69 --- verified
firefox70 --- verified

People

(Reporter: micha.postbox, Assigned: robwu)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:52.0) Gecko/20100101 Firefox/52.0

Steps to reproduce:

Installed Fx 68b5 and used tabs.execute() inside tabs.dublicate() in webextension.
The Tab Id is visible inside the then(), but it looks like this is a timing problem. Maybe the promise is resolved to early. This was definitely working with Firefox 67.

SetTimeout() with 200ms fix this.

Actual results:

Error: Missing host permission for the tab undefined

Expected results:

No error message

install testcase
go to google.com
click somewhere on the page - tab will dublicated but tabs.execute did not work
check console out put for error message

The priority flag is not set for this bug.
:ddurst, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(ddurst)
Summary: Missing host permission for the tab for tabs.execute inside tabs.dublicate → Missing host permission for the tab for tabs.execute inside tabs.duplicate
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(ddurst) → needinfo?(rob)

This is a regression by bug 1394376. Starting from that bug, the browser.tabs.duplicate API resolves as soon as the tab has loaded.

We need to wait for tabs that are in the progress of being restored, like we did for tabs.create in bug 1301862.

Flags: needinfo?(rob)
Regressed by: 1394376
See Also: → 1301862
Assignee: nobody → rob
Status: NEW → ASSIGNED

The priority flag is not set for this bug.
:jimm, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(jmathies)
Flags: needinfo?(jmathies)
Priority: -- → P2
Pushed by rob@robwu.nl:
https://hg.mozilla.org/integration/autoland/rev/c92c9bfb7976
Let tabs API wait until tab has been restored r=zombie
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70

Please nominate this for Beta and ESR68 approval when you get a chance.

Flags: qe-verify+
Flags: needinfo?(rob)
Flags: in-testsuite+

Comment on attachment 9076650 [details]
Bug 1559216 - Let tabs API wait until tab has been restored

Beta/Release Uplift Approval Request

  • User impact if declined: Extensions that use some tabs APIs after tabs.duplicate may function incorrectly.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Simple change that relies on the event that was used before the regression was introduced.
  • String changes made/needed: none

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration: Recent regression in Firefox 68 that breaks some extensions.
  • User impact if declined: Extensions that use some tabs APIs after tabs.duplicate may function incorrectly.
  • Fix Landed on Version: 70, pending uplift to 69
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Simple change that relies on the event that was used before the regression was introduced.
  • String or UUID changes made by this patch: none
Flags: needinfo?(rob)
Attachment #9076650 - Flags: approval-mozilla-esr68?
Attachment #9076650 - Flags: approval-mozilla-beta?

Comment on attachment 9076650 [details]
Bug 1559216 - Let tabs API wait until tab has been restored

Fixes a WebExtensions regression in 68 which can cause some addons to not function correctly. Approved for 69.0b9 and 68.1esr.

Attachment #9076650 - Flags: approval-mozilla-esr68?
Attachment #9076650 - Flags: approval-mozilla-esr68+
Attachment #9076650 - Flags: approval-mozilla-beta?
Attachment #9076650 - Flags: approval-mozilla-beta+
QA Whiteboard: [qa-triaged]

Verified as fixed using FF 70.0a1 (2019-07-29) , FF 69.0b8 and 68.1.0esr . No "Error: Missing host permission for the tab -> undefined" displayed anymore.

I was also able to reproduce the initial issue in FF 68.0b5.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.