Closed Bug 1383064 Opened 7 years ago Closed 7 years ago

uBlock Origin webext-hybrid extension failed to install first time, succeed second time


(WebExtensions :: General, defect)

56 Branch
Not set


(Not tracked)



(Reporter: u287251, Unassigned)



(Keywords: regression)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:56.0) Gecko/20100101 Firefox/56.0
Build ID: 20170721100159

Steps to reproduce:

I can reproduce systematically with these repro steps + Nightly 56.0a1 (2017-07-21).

1. uninstall uBO through about:addons
2. quit the browser
3. restart the browser
4. install uBO/webext on AMO:

Result: uBO is broken, not functional -- though it appears as enabled in about:addons

5. Install again (on top of the broken installation) from AMO as in step 4

Result: uBO is now fully functional

At step 4, this error was reported in the browser console:	ERROR	Loading extension '': Reading manifest: Background page must be a file within the extension  Log.jsm:752
	App_append resource://gre/modules/Log.jsm:752:9
	log resource://gre/modules/Log.jsm:390:7
	error resource://gre/modules/Log.jsm:398:5
	_logMessage resource://gre/modules/Extension.jsm:373:5
	logError resource://gre/modules/Extension.jsm:369:5
	packagingError resource://gre/modules/Extension.jsm:356:5
	manifestError resource://gre/modules/Extension.jsm:346:5
	BackgroundPage chrome://extensions/content/ext-backgroundPage.js:31:7
	onManifestEntry chrome://extensions/content/ext-backgroundPage.js:68:19
	asyncEmitManifestEntry resource://gre/modules/ExtensionCommon.jsm:920:14
	next self-hosted:1183:9

Note that restarting Nightly after step 4 did not resolve the issue, uBO was still broken regardless.

I put a breakpoint at chrome://extensions/content/ext-backgroundPage.js:31 and stepped into the code, and the test for whether the two `moz-extension://...` URLs are same origin failed at line 912 of resource://modules/Extension.jsm, they were both different extension ids.
Another very important point I should have mentioned above (I didn't want to lose the entered information before confirming one last time as this required a restart of the browser):

The issue does NOT occur when trying to reproduce in a new profile, I can only reproduce it in my own profile, where a previous version of uBlock Origin had already be installed.

A number of other users have reported this. This was first reported on my issue tracker[1], but I have seen other people reporting this issue on reddit[2].

I will further try to figure repro steps which work from a fresh profile.



Ok, here is how to repro starting from a fresh profile:

1. Launch Nightly with a brand new profile
2. install dev build of uBO/webext:

Result: uBO installed fine and is fully functional.

3. uninstall uBO through about:addons
4. quit the browser
5. restart the browser (with the profile created in step 1.)
6. install again dev build of uBO/webext as in step 2.

Result: uBO is broken, not functional -- though it appears as enabled in about:addons

7. Install again (on top of the broken installation, without quitting the browser) as in step 2.

Result: uBO is now fully functional

Without step 7, the extension will be permanently in a broken state, it still is broken after a browser restart.
Component: Untriaged → WebExtensions: General
Product: Firefox → Toolkit
Severity: normal → major
Has STR: --- → yes
Ever confirmed: true
Keywords: regression
OS: Unspecified → All
Hardware: Unspecified → All
aswan does this sound like it might be something in the add-ons manager?
Component: WebExtensions: General → Add-ons Manager
Flags: needinfo?(aswan)
This appears to be basically the same thing that affected Screenshots that led to bug 1372750.
In addition to fixing that bug, the hybrid uBlock Origin needs to forward the reason argument that gets passed to the bootstrap startup() method into the startup() method on the embedded webextension.
Component: Add-ons Manager → WebExtensions: General
Depends on: 1372750
Flags: needinfo?(aswan)
Closed: 7 years ago
Resolution: --- → DUPLICATE
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.