huhu / rust-search-extension

🦀 The ultimate search extension for Rust
https://rust.extension.sh
Apache License 2.0
1.21k stars 52 forks source link

Offline mode no longer works in Chrome 118.0.5993.70 #263

Closed SteveLauC closed 6 months ago

SteveLauC commented 11 months ago

Env

Erroneous Behavior

Choose the entry I want to check, press enter, nothing happens

Steps to reproduce

  1. Enable the offline mode with the following path

    file:///home/steve/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/share/doc/rust/html/

    the path should be right:

    $ rustup doc --std --path
    /home/steve/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/share/doc/rust/html/std/index.html
  2. Open a new tab

  3. input rs, the a space

  4. input Vec, choose std::vec::Vec, press the enter button

Workaround I have tried

  1. Restart chrome
  2. Reinstall the extension

Demo

Screencast from 2023-10-16 12-15-17.webm

Folyd commented 11 months ago

Thanks for the feedback. Chrome has restricted access to local file URLs since 118.0, see the announcement and workaround here: https://developer.chrome.com/docs/extensions/whatsnew/#changes-to-file-scheme

SteveLauC commented 11 months ago

Thanks for the response!

Per the announcement, you need to explicitly enable this in

chrome://extensions => extension details

But I didn't find it on that page :(, please see the screenshot below:

Screenshot from 2023-10-16 15-45-37

Folyd commented 11 months ago

Neither for me to find that setting. 🥲 Maybe you can change to this workaround: https://rust.extension.sh/faq/#why-local-file-rust-doc-not-work-properly-on-firefox

SteveLauC commented 11 months ago

Get it, I don't want to spawn a server just for serving local file accesses so I think I will just use the online doc for the moment, thanks for looking into the issue!

yescallop commented 11 months ago

In the post provided by the Chrome announcement I found this potential solution:

I ended up adding "optional_host_permissions": [ "file:///*" ] This way the "Allow access to file URLs" is shown, navigation works, but I don't actually get read permission.

Maybe we can give it a try?