Closed Bug 780690 Opened 12 years ago Closed 12 years ago

Restartless add-ons stop functioning after Windows' Restart

Categories

(Toolkit :: Add-ons Manager, defect)

12 Branch
x86_64
Windows 7
defect
Not set
major

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: jordimueters, Unassigned)

References

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20100101 Firefox/14.0.1
Build ID: 20120713134347

Steps to reproduce:

I installed a few restartless add-ons, just like any normal user could do. The extensions themselves are functioning perfectly.


Actual results:

The moment I restart Windows (or a fresh boot), all restartless add-ons stop functioning. In about:addons the add-ons show up as "enabled", though, the config page of the add-on is totally blank. 

The moment I manually disable and re-enable the add-on again, the add-on starts functioning again.

In the error console (while the problem is occuring) it keeps stating that the extension in question has been moved (even though it has not. It shows 2 identical paths (from, to locations)).

After a small discussion on the Adblock Plus fora, a work-a-round has been found:
You need to update the "last changed" timestamp of the extension before starting Firefox (the moment the problem would occur) and it will load fine.


Expected results:

Restartless add-ons should get bootstrapped by addons.xpi.
Severity: normal → major
Component: Untriaged → General
Priority: -- → P3
untriaged is the correct component unless you all the other components. General is in general wrong.
Component: General → Add-ons Manager
Priority: P3 → --
Product: Firefox → Toolkit
Can you copy the lines from the error console into this bug report.

It sounds like bug 774990 will just fix this, but also sounds like there is something deeper going on.
Following the exact log (having about:blank as start page to prevent unnecessary logs to error console).

LOG addons.xpi: startup
LOG addons.xpi: Skipping unavailable install location app-system-local
LOG addons.xpi: Skipping unavailable install location app-system-share
LOG addons.xpi: checkForChanges
LOG addons.xpi: Opening database
LOG addons.xpi: Add-on firebug@software.joehewitt.com moved to Z:\PortableApps\firefoxportable\Data\profile\extensions\firebug@software.joehewitt.com
LOG addons.xpi: Add-on {d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d} moved to Z:\PortableApps\firefoxportable\Data\profile\extensions\{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}
LOG addons.xpi: Add-on {972ce4c6-7e08-4474-a285-3208198ce6fd} moved to Z:\PortableApps\firefoxportable\App\firefox\extensions\{972ce4c6-7e08-4474-a285-3208198ce6fd}
LOG addons.xpi: Updating database with changes to installed add-ons
LOG addons.xpi: Updating add-on states
LOG addons.xpi: Writing add-ons list
I'm not seeing the from, to locations you mention, just the new location as I'd expect. If you start it a second time what does it log then?
I thought there were from - to locations, but I see it's just the new location. Anyways, the location is the same location that's for sure.

Here's the output of the error console of the second run of Firefox after a fresh windows boot without having worked around the problem:

LOG addons.xpi: startup
LOG addons.xpi: Skipping unavailable install location app-system-local
LOG addons.xpi: Skipping unavailable install location app-system-share
LOG addons.xpi: checkForChanges
LOG addons.xpi: No changes found

Here's the log WITH worked around the problem (disable and re-enable it manually)

LOG addons.xpi: startup
LOG addons.xpi: Skipping unavailable install location app-system-local
LOG addons.xpi: Skipping unavailable install location app-system-share
LOG addons.xpi: checkForChanges
LOG addons.xpi: Opening database
LOG addons.xpi: Updating database with changes to installed add-ons
LOG addons.xpi: Updating add-on states
LOG addons.xpi: Writing add-ons list
LOG addons.xpi: Loading bootstrap scope from Z:\PortableApps\FirefoxPortable\Data\profile\extensions\firebug@software.joehewitt.com
LOG addons.xpi: Calling bootstrap method startup on firebug@software.joehewitt.com version 1.10.2
LOG addons.xpi: Loading bootstrap scope from Z:\PortableApps\FirefoxPortable\Data\profile\extensions\{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}
LOG addons.xpi: Calling bootstrap method startup on {d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d} version 2.1.2
So the first log in comment 5 happens after starting Windows and then running Firefox.

