-
Notifications
You must be signed in to change notification settings - Fork 459
Description
Describe the bug
Refer to #9424.
Here is my code:
const steamInstallDirectoryQuery
= 'Get-ItemProperty -Path HKLM:\\SOFTWARE\\WOW6432Node\\Valve\\Steam -Name "InstallPath"'
console.log('start')
const res = await Command
.create('powershell', steamInstallDirectoryQuery)
.execute()
console.log('end')it keeps waiting for the response of that. It logs start, but after a long time, it still did not log end.
The weirdest thing is that on rare occasions it occasionally works fine.
I use the command directly in powershell and it works well.
Reproduction
https://github.com/s3xysteak/tauri-v2-reproduction-Get-ItemProperty-Error
step 1. pnpm i
step 2. pnpm tauri build
step 3. Click the Greeting button and sometimes it will keep loading and never be resolved.
That is how I make the reproduction:
pnpm create tauri-app --beta.- Change code in
src/components/Greet.vue. - Edit
src-tauri/capabilities/default.json
Expected behavior
In the reproduction, it should stablely change the greeting text and the text in button should quickly turn greeting to loading... to greeting.
Full tauri info output
[✔] Environment
- OS: Windows 10.0.19045 X64
✔ WebView2: 123.0.2420.65
✔ MSVC: Visual Studio Community 2022
✔ rustc: 1.77.1 (7cf61ebde 2024-03-27)
✔ cargo: 1.77.1 (e52e36006 2024-03-26)
✔ rustup: 1.27.0 (bbb9276d2 2024-03-08)
✔ Rust toolchain: stable-x86_64-pc-windows-msvc (default)
- node: 20.10.0
- pnpm: 8.15.5
- npm: 10.2.3
[-] Packages
- tauri [RUST]: 2.0.0-beta.14
- tauri-build [RUST]: 2.0.0-beta.11
- wry [RUST]: 0.39.0
- tao [RUST]: 0.27.0
- @tauri-apps/api [NPM]: 2.0.0-beta.7
- @tauri-apps/cli [NPM]: 2.0.0-beta.12
[-] App
- build-type: bundle
- CSP: unset
- frontendDist: ../dist
- devUrl: http://localhost:1420/
- framework: Vue.js
- bundler: Vite
Stack trace
There is no error message. It looked like he was just blocked.
Additional context
I run pnpm tauri build and send the result .exe file to my friends, and they have the same issue too.
They are using win10/11 and have no Node.js/Rust Env in system.