rust-search-extension icon indicating copy to clipboard operation
rust-search-extension copied to clipboard

Extension suddenly broke in Firefox

Open Sp00ph opened this issue 2 years ago • 18 comments

I'm using Firefox 108.0.1 and the most recent version of the add-on, which is 1.9.1. The experience in Firefox with the add-on has always inferior to the experience in Chrome for me (search results sometimes not showing up properly, pressing Enter on a search result sometimes just leads you to a different page?, etc.), but generally it's been working fine. Since today it's not showing me any search results anymore though. When I type in the rs prefix, it's still showing me the rust search extension suggestion, but it doesn't seem to actually find the proper link:

image

Even actions that don't require any actual querying don't work:

image

(When I press enter on the highlighted suggestion, nothing happens)

I haven't changed any configuration/settings, and I don't think my Firefox had any updates. The search extension is also still working just fine in Chrome.

(Sidenote, but is it possible to set up the search extension as a Firefox search engine somehow, so that you can just press Tab after typing the rs prefix and then only get rust search results? It's doing that by default in Chrome for me, but not in Firefox)

Sp00ph avatar Dec 30 '22 18:12 Sp00ph

Welp, it suddenly started working again. Would still be interested in answers for my other questions though.

Sp00ph avatar Jan 01 '23 19:01 Sp00ph

I have the same issue. I type in rs + space but there is no change in the search bar.

allsey87 avatar Jan 27 '23 10:01 allsey87

I have the same issue. I type in rs + space but there is no change in the search bar.

for the benefit of anyone who sees this: just had the same thing happen here. I managed to fix it on my machine by exporting data to a JSON file (from the extension settings), uninstalling/reinstalling the extension, and then re-importing the JSON.

pickx avatar Dec 19 '23 10:12 pickx

I have the same issue. I type in rs + space but there is no change in the search bar.

for the benefit of anyone who sees this: just had the same thing happen here. I managed to fix it on my machine by exporting data to a JSON file (from the extension settings), uninstalling/reinstalling the extension, and then re-importing the JSON.

while doing that indeed solves it, it is definetely not ideal

Diegovsky avatar Jan 07 '24 19:01 Diegovsky

I've tried debugging this when this happened to me.

I think this is due to local storage going into an inconsistent state, where getting the 'index-std-nightly' key returns an object with all properties being undefined here and the searchIndex fallback not being used. This later causes a TypeError here.

image

Curiously, browsing the local storage in devtools shows the stored value to be just {}, but I guess it doesn't make a difference for the || operator.

image

Removing the index-std-nightly local storage entry with devtools makes the extension work again. I am not sure why this local storage key gets set to an "empty" object though =(

DCNick3 avatar Jan 24 '24 18:01 DCNick3

Is there a way to clean this index-std-nightly in firefox?

Diegovsky avatar Jan 31 '24 19:01 Diegovsky

@Diegovsky, it's pretty tedious, but this is how I did it:

  1. Go to about:addons
  2. Press Gear Icon > Debug Add-ons
  3. Find the Rust Search Extension
  4. Press Inspect button next to the extension name
  5. In the Inspector go to Storage tab
  6. Select Extension Storage in the panel on the left
  7. Find the offending key (index-std-nightly)
  8. Right click on it > Delete "index-std-nightly"
  9. Reload the extension by pressing F5 in the inspector window

It would be nice to see the root cause of this "corruption" identified though..

DCNick3 avatar Jan 31 '24 21:01 DCNick3

Hi all, I just released the v1.13.0 yesterday, I think this issue has been fixed in the new version. Please feel free to report if you encounter any bugs. https://rust.extension.sh/changelog/#v1-12-0-2023-07-15

Folyd avatar Feb 14 '24 19:02 Folyd

I'm on v1.13.0, sending a search / selecting a search result had no effect, following @DCNick3's steps and clearing index-std-nightly (previously {}) fixed it.

g2p avatar Feb 23 '24 11:02 g2p

Same, here. It seems that the extension still regards the string "rs" as input and thus only provides matches for "docs.rs" crates because it matches on the rs.

yannbolliger avatar Jun 27 '24 08:06 yannbolliger

I'll release Rust Search Extension v2.0 soon, this is a big version.

Folyd avatar Jun 27 '24 17:06 Folyd