Closed Bug 1490260 Opened 6 years ago Closed 6 years ago

Extension pages get broken browser/chrome objects if loaded during extension startup

Categories

(WebExtensions :: General, defect, P2)

62 Branch
defect

Tracking

(firefox62 affected, firefox63 affected, firefox64 affected)

RESOLVED DUPLICATE of bug 1518863
Tracking Status
firefox62 --- affected
firefox63 --- affected
firefox64 --- affected

People

(Reporter: thomas.werner, Assigned: aswan)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Attached image Screen Shot 2018-09-11 at 13.13.34.png (deleted) —
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.81 Safari/537.36 Steps to reproduce: 1) install add-on with "chrome_settings_overrides": { "homepage": "anyfile.html" } in manifest.json, for example NelliTab: https://addons.mozilla.org/en-US/firefox/addon/nellitab/ 2) close Firefox 3) open Firefox Actual results: Startup shows an empty page (about:blank?). There is no HTML, that i can assume that the extension is not loaded and not the trouble maker. I already deleted my Profile and tried with new and unsynced profile, but does net help, same result. Expected results: Showing homepage defined by extension on startup.
For me this affects also the scenario when add-on page is set as homepage manually using the add-on page URL. This bug occurs also when you set your Firefox to "Restore previous session" and the add-on page was last focused.
Strange on Ubuntu 18.04, NelliTab installed and no other extensions, Homepage button shows default homepage/new tab page, but not NelliTab, only on new tab the extension is loaded. Btw. why so complicated? Why there is no option like "Homepage = New Tab page" as in Chrome, this would make everything easier, for developers and for users, but of course, if its working. ;-)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko/20100101 Firefox/64.0 (20180913100107) I have tested this report on Windows 10 and OSX 10.12 using the latest Nightly, Beta and Fx release builds. I was able to reproduce the mentioned behavior using the provided test case. Once the addon is enabled and Firefox is closed and reopened, the startup page is empty as stated in the report. However, I can reproduce this only the first time after the addon is installed. After the second closing and starting Firefox, the expected tab set by the addon is displayed. Thomas, are you experiencing a blank page every time when you start Firefox?
Status: UNCONFIRMED → NEW
Component: Untriaged → Tabbed Browser
Ever confirmed: true
Flags: needinfo?(thomas.werner)
Yes, every time when I start Firefox.
Flags: needinfo?(thomas.werner)
Component: Tabbed Browser → Untriaged
Product: Firefox → WebExtensions
Priority: -- → P2
If you have trouble reproducing this, use multi-homepage feature, then it happens 100% times. See this duplicate bug for video demonstration: https://bugzilla.mozilla.org/show_bug.cgi?id=1490919 Also users of my add-on are now reporting issues with blank homepage almost every day :(
This is something that's affected me as well that's needed unnecessary workarounds. Out of interest, my workaround : https://discourse.mozilla.org/t/homepage-override-unexpected-behavior/32083/5
I confirm this bug. Noticed this: * It happens also when setting the WebExtension URL using the preferences UI * Sometimes it happens only at the first run - closing FF and reopening sometimes open correctly the extension as homepage * Pressing the HOME button it loads the extension correctly (even immediately after startup with blank page) Additional consideration, not related to the bug: FF is missing an simple extra radiobutton "( o ) Same as new tab" on the Homepage options.
I have the same problem in Firefox 62.0.3 Windows 10 64 bit.
Clarified the title a bit. I believe the issue here is that the WebExtensionPolicy for an extension is created asynchronously during startup, and if an extension page is loaded before it is there, we don't know what permissions etc the extension has. I haven't examined this in depth but something needs to wait for the policy object to be created. The actual getters for browser/chrome and properties beneath them are all synchronous so maybe this would be easiest to handle inside the moz-extension protocol handler.
Summary: Add-on page is not loaded on startup if add-on is set as homepage in manifest.json → Extension pages get broken browser/chrome objects if loaded during extension startup
While working on a workaround for my add-on I noticed two interesting things (that could help). If the add-on page is incorrectly loaded, then: 1) the `tab.title` is set to add-on UUID - for exapmle "4c379c6d-1646-408e-adcf-53873bbcb76d/dial.html" 2) or the `tab.isArticle` property is missing or is set to `undefined` (all other properties are identical, comparing with correctly loaded add-on page) Other than that, it's really mess - the add-on page can have blank HTML (with only html and body element), or with HTML but without JavaScript or it can be just about:blank page.
Component: Untriaged → General
I'm not sure if it's just me, but seems like in new Firefox Beta 65 and Nightly 66 this bug got worse. While in 64 and lower this used to happen only sometimes, now in 65+ it happens every time. 10 out of 10 times I get blank New Tab page when opening new Firefox. Very sad :(
Attached image Bug1490260.png (deleted) —
Using the steps from Description: On Firefox 64.0(20181206201918) - Mac OS 10.13.6 - This issue is reproducing every time when opening the browser, using a new profile. (No permission pop-up is displayed). - Win 7 64-bit - This issue is reproducing only at the first run because, at the second run and up, the permission pop-up is displayed. - Ubuntu 18.04 64-bit - This issue is reproducing only at the first run because, at the second run and up, the permission pop-up is displayed. On Firefox 65.0b4(20181211223337) under Win 7 64-bit, Mac OS 10.13.6 - This issue is reproducing every time when opening the browser, using a new profile. (No permission pop-up is displayed). On Firefox 66.0a1(20181212215507) under Win 7 64-bit, Mac OS 10.13.6 - This issue is reproducing every time when opening the browser, using a new profile. (No permission pop-up is displayed). Extensions: https://addons.mozilla.org/en-US/firefox/addon/nellitab/ https://addons.mozilla.org/en-US/firefox/addon/new-tab-override/ I can confirm the comment14 for FF65 and FF66, now I reproduce the bug every time I open the browser.
Assignee: nobody → aswan
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: