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

Offline mode no longer works in Chrome 118.0.5993.70 #263

Closed
SteveLauC opened this issue Oct 16, 2023 · 5 comments · Fixed by #275
Closed

Offline mode no longer works in Chrome 118.0.5993.70 #263

SteveLauC opened this issue Oct 16, 2023 · 5 comments · Fixed by #275

Comments

@SteveLauC
Copy link
Contributor

Env

  • Chrome: Version 118.0.5993.70 (Official Build) unknown (64-bit)

  • Rust Search Extension: 1.12.0

  • Host: Fedora 38 Workstation/GNOME 44.5

  • Rust:

    $ rustup -V
    rustup 1.26.0 (5af9b9484 2023-04-05)
    info: This is the version for the rustup toolchain manager, not the rustc compiler.
    info: The currently active `rustc` version is `rustc 1.73.0 (cc66ad468 2023-10-03)`

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
Copy link
Member

Folyd commented Oct 16, 2023

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

@Folyd Folyd pinned this issue Oct 16, 2023
@SteveLauC
Copy link
Contributor Author

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
Copy link
Member

Folyd commented Oct 16, 2023

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
Copy link
Contributor Author

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
Copy link
Contributor

yescallop commented Oct 25, 2023

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?

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

Successfully merging a pull request may close this issue.

3 participants