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

os error 1314, required privilege is not held #780

Closed
3nigm4 opened this issue Jul 9, 2020 · 12 comments
Closed

os error 1314, required privilege is not held #780

3nigm4 opened this issue Jul 9, 2020 · 12 comments

Comments

@3nigm4
Copy link

3nigm4 commented Jul 9, 2020

"C:\\Program Files\\Volta\\volta.exe" "install" "vue-cli"
Volta v0.8.3

Could not create shim for "vue"

Please ensure you have correct permissions to the Volta directory.

Error cause: A required privilege is not held by the client. (os error 1314)

I am on windows 10.

I turned on Developer Mode before install.
I tried running volta in admin terminal.

I was able to install node without issues.

@charlespierce
Copy link
Contributor

@3nigm4 That's very odd, especially if it didn't even work in an admin terminal, which should have full permissions to everything on the system. The only thing that comes to mind is that the symlink can't be created at all and the error is misleading. Is your %LOCALAPPDATA% (usually \Users\<username>\AppData\Local) directory on a different drive than Program Files?

@3nigm4
Copy link
Author

3nigm4 commented Jul 15, 2020

Hey thanks for your replay. No they are both on my c drive.

@charlespierce
Copy link
Contributor

Hmm, that is very strange indeed, as it doesn't appear like there should be any reason you can't create the symlink. I'll do a bit more investigation to see if there is some other requirement to create symlinks or a common error.

@3nigm4
Copy link
Author

3nigm4 commented Jul 22, 2020

it also does not work on WSL2:

 volta install @vue/cli
⠁ Querying metadata for @vue/cli@latest
thread '<unnamed>' panicked at 'assertion failed: `(left == right)`
  left: `22`,
 right: `4`', src/libstd/sys/unix/thread.rs:179:21
⠁ Fetching public registry: https://nodejs.org/dist/index.json
thread '<unnamed>' panicked at 'assertion failed: `(left == right)`
  left: `22`,
⠁ Installing dependencies for @vue/[email protected]
thread '<unnamed>' panicked at 'assertion failed: `(left == right)`
  left: `22`,
 right: `4`', src/libstd/sys/unix/thread.rs:179:21

@rwjblue
Copy link
Contributor

rwjblue commented Jul 22, 2020

@charlespierce - We could also handle the error and just copy the file I think... (though we should still root cause this to see if we can figure it out)

@charlespierce
Copy link
Contributor

@rwjblue True, that's an option. And I actually have an issue #579 to investigate other ways of not using symlinks on Windows. We'd want to be deliberate in the approach, however, to make sure that we clean anything up in situations like upgrades (where we don't want the old binaries to stick around because they were copied).

@3nigm4 That WSL error looks different, and I've actually never seen anything like that before. Which distro are you using within WSL? I know I've tested Volta within a WSL environment before, but it's been a while. If there's a distro we aren't supporting we should definitely fix that if possible. Once concern I have is that appears to be a panic within the Rust standard library itself, so it may be an upstream issue that we need to figure out.

@3nigm4
Copy link
Author

3nigm4 commented Jul 24, 2020

I am using WSL2 and ubuntu 20.04.

@ltomes
Copy link

ltomes commented Jul 27, 2020

@charlespierce I'm in the same boat as @3nigm4, also on 20.04 (via WSL2)

:$ volta --verbose install node
[verbose] No custom hooks found
[verbose] Node index cache was not found or was invalid
⠁ Fetching public registry: https://nodejs.org/dist/index.json
thread '<unnamed>' panicked at 'assertion failed: `(left == right)`
  left: `22`,
 right: `4`', src/libstd/sys/unix/thread.rs:179:21
[verbose] Found newest LTS node version (12.18.3) from https://nodejs.org/dist/index.json
[verbose] Downloading [email protected] from https://nodejs.org/dist/v12.18.3/node-v12.18.3-linux-x64.tar.gz
[verbose] Unpacking node into '/home/user/.volta/tmp/.tmpyScf23'
[verbose] Saving bundled npm version (6.14.6)
[verbose] Installing node in '/home/user/.volta/tools/image/node/12.18.3'
success: installed and set [email protected] (with [email protected]) as default

But the install didn't actually succeed:

[verbose] Found default configuration at '/home/user/.volta/tools/user/platform.json'
⚡️ No Node runtimes installed!

    You can install a runtime by running `volta install node`. See `volta help install` for
    details and more options.
[verbose] No custom hooks found

@charlespierce
Copy link
Contributor

@3nigm4 @ltomes Are you both sure you're actually using WSL2? It looks like the issue you're seeing is the same as this one: rust-lang/rustup#2293, which is actually on WSL1 with newer glibc versions (like that provided by Ubunto 20.04). From the comments there, it looks like to use WSL2, you would need to manually opt in (and upgrade your ubuntu installation) to use WSL2, by default it still uses WSL1.

If it is that issue, then it's unfortunately not something we can fix from Volta, as it's deeper in the Rust glibc linking. The suggested fixes are to upgrade WSL manually using the commands in this comment or to stick with Ubuntu 18.04 LTS instead of using 20.04.

@ltomes
Copy link

ltomes commented Jul 28, 2020

You're correct for some reason its running wsl 1.

wsl -l -v
  NAME            STATE           VERSION
* Ubuntu-20.04    Running         1

This is a brand new install in fast ring. It's baffling that it defaulted to WSL, I didn't even consider it might have done that.

I'll convert and see how my behavior changes

Thanks for pointing me in the right direction.

Volta is working as expected in WSL2

@3nigm4
Copy link
Author

3nigm4 commented Jul 28, 2020

Same for me, but I still got trouble with global executable installs (now definitely on WSL2).

I will create a different issue for this as this should be about windows problem ...

@ltomes
Copy link

ltomes commented Jul 28, 2020

@3nigm4 When you open that issue I will be following it as well. :)

$vue serve
  Command vue serve requires a global addon to be installed.
  Please run npm install -g @vue/cli-service-global and try again.
$npm install -g @vue/cli-service-global
Volta error: Global package installs are not supported.

Use `volta install @vue/cli-service-global` to add a package to your toolchain (see `volta help install` for more info).
$volta install @vue/cli-service-global
error: Package has no executables to install.

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

4 participants