SearchService used before init by session restore / startup and pages with search engine links
Categories
(Firefox :: Search, defect)
Tracking
()
People
(Reporter: Pike, Unassigned)
References
Details
Attachments
(2 files)
This breaks about:new-tab and search suggestions.
It might also be that the search service is never really proper initialized.
This might be intermittent
![]() |
Reporter | |
Comment 1•6 years ago
|
||
![]() |
Reporter | |
Comment 2•6 years ago
|
||
Gijs had the idea last night that this might be something that "needs to happen for each engine until it's through the list".
In support of that, my startup log complained about bing, calling Services.search.reInit()
complains about ddg.
My search.json has visibleDefaultEngines":["google-b-d","amazondotcom-de","bing","ddg","ebay-de","ecosia","leo_ende_de","wikipedia-de"]
, so it might be going through that list.
Weirdly enough, on startup, _engines
had Amazon and Google, after reInit
, it only has Bing. So, from two to one different.
![]() |
Reporter | |
Comment 3•6 years ago
|
||
Also, log from reInit
:
_reInit
_loadEngines: start
_findEngines: looking for engines in JARs
_parseListJSON: ignoring visibleDefaultEngines value because amazondotcom is not in the jar engines we have found
_loadEngines: Absent or outdated cache. Loading engines from disk.
_loadEngines: Found previously installed extension
addEnginesFromExtension: bing@search.mozilla.org
addEnginesFromExtension: installing locale: bing@search.mozilla.org:default
_setIcon: Setting icon url "moz-extension://5ac3774d-9775-6e45-b0b0-0d9146f30ae4/favicon.ico" for engine "Bing".
_addEngineToStore: Adding engine: "Bing"
_loadEngines: Installing ddg@search.mozilla.org
1557130477527 addons.xpi WARN Addon with ID ddg@search.mozilla.org already installed, older version will be disabled
SearchService.init
SearchService.init
Comment 4•6 years ago
|
||
In one of Pike's search logs we had the fragment below.
Which appears to show that the browser was loading a content page with a <link rel="search" ...>
element, which calls into the search service which failed in this case. Although this session was also experiencing other startup initialization bugs, this suggests that there is still a race between the handling of these elements and search service initialization. From a quick inspection, I couldn't find any code that waits for search service initialization but I don't know the search service well enough to know where to look.
NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS: [JavaScript Error: "Something tried to use the search service before it's been properly intialized. Please examine the stack trace to figure out what and where to fix it:
_ensureInitialized@resource://gre/modules/SearchService.jsm:709:15
getEngineByName@resource://gre/modules/SearchService.jsm:1938:10
addEngine@chrome://browser/content/browser.js:4179:25
addSearch@chrome://browser/content/browser.js:3983:19
receiveMessage@chrome://browser/content/browser.js:3913:14
MessageListener.receiveMessage*init@chrome://browser/content/browser.js:3888:8
onLoad@chrome://browser/content/browser.js:1490:21
EventHandlerNonNull*@chrome://browser/content/browser.xul:104:39
" {file: "resource://gre/modules/SearchService.jsm" line: 709}]'[JavaScript Error: "Something tried to use the search service before it's been properly intialized. Please examine the stack trace to figure out what and where to fix it:
_ensureInitialized@resource://gre/modules/SearchService.jsm:709:15
getEngineByName@resource://gre/modules/SearchService.jsm:1938:10
addEngine@chrome://browser/content/browser.js:4179:25
addSearch@chrome://browser/content/browser.js:3983:19
receiveMessage@chrome://browser/content/browser.js:3913:14
MessageListener.receiveMessage*init@chrome://browser/content/browser.js:3888:8
onLoad@chrome://browser/content/browser.js:1490:21
EventHandlerNonNull*@chrome://browser/content/browser.xul:104:39
Comment 5•6 years ago
|
||
So the newtab page being broken here is down to the deadlock:
1557130477527 addons.xpi WARN Addon with ID ddg@search.mozilla.org already installed, older version will be disabled
Causes https://bugzilla.mozilla.org/show_bug.cgi?id=1549122 which hits the deadlock, at that point any rel="search" link will cause this log
Description
•