Search broken and list of search engines in preferences empty when the distribution directory is not readable by the current user
Categories
(Firefox :: Search, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox72 | --- | fixed |
People
(Reporter: rich, Assigned: standard8)
References
Details
Attachments
(4 files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:70.0) Gecko/20100101 Firefox/70.0
Steps to reproduce:
type "reason no midi" in the search/title bar.
Actual results:
I end up on some site called "reason.com".
Expected results:
I'm expecting a google search on those keywords.
Note, In preferences, there's an option to select the default search engine, but there are no options to select from. The dropdown is empty.
Firefox 70.0.1 64-bit on MacOs catalina (10.15.1)
Updated•6 years ago
|
Updated•6 years ago
|
Assignee | ||
Comment 1•6 years ago
|
||
Hi Richard, we should be able to get this fixed, however please could you try doing this first to give us some debug?
- Go back into about:config
- Search for
browser.search.log
, click on the toggle to set it totrue
. - Restart the browser.
- Go to Tools -> Web Developer -> Browser Console (not the web console).
- Right-click and select
Select All
- Right-click again, and select
Copy message
- Paste that into a file and attach it to this bug.
Once you've done that, lets try and fix it:
- Please go to Help -> Troubleshooting Information.
- In the
Application Basics
section, next toProfile Folder
select theShow in Finder
button. - Double click the selected folder.
- Shut down Firefox
- Find and rename (or move to a different location) the file
search.json.mozlz4
(please keep a copy, I'd like you to attach it as well). - Then start up Firefox again.
Hopefully that should get you working. If it doesn't a second copy of the log might be useful.
Please attach the search.json.mozlz4
file - that only contains details about which search engines you have/had installed, and what gets displayed.
Assuming that all works, you might want to set browser.search.log
back to false
. There shouldn't be a big performance impact with it, but it is probably better in the long term to leave it at the default.
Reporter | ||
Comment 2•6 years ago
|
||
Sorry. I already fixed it by completely removing the app, then downloading and installing a fresh copy. This seems to have worked but means that I no longer have the failing system to which to refer.
Comment 3•6 years ago
|
||
Comment 4•6 years ago
|
||
Comment 5•6 years ago
|
||
I'm seeing same exact issue. Completely reinstalling the app only fixed the issue temporarily as it shortly reappeared again.
Mark, I tried (re)moving search.json.mozlz4
file and that didn't help to fix the issue. Please see the file along with browser console logs attached in the ticket.
Specs:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:70.0.1) Gecko/20100101 Firefox/70.0.1
Note that I have Firefox installed as a brew cask using brew cask install firefox
(wonder if there's something to do with permissions here but not sure).
Let me know if there's anything else I can do to debug the issue.
Thanks,
Kirill
Assignee | ||
Comment 6•6 years ago
|
||
Thanks Kirill,
I think your issue might be slightly different to Richard's, but lets run with it anyway. The most interesting part of the log is this:
_init: failure initializng search: Unix error 13 during operation DirectoryIterator on file /Applications/Firefox.app/Contents/Resources/distribution/searchplugins/common (Permission denied)
The distribution
directory shouldn't be part of a standard Firefox install, and I can't see that homebrew would have created it. I'm also not sure that we've changed that code recently. Hence, I'm a little puzzled.
Please could you have a look at the distribution
directory tree, and see what the various permissions are and what's in it?
I think we could probably work around this in code, but I'd like to see if we can work out what's created that and why.
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 7•6 years ago
|
||
Also, do you have a distribution.ini
anywhere within /Applications/Firefox.app/
? If so, I think it would be useful to if you could attach that as well.
Comment 8•6 years ago
|
||
Hey Mark,
distribution
directory only contains policies.json
, it has rw-------
permissions and root
user owns it, not the user that I'm logged as (could be created by my employer automatically somehow, no clue). The content of the file doesn't seem too interesting:
{
"policies": {
"DNSOverHTTPS": {
"Enabled": false,
"Locked": true
},
"DisableSecurityBypass": {
"SafeBrowsing": true
},
"DontCheckDefaultBrowser": true,
"Extensions": {
"Install": [],
"Locked": [],
"Uninstall": []
},
"FlashPlugin": {
"Default": false,
"Locked": true
}
}
}
I did not find distribution.ini
(or anything else with "distribution" word in it) anywhere in the /Applications/Firefox.app/
directory.
All of that being said, my issue still persists - search engines are gone and I can't use search for anything. Is there anything else I can do to help you debug the issue?
Thank
Assignee | ||
Comment 9•6 years ago
|
||
Hi,
(In reply to kirill.zhukov from comment #8)
distribution
directory only containspolicies.json
, it hasrw-------
permissions androot
user owns it, not the user that I'm logged as (could be created by my employer automatically somehow, no clue). The content of the file doesn't seem too interesting:
...
I did not finddistribution.ini
(or anything else with "distribution" word in it) anywhere in the/Applications/Firefox.app/
directory.
Thanks for that, I think we can safely assume that's your employer and nothing malicious. I'm guessing that the distribution
directory is also root read-only?
All of that being said, my issue still persists - search engines are gone and I can't use search for anything. Is there anything else I can do to help you debug the issue?
The quick fix will be to get your employer (unless you can) to change the permissions of the distribution directory to rwxr-xr-x
and the policies.json to rw-r--r--
- then your user where you're running Firefox will actually be able to read it. That's also the main fix, as the current setup is wrong, as policies.json won't be being applied because Firefox won't be able to read it.
For the longer term fix, I think we need to make Firefox more resilient to an unreadable directory structure here. The only thing I want to check is that we'll be consistent with how we handle the result.
Assignee | ||
Comment 10•6 years ago
|
||
I just did some testing, creating a distribution
directory with permissions drwx------
is enough to trigger this.
A policies.json
file being unreadable by the account running Firefox leads to Enterprise Policies: Error reading file
on the error console, and no policies applied. I think we can probably do the same here. There's no point in stopping things working because of a broken set-up.
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 11•6 years ago
|
||
Assignee | ||
Updated•6 years ago
|
Comment 12•6 years ago
|
||
Comment 14•6 years ago
|
||
bugherder |
Updated•6 years ago
|
Description
•