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

rust-doc does not open documentation on browser #2997

Closed
morarafrank opened this issue May 28, 2022 · 5 comments
Closed

rust-doc does not open documentation on browser #2997

morarafrank opened this issue May 28, 2022 · 5 comments

Comments

@morarafrank
Copy link

morarafrank commented May 28, 2022

Problem

When I run rustup doc on ubuntu 22.04, I get the following error message on Firefox browser.
The issue is that the same command opens the documentation without issues on Chrome.

Access to the file was denied.
The file at /home/morarafrank/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/share/doc/rust/html/index.html is not readable.
It may have been removed, moved, or file permissions may be preventing access.

Rustup version

rustup 1.24.3 (ce5817a94 2021-05-31)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.61.0 (fe5b13d68 2022-05-18)`

Installed toolchains

Default host: x86_64-unknown-linux-gnu
rustup home:  /home/morarafrank/.rustup

stable-x86_64-unknown-linux-gnu (default)
rustc 1.61.0 (fe5b13d68 2022-05-18)
@ehuss
Copy link
Contributor

ehuss commented May 28, 2022

Do you perhaps have Firefox installed from Snap? Searching around, it looks like there is some kind of confinement system in Snap that prevents processes from accessing files. It looks like there is some kind of connections configuration for it.

@rbtcollins
Copy link
Contributor

Dupe of #2988 just for snappy.

At this point we have no plans to run an embedded HTML server, so I'm going to close this.

@morarafrank
Copy link
Author

Do you perhaps have Firefox installed from Snap? Searching around, it looks like there is some kind of confinement system in Snap that prevents processes from accessing files. It looks like there is some kind of connections configuration for it.

I've checked my browser and it has a strict snap configuration. how can i change it to say classic or devmode?

@ghost
Copy link

ghost commented Dec 8, 2023

Getting the path using:
rustup doc --path

Outputs:
/home/user/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/share/doc/rust/html/index.html


Trying to open docs:
xdg-open "/home/user/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/share/doc/rust/html/index.html"

Outputs error:

grep: /proc/sys/fs/binfmt_misc/WSLInterop: No such file or directory
WSL Interopability is disabled. Please enable it before using WSL.
grep: /proc/sys/fs/binfmt_misc/WSLInterop: No such file or directory

Fixed the problem using:
sudo apt purge wslu

@morarafrank
Copy link
Author

Getting the path using: rustup doc --path

Outputs: /home/user/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/share/doc/rust/html/index.html

Trying to open docs: xdg-open "/home/user/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/share/doc/rust/html/index.html"

Outputs error:

grep: /proc/sys/fs/binfmt_misc/WSLInterop: No such file or directory
WSL Interopability is disabled. Please enable it before using WSL.
grep: /proc/sys/fs/binfmt_misc/WSLInterop: No such file or directory

Fixed the problem using: sudo apt purge wslu

this worked for me.

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

No branches or pull requests

3 participants