rust-search-extension
rust-search-extension copied to clipboard
Searching with rs prefix doesn't work anymore in current Firefox
I'm using release Firefox on macOS, and I've been using the search extension for a long time. Since a few weeks, searching using the rs
prefix for the std docs no longer seems to work. If I type rs
in the address bar, the options shown show the extension at the top, but there are no suggested completions and if I hit enter on something like rs Mutex
nothing happens.
Hi @djc. Thanks for the feedback. It works on my Firefox (v103, macOS). Did you try relaunch the browser? See also https://github.com/huhu/rust-search-extension/issues/156#issuecomment-1135940941
I tried restarting the browser, and also tried removing the extension and re-installing it. After doing so, it still fails the same way.
Could you debug the extension and send me the console log?
I get this too on Windows. The log says this:
23:32:54.265 Uncaught (in promise) TypeError: indexItem is undefined
buildIndex moz-extension://9e1e7d46-fc1e-4010-ac64-5afe0cb4ddba/search/docs/base.js:86
DocSearch moz-extension://9e1e7d46-fc1e-4010-ac64-5afe0cb4ddba/search/docs/base.js:49
<anonymous> moz-extension://9e1e7d46-fc1e-4010-ac64-5afe0cb4ddba/main.js:79
async* moz-extension://9e1e7d46-fc1e-4010-ac64-5afe0cb4ddba/main.js:578
base.js:86:17
<anonymous> moz-extension://9e1e7d46-fc1e-4010-ac64-5afe0cb4ddba/main.js:577
InterpretGeneratorResume self-hosted:1819
AsyncFunctionNext self-hosted:807
(Async: async)
<anonymous> moz-extension://9e1e7d46-fc1e-4010-ac64-5afe0cb4ddba/main.js:578
This happens on load, after printing Already migrated.
(seems unrelated). Reloading the extension does the same thing.
Firefox 106.0.2 (64-bit) Rust Search Extension 1.8.1
Thanks, @drewtato. That's weird. I guess uninstalling and then re-install it can fix it.
Thanks, @drewtato. That's weird. I guess uninstalling and then re-install it can fix it.
I also had this issue and fixed it by doing this. Before I fixed it, it also intermittently made every single other Firefox extension stop working until browser restart.
This is still a problem. I've had to reinstall the extension twice in the last week after it just randomly stopped working. I am using Firefox 121.0 on Fedora 38 with KDE Plasma.
Also had this today, I played around in the developer tools. Here is what I found:
- The value for
index-std-nightly
in the extension store was{ std: undefined, test: undefined, proc_macro: undefined }
which causes the above error. - The "Storage" tab of the developer tools show the value of
index-std-nightly
to be{}
which is very weird, they should match. Confirmed this inconsistency withchrome.storage.local.get
. - Manually setting the value, either by going to https://doc.rust-lang.org/nightly/std/index.html or with
await storage.setItem("index-std-nightly", undefined)
did resolve the issue after a couple of times. - For some reason the event listener for storage changes is only fired occasionally (registered in
main.js
).
The different values and the inconsistent event handling indicate this to be a Firefox bug maybe? I remember killing Firefox right before this issue appeared. Maybe the extension storage got corrupted? On the other hand this is Sqlite we are talking about.
What helped for me
- uninstall extension
- restart browser
- install extension again
I now verified storage events and the value shown in the "Storage" tab of the developer tools to be working as expected again.
Funnily I ran into #265 before and after the reinstall, but before the re-install the index was still sent (weird?), after the re-install no index is sent anymore. The error seems to be caused by core/storage.js
being injected multiple times as a content script according to manifest.json
, search for "doc.rust-lang.org" and you will find overlapping matching expressions. But I don't think this is related.
This happens to me on the latest Chrome 121.0.6167.161. Uninstall and reinstall works for about 1 day, then it happens again. The only thing that shows up is the crate search, but std docs is completely missing. It seems quite prevalent as I've spoken with many others who've had to stop using the extension since it doesn't reliably work anymore
Edit: Thank you for replying and taking care of this! It is indeed working now in Chrome! <3
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. rust.extension.sh/changelog/#v1-12-0-2023-07-15