When using a profile in a build in location A after using a build in location B, system bootstrapped add-ons are not available on the first run in the new location

RESOLVED WORKSFORME

Status

()

RESOLVED WORKSFORME
2 years ago
3 months ago

People

(Reporter: Gijs, Assigned: rhelmer)

Tracking

({regression, regressionwindow-wanted})

55 Branch
regression, regressionwindow-wanted
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

2 years ago
Log:

gijs-mbp:firefox-unified gkruitbosch$ ./mach run -P trunk
 0:00.24 /Users/gkruitbosch/dev/builds/frontend/dist/Nightly.app/Contents/MacOS/firefox -P trunk -no-remote -foreground
1496930213033	addons.xpi	ERROR	Attempted to load bootstrap scope from missing directory /Users/gkruitbosch/dev/builds/frontend/dist/Nightly.app/Contents/Resources/browser/features/activity-stream@mozilla.org.xpi
1496930213033	addons.xpi	WARN	Add-on activity-stream@mozilla.org is missing bootstrap method startup
1496930213034	addons.xpi	ERROR	Attempted to load bootstrap scope from missing directory /Users/gkruitbosch/dev/builds/frontend/dist/Nightly.app/Contents/Resources/browser/features/aushelper@mozilla.org.xpi
1496930213034	addons.xpi	WARN	Add-on aushelper@mozilla.org is missing bootstrap method startup
1496930213035	addons.xpi	ERROR	Attempted to load bootstrap scope from missing directory /Users/gkruitbosch/dev/builds/frontend/dist/Nightly.app/Contents/Resources/browser/features/e10srollout@mozilla.org.xpi
1496930213035	addons.xpi	WARN	Add-on e10srollout@mozilla.org is missing bootstrap method startup
1496930213036	addons.xpi	ERROR	Attempted to load bootstrap scope from missing directory /Users/gkruitbosch/dev/builds/frontend/dist/Nightly.app/Contents/Resources/browser/features/firefox@getpocket.com.xpi
1496930213037	addons.xpi	WARN	Add-on firefox@getpocket.com is missing bootstrap method startup
1496930213038	addons.xpi	ERROR	Attempted to load bootstrap scope from missing directory /Users/gkruitbosch/dev/builds/frontend/dist/Nightly.app/Contents/Resources/browser/features/flyweb@mozilla.org.xpi
1496930213038	addons.xpi	WARN	Add-on flyweb@mozilla.org is missing bootstrap method startup
1496930213039	addons.xpi	ERROR	Attempted to load bootstrap scope from missing directory /Users/gkruitbosch/dev/builds/frontend/dist/Nightly.app/Contents/Resources/browser/features/formautofill@mozilla.org.xpi
1496930213039	addons.xpi	WARN	Add-on formautofill@mozilla.org is missing bootstrap method startup
1496930213066	addons.xpi	ERROR	Attempted to load bootstrap scope from missing directory /Users/gkruitbosch/dev/builds/frontend/dist/Nightly.app/Contents/Resources/browser/features/onboarding@mozilla.org.xpi
1496930213067	addons.xpi	WARN	Add-on onboarding@mozilla.org is missing bootstrap method startup
1496930213067	addons.xpi	ERROR	Attempted to load bootstrap scope from missing directory /Users/gkruitbosch/dev/builds/frontend/dist/Nightly.app/Contents/Resources/browser/features/presentation@mozilla.org.xpi
1496930213067	addons.xpi	WARN	Add-on presentation@mozilla.org is missing bootstrap method startup
1496930213069	addons.xpi	ERROR	Attempted to load bootstrap scope from missing directory /Users/gkruitbosch/dev/builds/frontend/dist/Nightly.app/Contents/Resources/browser/features/screenshots@mozilla.org.xpi
1496930213069	addons.xpi	WARN	Add-on screenshots@mozilla.org is missing bootstrap method startup
1496930213070	addons.xpi	ERROR	Attempted to load bootstrap scope from missing directory /Users/gkruitbosch/dev/builds/frontend/dist/Nightly.app/Contents/Resources/browser/features/shield-recipe-client@mozilla.org.xpi
1496930213070	addons.xpi	WARN	Add-on shield-recipe-client@mozilla.org is missing bootstrap method startup
1496930213071	addons.xpi	ERROR	Attempted to load bootstrap scope from missing directory /Users/gkruitbosch/dev/builds/frontend/dist/Nightly.app/Contents/Resources/browser/features/webcompat-reporter@mozilla.org.xpi
1496930213072	addons.xpi	WARN	Add-on webcompat-reporter@mozilla.org is missing bootstrap method startup
1496930213073	addons.xpi	ERROR	Attempted to load bootstrap scope from missing directory /Users/gkruitbosch/dev/builds/frontend/dist/Nightly.app/Contents/Resources/browser/features/webcompat@mozilla.org.xpi
1496930213074	addons.xpi	WARN	Add-on webcompat@mozilla.org is missing bootstrap method startup
1496930213622	addons.webextension.geckoprofiler@mozilla.com	WARN	Please specify whether you want browser_style or not in your browser_action options.
1496930215056	addons.xpi	WARN	Add-on screenshots@mozilla.org is missing bootstrap method uninstall
1496930215064	addons.xpi	WARN	Add-on aushelper@mozilla.org is missing bootstrap method uninstall
1496930215068	addons.xpi	WARN	Add-on e10srollout@mozilla.org is missing bootstrap method uninstall
1496930215072	addons.xpi	WARN	Add-on firefox@getpocket.com is missing bootstrap method uninstall
1496930215078	addons.xpi	WARN	Add-on webcompat@mozilla.org is missing bootstrap method uninstall
1496930215081	addons.xpi	WARN	Add-on activity-stream@mozilla.org is missing bootstrap method uninstall
1496930215085	addons.xpi	WARN	Add-on flyweb@mozilla.org is missing bootstrap method uninstall
1496930215088	addons.xpi	WARN	Add-on formautofill@mozilla.org is missing bootstrap method uninstall
1496930215091	addons.xpi	WARN	Add-on presentation@mozilla.org is missing bootstrap method uninstall
1496930215094	addons.xpi	WARN	Add-on shield-recipe-client@mozilla.org is missing bootstrap method uninstall
1496930215096	addons.xpi	WARN	Add-on webcompat-reporter@mozilla.org is missing bootstrap method uninstall
1496930215099	addons.xpi	WARN	Add-on onboarding@mozilla.org is missing bootstrap method uninstall


