Closed Bug 1397196 Opened 2 years ago Closed 2 years ago

The browser_action not open the frame

Categories

(WebExtensions :: Frontend, defect, P1)

defect

Tracking

(firefox-esr52 unaffected, firefox55 unaffected, firefox56 unaffected, firefox57 verified, firefox58 verified)

VERIFIED FIXED
mozilla57
Tracking Status
firefox-esr52 --- unaffected
firefox55 --- unaffected
firefox56 --- unaffected
firefox57 --- verified
firefox58 --- verified

People

(Reporter: mte90net, Assigned: rpl)

References

Details

(Keywords: nightly-community, regression)

Attachments

(2 files)

Seems that few users on Firefon Nightly with the latest version of Share Backported 1.0.2 (https://addons.mozilla.org/it/firefox/addon/share-backported/#) have problems on clicking the icon.
It is not showing anything on Linux and other say that the frame opened is blank.

If I debug that extension when I click on the icon I get:
[Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIWebNavigation.loadURIWithOptions]"  nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)"  location: "JS frame :: chrome://global/content/bindings/browser.xml :: loadURIWithFlags/< :: line 150"  data: no]

As you can see the extension is working on Firefox Dev Edition (the code contain also the page_action stuff but is not working in any case).
The code of the extension is on GitHub: https://github.com/Mte90/Share-Backported
mozregression --good 2017-07-20
Last good revision: 401492c55ab4bb9a686d3eb175b00c77fa67f088
First bad revision: c8a7319bea7b3ad50d7490bac8c874e231a49c72
Pushlog:
https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=401492c55ab4bb9a686d3eb175b00c77fa67f088&tochange=c8a7319bea7b3ad50d7490bac8c874e231a49c72

Kris, it seems this regression is caused by one of the bugs you fixed in this pushlog, could you have a look please? Thanks
Flags: needinfo?(kmaglione+bmo)
Keywords: regression
This issue seems to be related to the changes related to both:

- Bug 1329242 which added the ability to specify theme-based icons for browserActions
- Bug 1391472 which introduced the caching of the extension icons data 

The extension linked in Comment 0:

- contains both a pageAction and a browserAction, and even if the pageAction is never actually showed, both the pageAction and browserAction manifest entries are processed when the addon is starting up

  http://searchfox.org/mozilla-central/rev/4d8e389498a08668cce9ebf6232cc96be178c3e4/toolkit/components/extensions/ExtensionParent.jsm#1309-1313

- the browserAction specify the theme-based icons, which are not currently supported for the pageAction icon, nevertheless the icon cache is shared (it is based on the icon url), and so the getIconData helper method from the pageAction API implementation is receiving an object (`{default: "...", dark: "...", light: "..."}`) instead of the string and it raises an `str.replace is not a function` exception:

  http://searchfox.org/mozilla-central/rev/4d8e389498a08668cce9ebf6232cc96be178c3e4/toolkit/components/extensions/ExtensionParent.jsm#1250-1257

  http://searchfox.org/mozilla-central/rev/4d8e389498a08668cce9ebf6232cc96be178c3e4/browser/components/extensions/ext-pageAction.js#154

I'm going to attach a patch to fix the underlying issue, in the meantime (as a workaround) the reporter should remove the unused pageAction from the extension manifest, which should be enough to fix the issue for the Nightly users.
Flags: needinfo?(kmaglione+bmo)
Attachment #8904976 - Flags: review?(mixedpuppy)
Assignee: nobody → lgreco
Status: NEW → ASSIGNED
Priority: -- → P1
Confirmed that removing page_action is working my extension :-)
Assignee: lgreco → nobody
Status: ASSIGNED → NEW
Priority: P1 → --
Ops I changed the values (I cannot change the priority label)
Assignee: nobody → lgreco
Status: NEW → ASSIGNED
nevermind...
Priority: -- → P1
Comment on attachment 8904976 [details]
Bug 1397196 - Fix pageAction icon loading when an extension has a cached browserAction theme-based icon.

https://reviewboard.mozilla.org/r/176816/#review182048

waiting on test
Attachment #8904976 - Flags: review?(mixedpuppy)
See Also: → 1398156
Comment on attachment 8904976 [details]
Bug 1397196 - Fix pageAction icon loading when an extension has a cached browserAction theme-based icon.

https://reviewboard.mozilla.org/r/176816/#review183512

::: browser/components/extensions/test/browser/browser_ext_browserAction_pageAction_icon.js:307
(Diff revision 2)
> +// and so this test extension manifest has a browser action which specify
> +// a theme based icon and a pageAction, both the pageAction and the browserAction
> +// have a common default_icon.
> +//
> +// Once Bug 1398156 will be fixed, this test should be converted into testing that
> +// the browserAction and pageAction themed icons can be specified in the same extension

as well as sidebar
Attachment #8904976 - Flags: review?(mixedpuppy) → review+
Can we land this fix?
Flags: needinfo?(lgreco)
yeah, I'm going to update the inline comment in the patch and push it to mozreview in a couple of minutes, and then I'm going to push it to autoland soon.
Flags: needinfo?(lgreco)
Pushed by luca.greco@alcacoop.it:
https://hg.mozilla.org/integration/autoland/rev/39b0e0aead7b
Fix pageAction icon loading when an extension has a cached browserAction theme-based icon. r=mixedpuppy
https://hg.mozilla.org/mozilla-central/rev/39b0e0aead7b
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
Attached file 1397196.zip
I can reproduce this issue on Firefox 57.0a1 (20170906100107) under Wind 7 64-bit.

The pop-up is not working and the error message described in description is displayed in the browser console.

This issue is verified as fixed on Firefox 59.0a1(20171113100232), Firefox 58.0b2 Dev Edition (20171109154410) and Firefox 57.0 RC build 4 (20171112125346) under Wind 7 64-bit and Mac OS X 10.13. 

Please see the attached videos.
Status: RESOLVED → VERIFIED
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.