The second log in comment 5 happens if you disable then enable the add-on after Firefox is running?

Under what circumstances do you see the log in comment 3?

Can you exit Firefox, then attach copies of prefs.js, extensions.ini and extensions.sqlite from your profile folder. Then restart Windows and without opening Firefox attach copies of those files again. I've seen cases in the past where other applications on the system modify those files while Windows starts up which could cause this.
> So the first log in comment 5 happens after starting Windows and then
> running Firefox.
Not completely. The first log in comment 5 happens when I start Firefox the second time after starting Windows (not having worked around the problem). I posted it in reply to the question "If you start it a second time what does it log then?" (comment 4).

> The second log in comment 5 happens if you disable then enable the add-on
> after Firefox is running?
This is correct. I disable all my restartless add-ons, re-enable them and then restart Firefox.

> Under what circumstances do you see the log in comment 3?
This log shows up the very first time I run Firefox after I start Windows.

Basically:

Comment 3: First time starting Firefox.
Comment 5, log 1: Second time starting Firefox.
Comment 5, log 2: Worked around the problem, every time starting Firefox.

> Can you exit Firefox, then attach copies of prefs.js, extensions.ini and
> extensions.sqlite from your profile folder. Then restart Windows and without
> opening Firefox attach copies of those files again. I've seen cases in the
> past where other applications on the system modify those files while Windows
> starts up which could cause this.
No problem. Here's a link to 3 environments:
http://www.mediafire.com/?aoy37va9n5zc27d

This zip archive contains 3 more zip archives:
Working.zip: Contains the requested files of a working environment.
AfterWinBootNotWorking.zip: Contains the requested files directly zipped after Windows boot, Firefox has not ran yet.
AfterFirstFFStartNotWorking.zip: Started Firefox, closed it without doing anything, zipped the requested files.
It took me a little while to spot this. The extension's (and the entire app in fact) is moving to a different place, sort of. The files show that before restarting windows it is all under Z:\PortableApps\FirefoxPortable and after the restart it is all under Z:\PortableApps\firefoxportable. The two differ only in case, Windows has a case-insensitive filesystem but all the code we have does case-sensitive comparisons.

So I'm now almost positive that bug 774990 will solve this. I just don't know why Firefox is sometimes seeing one form of the directory name and other times another. I'm assuming the directory isn't actually changing name.
Depends on: 774990
Thanks for your positive reply. I'll simply await the next version, assuming Firefox 15 (or 14.0.2 I don't know) will have this fixed.
Blocks: abp
I'm not sure if this will be fixed from the other bug as this happened to me a bunch of times, and I didn't even have to restart windows, sometimes just firefox

1. Fresh install of firefox
2. Install add-ons through firefox or by setting up sync, add-ons get installed (some are restartless, change their settings if needed)
3. Restart and configure the rest of the add-ons
4. After closing firefox and opening it again ALL add-ons are gone like it was never installed (Sometimes it was just the restartless add-ons that went missing)
4. I had to reinstall add-ons, then restart firefox. Luckily 90% of settings were still in tact so I didn't have to reconfigure most of them. Still a huge waste of time though as noscript never has it's settings saved (not by sync either)

It's random when it happens, sometimes it's on second or third restart of firefox, and most of the time it never happens.
(In reply to jordimueters from comment #9)
> Thanks for your positive reply. I'll simply await the next version, assuming
> Firefox 15 (or 14.0.2 I don't know) will have this fixed.

Jordi, this should be fixed now in F15 following bug 774990. Can you confirm that solved the issue for you?

(In reply to Yev from comment #10)
Missing add-ons sound a lot like bug 671894. Could you check your extensions.log information when that happens? If it is unrelated to bug 671894, please file a new one.
I hereby confirm the issue to be resolved. Thanks!
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.