Followed by none of their UI being available.

Simply closing the browser and re-running ./mach run -P trunk, and the items show up. I don't know what broke this, but it being broken makes me very worried.
(Assignee)

Comment 1

2 years ago
Hm, I can't reproduce this (6491fb29e7fc on mozilla-central) - Gijs does the directory /Users/gkruitbosch/dev/builds/frontend/dist/Nightly.app/Contents/Resources/browser/features/ exist when this happens, or anything else that I could try to be able to repro?
Flags: needinfo?(gijskruitbosch+bugs)
(Reporter)

Comment 2

2 years ago
(In reply to Robert Helmer [:rhelmer] from comment #1)
> Hm, I can't reproduce this (6491fb29e7fc on mozilla-central) - Gijs does the
> directory
> /Users/gkruitbosch/dev/builds/frontend/dist/Nightly.app/Contents/Resources/
> browser/features/ exist when this happens, or anything else that I could try
> to be able to repro?

I can't repro reliably myself. I just clobbered and rebuilt and reran my browser, and then it worked. I've seen this several times now, though, both on Linux and OS X. Maybe it's connected with bug 1368699 and friends. :-\
Flags: needinfo?(gijskruitbosch+bugs)
(Assignee)

Comment 3

2 years ago
Thanks. The error message makes me suspect it's a build system problem where the "features" subdir of the app dir is not being populated (as opposed to the add-ons existing but not being loaded by addons manager), but hard to say for sure until we can reproduce.

Comment 4

2 years ago
Hi Gijs,

Since this can't be reliably reproduced, do you think it should be resolved? or move to a different component (based on comments) for continued investigation?
Flags: needinfo?(gijskruitbosch+bugs)
(Reporter)

Comment 5

2 years ago
We can resolve for now and reopen if/when we have better STR.
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Flags: needinfo?(gijskruitbosch+bugs)
Resolution: --- → INCOMPLETE
(Reporter)

Comment 6

2 years ago
I just reproduced this again. It seems it's connected to using the same browser profile both with a self-built m-c build and with an official downloaded one. Whenever I switch from one build to the other or vice versa, these warnings print and all system add-ons are disabled.

Does that help shed light on this? Robert?
Status: RESOLVED → REOPENED
Flags: needinfo?(rhelmer)
Resolution: INCOMPLETE → ---
(Assignee)

Comment 7

2 years ago
(In reply to :Gijs from comment #6)
> I just reproduced this again. It seems it's connected to using the same
> browser profile both with a self-built m-c build and with an official
> downloaded one. Whenever I switch from one build to the other or vice versa,
> these warnings print and all system add-ons are disabled.
> 
> Does that help shed light on this? Robert?

Oh, hm. So I think this is in addons manager code then - specifically we store the full path to each add-on in `extensions.json`, which is fine for normal add-ons but not really great for system add-ons since they end up with a path like:

"path": "/Applications/FirefoxNightly.app/Contents/Resources/browser/features/firefox@getpocket.com.xpi"

Kris, this isn't new is it? I know you refactored this whole bit but I'm pretty sure we've always stored the full path like this.

This would be problematic for users that switch between Nightly and Release with the same profile, or for developers, so probably not a huge user impact but still something we should fix...

We should get the `/Applications/FirefoxNightly.app/Contents/Resources/browser/features/` dynamically instead of storing the full path like this...
Flags: needinfo?(rhelmer) → needinfo?(kmaglione+bmo)
(Assignee)

Comment 8

2 years ago
Making this relative to the application directory and bumping the schema version should fix any existing profiles with this problem, I think...
(Assignee)

Updated

2 years ago
Assignee: nobody → rhelmer
Status: REOPENED → ASSIGNED
(In reply to Robert Helmer [:rhelmer] from comment #7)
> Oh, hm. So I think this is in addons manager code then - specifically we
> store the full path to each add-on in `extensions.json`, which is fine for
> normal add-ons but not really great for system add-ons since they end up
> with a path like:
>
> "path":
> "/Applications/FirefoxNightly.app/Contents/Resources/browser/features/
> firefox@getpocket.com.xpi"
>
> Kris, this isn't new is it? I know you refactored this whole bit but I'm
> pretty sure we've always stored the full path like this.

No, it's not new. In fact, in those patches, I switched from storing absolute
paths for everything to storing relative paths for most extensions. But I had
to make an exception for system add-ons, because their install location
objects didn't have locations. So it should be easy to fix.

> This would be problematic for users that switch between Nightly and Release
> with the same profile, or for developers, so probably not a huge user impact
> but still something we should fix...

They'll have enough problems as it is. I'd rather we do something to
discourage them from sharing profiles between versions than try to handle this
particular corner case.
Flags: needinfo?(kmaglione+bmo)
(Reporter)

Updated

a year ago
Summary: After an artifact build (and sometimes ./mach build faster?) system bootstrapped add-ons are not available → When using a profile in a build in location A after using a build in location B, system bootstrapped add-ons are not available on the first run in the new location
Duplicate of this bug: 1380245
(Assignee)

Comment 11

a year ago
This should be fixed by bug 1348981 - I am planning to make the add-ons located in the app dir relative as part of that bug.
Depends on: 1348981
(Assignee)

Comment 12

a year ago
(In reply to Robert Helmer [:rhelmer] from comment #11)
> This should be fixed by bug 1348981 - I am planning to make the add-ons
> located in the app dir relative as part of that bug.

In the interest of simplifying that bug for uplift to 57, I didn't actually do this :/

So this is probably still needed.
Is this still reproducible?
Flags: needinfo?(gijskruitbosch+bugs)
(Reporter)

Comment 14

3 months ago
No, this seems to wfm now. Thanks!
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago3 months ago
Flags: needinfo?(gijskruitbosch+bugs)
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.