Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Searching with rs prefix doesn't work anymore in current Firefox #182

Open
djc opened this issue Aug 4, 2022 · 10 comments
Open

Searching with rs prefix doesn't work anymore in current Firefox #182

djc opened this issue Aug 4, 2022 · 10 comments

Comments

@djc
Copy link

djc commented Aug 4, 2022

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.

@Folyd
Copy link
Member

Folyd commented Aug 4, 2022

Hi @djc. Thanks for the feedback. It works on my Firefox (v103, macOS). Did you try relaunch the browser? See also #156 (comment)

@djc
Copy link
Author

djc commented Aug 4, 2022

I tried restarting the browser, and also tried removing the extension and re-installing it. After doing so, it still fails the same way.

@Folyd
Copy link
Member

Folyd commented Aug 4, 2022

Could you debug the extension and send me the console log?
image

@drewtato
Copy link

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

@Folyd
Copy link
Member

Folyd commented Oct 28, 2022

Thanks, @drewtato. That's weird. I guess uninstalling and then re-install it can fix it.

@monax3
Copy link

monax3 commented Oct 28, 2022

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.

@k9withabone
Copy link

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.

@jannschu
Copy link

jannschu commented Jan 10, 2024

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 with chrome.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.

@MolotovCherry
Copy link

MolotovCherry commented Feb 13, 2024

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

@Folyd
Copy link
Member

Folyd commented Feb 14, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants