Links from external apps don't load, clicking a link brings Firefox to the foreground but the URL doesn't open
Categories
(Toolkit :: Startup and Profile System, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr115 | --- | unaffected |
| firefox-esr140 | --- | unaffected |
| firefox147 | --- | unaffected |
| firefox148 | + | fixed |
| firefox149 | + | fixed |
People
(Reporter: suishouen, Assigned: mossop)
References
(Blocks 1 open bug, Regression)
Details
(Keywords: regression)
Attachments
(2 external files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:149.0) Gecko/20100101 Firefox/149.0
Steps to reproduce:
Click a link from an external application, or open a webloc file.
Actual results:
the URL doesn't open.
And when opening URL from external application, it hits the following error:
TypeError: can't access property "path", SelectableProfileService.currentProfile is null
redirectCommandLine resource:///modules/profiles/SelectableProfileService.sys.mjs:1731
Expected results:
the URL should open.
Comment 1•10 months ago
|
||
The Bugbug bot thinks this bug should belong to the 'Toolkit::Startup and Profile System' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
| Assignee | ||
Comment 2•10 months ago
|
||
This looks like another case of bug 1991913. The selectable profiles service thinks it is active but doesn't have a currentProfile. This specific case was most likely made worse by bug 2010535.
Can you run the following two scripts in the browser console when you're in this state and copy what gets displayed into this report? You may need to enable "Browser chrome and add-on debugging toolboxes" in the web developer tools settings:
SelectableProfileService.getAllProfiles().then(p => console.log(p.map(p => p.path)))Services.dirsvc.get("ProfD", Ci.nsIFile).path
| Assignee | ||
Comment 3•10 months ago
|
||
Updated•10 months ago
|
Comment 4•10 months ago
|
||
Set release status flags based on info from the regressing bug 2004469
Updated•10 months ago
|
Comment 6•10 months ago
|
||
| bugherder | ||
| Assignee | ||
Comment 7•10 months ago
|
||
Even though this is fixed it would be good to get the questions in comment 2 answered because something about your state is broken and I'd like to understand more about what it is.
| Assignee | ||
Comment 8•10 months ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D279122
Updated•10 months ago
|
Comment 9•10 months ago
|
||
firefox-beta Uplift Approval Request
- User impact if declined: A small number of users will be unable to open links from other applications while Firefox is running
- Code covered by automated testing: no
- Fix verified in Nightly: yes
- Needs manual QE test: no
- Steps to reproduce for manual QE testing:
- Risk associated with taking this patch: low
- Explanation of risk level: The patch is a simple null check
- String changes made/needed: None
- Is Android affected?: no
| Reporter | ||
Comment 10•10 months ago
|
||
(In reply to Dave Townsend [:mossop] from comment #7)
Even though this is fixed it would be good to get the questions in comment 2 answered because something about your state is broken and I'd like to understand more about what it is.
Is this okay?
18:28:35.179 SelectableProfileService.getAllProfiles().then(p => console.log(p.map(p => p.path)))
18:28:35.209 Promise { <state>: "pending" }
18:28:53.663 Services.dirsvc.get("ProfD", Ci.nsIFile).path
18:28:53.686 "/Users/xxx/Library/Application Support/Firefox/Profiles/xxx.default"
| Assignee | ||
Comment 11•10 months ago
|
||
(In reply to Eiichi from comment #10)
(In reply to Dave Townsend [:mossop] from comment #7)
Even though this is fixed it would be good to get the questions in comment 2 answered because something about your state is broken and I'd like to understand more about what it is.
Is this okay?
18:28:35.179 SelectableProfileService.getAllProfiles().then(p => console.log(p.map(p => p.path)))
18:28:35.209 Promise { <state>: "pending" }
There should have been an additional line logged here.
18:28:53.663 Services.dirsvc.get("ProfD", Ci.nsIFile).path
18:28:53.686 "/Users/xxx/Library/Application Support/Firefox/Profiles/xxx.default"
I don't need the username, but the xxx in the profile directory name is kind of important. It's also random so does not reveal anything about you.
| Reporter | ||
Comment 12•10 months ago
|
||
(In reply to Dave Townsend [:mossop] from comment #11)
I don't need the username, but the xxx in the profile directory name is kind of important. It's also random so does not reveal anything about you.
As follows:
18:28:53.663 Services.dirsvc.get("ProfD", Ci.nsIFile).path
18:28:53.686 "/Users/xxx/Library/Application Support/Firefox/Profiles/2v7gxoyr.default"
| Assignee | ||
Comment 13•10 months ago
|
||
(In reply to Eiichi from comment #12)
(In reply to Dave Townsend [:mossop] from comment #11)
I don't need the username, but the xxx in the profile directory name is kind of important. It's also random so does not reveal anything about you.
As follows:
18:28:53.663 Services.dirsvc.get("ProfD", Ci.nsIFile).path
18:28:53.686 "/Users/xxx/Library/Application Support/Firefox/Profiles/2v7gxoyr.default"
Ok and try running this: await SelectableProfileService.getAllProfiles().then(p => p.map(p => p.path)).catch(console.error).
| Reporter | ||
Comment 14•10 months ago
|
||
Ok and try running this:
await SelectableProfileService.getAllProfiles().then(p => p.map(p => p.path)).catch(console.error).
19:15:23.876 await SelectableProfileService.getAllProfiles().then(p => p.map(p => p.path)).catch(console.error)
19:15:23.979 Array []
| Assignee | ||
Comment 15•10 months ago
|
||
Thanks. Can you copy the contents of the browser console from after a fresh start of Firefox into here?
Updated•10 months ago
|
Updated•10 months ago
|
Comment 16•10 months ago
|
||
| uplift | ||
| Reporter | ||
Comment 17•10 months ago
|
||
(In reply to Dave Townsend [:mossop] from comment #15)
Thanks. Can you copy the contents of the browser console from after a fresh start of Firefox into here?
As follows:
07:10:12.381 Window.fullScreen attribute is deprecated and will be removed in the future. browser-customtitlebar.js:68:7
07:10:18.225 Unknown property ‘-moz-border-radius’. Declaration dropped. codemirror.css:244:22
| Assignee | ||
Comment 18•10 months ago
|
||
Jared I'm a bit confused by what might be happening here. Eiichi was clearly hitting this codepath which can only happen if the profile service is enabled and initialized. In order to be marked initialized we must have gone through this block which should have seen there was no currentProfile and so counted the profiles in the database, seen there were 0 and so reset state and returned early, so not marked the profile service as initialized.
Any ideas what might be going on?
| Reporter | ||
Comment 19•10 months ago
|
||
For reference:
I rebuilt my profile and rerun.
15:14:15.767 await SelectableProfileService.getAllProfiles().then(p => p.map(p => p.path)).catch(console.error)
15:14:15.870 Array [ "/Users/xxx/Library/Application Support/Firefox/Profiles/8iobnutt.Default User" ]
0: "/Users/xxx/Library/Application Support/Firefox/Profiles/8iobnutt.Default User"
length: 1
<prototype>: Array []
I hope this will be useful.
Comment 20•10 months ago
•
|
||
Eiichi, thanks very much for your help debugging so far!
Let's see. Can you remember if you have created, then deleted, additional profiles in the past using the Profiles menu?
Also, have you manually edited profiles.ini recently?
Could you explain in more detail what you mean by "I rebuilt my profile" in your last comment 19? Does this mean you are now using a different profile than before? I'm asking because the name of the profile directory is different in comment 19 (8iobnutt.Default User) than in the earlier comment 12 (2v7gxoyr.default), and in comment 19 you have a non-empty profile group, where in comment 12 the profile group seemed to be empty.
Finally, if you still have the earlier profile (2v7gxoyr.default), it would be helpful to run Nightly using that profile, open the browser console, then run the following commands and share the result here:
SelectableProfileService.isEnabledSelectableProfileService.initialized- Same command as before:
await SelectableProfileService.getAllProfiles().then(p => p.map(p => p.path)).catch(console.error)
Comment 21•10 months ago
|
||
This is an interesting bug! I also can't see how this state could occur, especially the empty getAllProfiles() result in comment 14.
To reach the line mentioned in comment 0, we need to have SelectableProfileService.isEnabled true, SelectableProfileService.initialized true, and a non-null defaultPath at line 1729 (here) so findDefaultProfilePath must have found something in profiles.ini.
On the other hand, normally we would expect SelectableProfileService.currentProfile to be null and SelectableProfileService.getAllProfiles() to return an empty list in the case where SelectableProfileService.initialized is false.
Looking at SelectableProfileService.getAllProfiles(), one way it could return an empty list is if this.#connection is falsy, but this cannot be true if we are initialized. The other way it could return an empty list is if the Profiles table exists and is empty. But if the table is empty, then SelectableProfileService.init runs the code here, bailing out early, so that SelectableProfileService.initialized never becomes true.
I don't quite see how we can reach this state, but maybe I'll need to be more creative in how I try to break things locally!
| Reporter | ||
Comment 22•10 months ago
|
||
(In reply to Jared Hirsch [:jhirsch] (he/him) (Needinfo please) from comment #20)
Let's see. Can you remember if you have created, then deleted, additional profiles in the past using the Profiles menu?
No.
Also, have you manually edited profiles.ini recently?
No, I haven't.
Could you explain in more detail what you mean by "I rebuilt my profile" in your last comment 19? Does this mean you are now using a different profile than before? I'm asking because the name of the profile directory is different in comment 19 (
8iobnutt.Default User) than in the earlier comment 12 (2v7gxoyr.default), and in comment 19 you have a non-empty profile group, where in comment 12 the profile group seemed to be empty.
I'm sorry I can't provide a clear explanation.
While using the profile (2v7gxoyr.default), I noticed that the "Profiles" menu lacked an "Original Profile (current)" option.
So I refreshed the profile, it now displays the profile (8iobnutt.Default User) as the "Original Profile (current)" and has become the default profile.
Finally, if you still have the earlier profile (
2v7gxoyr.default), it would be helpful to run Nightly using that profile, open the browser console, then run the following commands and share the result here:
Unfortunately, I deleted the profile (2v7gxoyr.default), so I can't fulfill your request.
Description
•