Closed Bug 1624935 Opened 5 years ago Closed 5 years ago

Cannot install extension after reverting to earlier version

Categories

(WebExtensions :: General, defect)

76 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: therubex, Unassigned)

Details

Cannot (locally) install extension after reverting to earlier version of the same extension.

*I don't know if this only applies to locally, or online also?

New Profile

Download & have on hand a few versions of an extension
say, uBlock Origin:

https://addons.mozilla.org/firefox/downloads/file/3521827/ublock_origin-1.25.2-an+fx.xpi, current
https://addons.mozilla.org/firefox/downloads/file/3509800/ublock_origin-1.25.0-an+fx.xpi, an older version
https://addons.mozilla.org/firefox/downloads/file/3448596/ublock_origin-1.24.0-an+fx.xpi, and older yet again

Drag 1.25.2 into a browser window to install
Add -> Okay, Got It!

Result:

uBlock0@raymondhill.net.xpi, 1.25.2 is installed into /extensions/

Check Addons Manager, verify the extension is installed, & confirm it is at the expected version, 1.25.2.

Downgrade to 1.24.0.

Drag 1.24.0 into a browser window to install
Add -> Okay, Got It!

Result:

uBlock0@raymondhill.net.xpi, 1.24.0 is installed into /extensions/

Check Addons Manager, verify the extension is installed, & confirm it is at the expected version, 1.24.0.

Now, try again to update to 1.25.2.

Drag 1.25.2 into a browser window to install
Add

Note that Add is accepted, but there is no, Okay, Got It!

uBlock0@raymondhill.net.xpi, is installed into /extensions/
but it is still the older version 1.24.0 not 1.25.2

Check Addons Manager, verify the extension is installed, & confirm it is at the expected version, 1.25.2.
It is not. It is still version 1.24.0.

Check /extensions/ directory.
You will find 1.25.2 "stuck" in the /staged/ subdirectory.

At that point, in order to get uBlock to be able to update - again - to a later version, you must first Remove it altogether.

Going from a newer to older versions of an extension seems to work.
Going from a newer to older, back to newer fails.

uBlock Origin uses an onUpdateAvailable listener to defer upgrades, but it appears to allow downgrades to apply immediately:
https://github.com/gorhill/uBlock/blob/3621792f1635e933667b12cc7c830020fb1c81c0/src/js/start.js#L381-L389

I think this is working as intended, uBO deliberately delays the application of the upgrade until the browser is restarted. If you restart, the new session should have the updated version.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.