Closed Bug 478338 Opened 15 years ago Closed 15 years ago

Uninstalling an add-on which provides a search engine in Firefox 3 breaks searching and managing search engines in Firefox 3.5

Categories

(Firefox :: Search, defect, P1)

3.5 Branch
x86
Windows XP
defect

Tracking

()

VERIFIED FIXED
Firefox 3.6a1

People

(Reporter: Ryuji, Assigned: rflint)

References

Details

(Keywords: verified1.9.1, Whiteboard: [fixed by bug 480737])

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.1b2) Gecko/20081201 Firefox/3.1b2
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.1b2) Gecko/20081201 Firefox/3.1b2

Search toolbar have an error called assertion failed when managing search engines.
After clinking manage search engines. Firefox will give an error. 

ASSERT: *** Search: _installLocation: engine has no file!
Stack Trace: 
0:ENSURE_WARN(false,_installLocation: engine has no file!,2147500037)
1:()
2:()
3:()
4:isDefault([object Object],8,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object])
5:SRCH_SVC_getDefault([object Object])
6:getDefaultEngines([object Object])
7:EngineStore()
8:engineManager_init()
9:onload([object Event]


The search engines window which contain no search engine files will appear, 
then it does not response when you clink on any button in that window, it will only close when the X button is pressed on.

Reproducible: Always

Steps to Reproduce:
1.Open Firefox 3.1b2
2.Manage Search engines in the search toolbar 

Actual Results:  
Firefox gives an error. 

ASSERT: *** Search: _installLocation: engine has no file!
Stack Trace: 
0:ENSURE_WARN(false,_installLocation: engine has no file!,2147500037)
1:()
2:()
3:()
4:isDefault([object Object],8,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object])
5:SRCH_SVC_getDefault([object Object])
6:getDefaultEngines([object Object])
7:EngineStore()
8:engineManager_init()
9:onload([object Event]

The search engines window which contain no search engines files will appear, 
then it does not response when you clink on any button in that window, it will only close when the X button is pressed on.  

Expected Results:  
A normal window containing your search engines should appear.
Did you by any chance manually delete a plugin file from the searchplugins directory in either the install or profile directory while firefox was running?

I believe restarting the browser should restore things to normal (or you may be able to undelete the file and delete it through the manage search engines interface)

Naturally, if that doesn't match up then please say so.

(Gavin: I still think this should fail a little more gracefully...)
Digsby has also been known to cause this error, do you have it installed?
(In reply to comment #1)
> Did you by any chance manually delete a plugin file from the searchplugins
> directory in either the install or profile directory while firefox was running?
> 
> I believe restarting the browser should restore things to normal (or you may be
> able to undelete the file and delete it through the manage search engines
> interface)
> 
> Naturally, if that doesn't match up then please say so.
> 
> (Gavin: I still think this should fail a little more gracefully...)

Sorry about resending the same bug twice, i cannot find this bug in bugzilla, so I didn't send the bug to bugzilla. Anyway I tried Safe mode and new profile. 

I got the same error back from safe mode but not in a new profile. 

well, I tried restarting firefox. But it still give me back the same error. The funny thing is that it is ok when I use this profile on Firefox 3.0. But if i use it on firefox 3.1beta 2, it give this error. 

If i remember correctly, I didn't delete any plug-in in any directory.
Sorry about resending the same bug twice, i couldn't find this bug in bugzilla,
so I thought I didn't send the bug to bugzilla. 

anyway the error is recorded as 
Error: uncaught exception: [Exception... "_installLocation: engine has no file!"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: file:///C:/Program%20Files/Mozilla%20Firefox%203.1%20Beta%202/components/nsSearchService.js :: ENSURE_WARN :: line 248"  data: no]

in the error console.
Jason, do you have some STR we can follow here to reproduce it? Like which search plugins you must have installed? That would be really helpful. Thanks
I encountered this problem in Firefox 3.1 beta 2 shortly after installing a add-on called Quick TransLation (qtl) 13.7 by gkutiel. After installing it, I believe it add a search engine called qtl to the search toolbar. 

Currently, since I cannot manage my search engine, I have 5 search engines. Google, Yahoo.co.uk, answer.com, wikipedia(en) and qtl. 

All search engines except qtl acted normally when I used them. When qtl is used to search anything, it will give the Assertion Failed error. 
which will give this : 

ASSERT: *** Search: _installLocation: engine has no file!
Stack Trace: 
0:ENSURE_WARN(false,_installLocation: engine has no file!,2147500037)
1:()
2:()
3:()
4:ParamSubstitution(http://www.google.com/cse?cx=partner-pub-8392726761634214%3A49fu82i9ik0&ie=UTF-8&sa=Search&q={searchTerms},qtl,[object Object])
5:SRCH_EURL_getSubmission(qtl,[object Object])
6:SRCH_ENG_getSubmission(qtl,text/html)
7:getSubmission(qtl,null)
8:doSearch(qtl,current)
9:handleSearchCommand([object MouseEvent])
10:onclick([object MouseEvent])

This error is the same error as the one when I manage my search engines in the search toolbar. 

Basically if I remember correctly, in order to produce this error,
you need to:
1. Use Firefox 3.0 to install qtl add-on and its search engine(qtl). 

2. Install Firefox 3.1 Beta 2. Do not uninstall Firefox 3.

3. Uninstalled qtl add-on using Firefox 3, this will uninstall the qtl search engine in the search toolbar on Firefox 3. Observe that in Firefox 3, there is no error when using the toolbar or any search engine. 

4. Switch to Firefox 3.1 beta 2, you will observe that qtl search engine will still be in the search toolbar of Firefox 3.1 Beta 2. 

5. Clink Manage Search toolbar in Firefox 3.1 beta 2, you should receive the error. 

6. Search using qtl that is still in Firefox 3.1 Beta 2 search toolbar, you should get the same error as Step 5.

I used a new profile and did the above steps and it proved the above steps is reproducible. 

I hope this helps. Thanks.
Do you have a link to this search engine?
https://addons.mozilla.org/en-US/firefox/addon/5641

this is the link of the add-on that I am talking about in comment #7.

After installation of this add-on is complete, it will ask you about adding qtl search engine to Firefox search toolbar. 

Following the step in comment #7 should get you the bug.

WARNING: By following the steps in Comment #7 will cause you to not able to manage any search engines in Firefox 3.1 beta 2. Test on a new profile if necessary.
Doing the steps from comment 7 doesn't show up the qtl search engine in the list of search engines with Firefox 3.1b3pre. Can you please te-test your steps with a clean profile? See http://support.mozilla.com/en-US/kb/Managing+profiles
I tried with a new profile and it works. 

I believe comment 7 is a bit short on the details. 

Steps:
1. Use Firefox 3.0 to install Quick TransLation (qtl) 13.7 add-on. After installing it, it will prompt you with its options. At the first checkbox, the add-on ask you about supporting its search engine that is powered by google, which is actually Google Custom Search although it identify itself as qtl in the search toolbar. Checking the checkbox means the search engine will be in your search bar and made into your default search engine

2. Install Firefox 3.1 Beta 2 if do you have Firefox 3.1 beta 2 already installed in your computer. Do not uninstall Firefox 3. Open Firefox 3.1 beta 2, observe that qtl search engine is in the search toolbar.

3. Close Firefox 3.1 beta 2. Switch to Firefox 3. 

4.Use Firefox 3.0 to uninstall qtl add-on, this will uninstall the qtl search
engine in the search toolbar on Firefox 3. Observe that in Firefox 3, there is
no error when using the toolbar or any search engine. 

5. Switch to Firefox 3.1 beta 2, you will observe that qtl search engine will
still be in the search toolbar of Firefox 3.1 Beta 2. 

6. Clink Manage Search toolbar in Firefox 3.1 beta 2, you should receive the
error. 

7. Search using qtl that is still in Firefox 3.1 Beta 2 search toolbar, you
should get the same error as Step 5.

Please note that the search engine is a additional option of the add-on. 
I suggest you use Firefox 3.1 beta 2 to test this bug behaviour instead of Firefox 3.1 beta 3 pre.
I can confirm this behavior but only on Windows. Doing the same steps on OS X works fine.

Ryan do we mess-up with the search.json in some way? We don't use that file in FX3 so we do not update it when the add-on which provides the search engine gets uninstalled. On the other hand I couldn't explain why it works on OS X then.

Removing the search.json from the profile, so it gets recreated, solves the problem.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: blocking-firefox3.1?
Summary: Search toolbar have an error when managing search engines. → Uninstalling an add-on which provides a search engine in Firefox 3 breaks searching and managing search engines in Firefox 3.1
Version: unspecified → 3.1 Branch
This was probably fixed by bug 480737. Can anyone confirm?
Need a confirmation of whether or not this is still a problem? Marking blocking, though, since the problem as reported would block.
Assignee: nobody → rflint
Flags: blocking-firefox3.1? → blocking-firefox3.1+
Priority: -- → P2
Attached file testcase
(In reply to comment #13)
> This was probably fixed by bug 480737. Can anyone confirm?

No, it hasn't been fixed. The search engine is still listed and the search engine manager is broken. Tested with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b4pre) Gecko/20090309 Shiretoko/3.1b4pre (.NET CLR 3.5.30729) ID:20090309034003

Attached you will find the sample search.json. The referenced qtl.xml doesn't exit anymore in this test profile.
Attachment #366326 - Attachment mime type: application/octet-stream → text/plain
Did you try the steps in comment 11 again, or did you just test the end result using that search.json file? The bug we fixed should stop you from getting into that state again, but if you restore the search.json file as is you'll still see the issue.
Yes, complete steps. The bogus entry is still there (as attached with comment 15).
So the addon itself is calling addEngine/removeEngine for a remote engine on install/uninstall, rather than just shipping the engine in the extension (?!).

I figured the removeEngine call would bump the lastModifiedTime of the profile searchplugins directory though, and we'd invalidate the cache. Clearly that isn't happening for some reason.

I suppose we should detect file-no-longer-exists during cache restoration and just skip that cache entry, rather than letting it fail later on in the _installLocation getter.
--> P1, as this bug will require the wider feedback of a beta release or is of sufficient complexity that we should be looking at it sooner, not later.
Priority: P2 → P1
(In reply to comment #15)
> (In reply to comment #13)
> > This was probably fixed by bug 480737. Can anyone confirm?
> 
> No, it hasn't been fixed. The search engine is still listed and the search
> engine manager is broken. Tested with Mozilla/5.0 (Windows; U; Windows NT 5.1;
> en-US; rv:1.9.1b4pre) Gecko/20090309 Shiretoko/3.1b4pre (.NET CLR 3.5.30729)
> ID:20090309034003

The patch for bug 480737 hasn't landed on 1.9.1 yet, are you able to reproduce this with a trunk build?
Target Milestone: --- → Firefox 3.5b4
Oh, I've overseen that. Now I tested with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2a1pre) Gecko/20090311 Minefield/3.2a1pre (.NET CLR 3.5.30729) ID:20090311051703

With this build everything looks good. The search engine doesn't appear anymore. Marking as fixed and adding dependencies.
Status: NEW → RESOLVED
Closed: 15 years ago
Depends on: 480737
Resolution: --- → FIXED
Whiteboard: [fixed by bug 480737]
Target Milestone: Firefox 3.5b4 → Firefox 3.2a1
I am sorry but I do not understand your term of "target Milestone".

This bug fix is intended for Firefox 3.2 only or is it also intended also for Firefox 3.1?
Bug 480737 will be fixed for beta 4, so this will be fixed before Firefox 3.5 (Firefox 3.1 was reversioned).
Keywords: fixed1.9.1
Verified on 1.9.1 with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b4pre) Gecko/20090407 Shiretoko/3.5b4pre ID:20090407052755

Gavin, when I install the mentioned add-on with the above Shiretoko version and uninstall it directly the search engine still exists. I believe that should be filed as a new bug or is it already covered by the work on an existing bug?
Status: RESOLVED → VERIFIED
Summary: Uninstalling an add-on which provides a search engine in Firefox 3 breaks searching and managing search engines in Firefox 3.1 → Uninstalling an add-on which provides a search engine in Firefox 3 breaks searching and managing search engines in Firefox 3.5
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: