You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you try to execute a sidecar or Commands in general in an async command it never drives to completion (or probably doesn't even start in the first place).
I tested this only on windows, but according to discord it's a problem on linux or macOS too (can't remember which one they had)
Reproduction
Create a simple async command (I'm using windows for this example):
#[tauri::command]asyncfnlist_dir(){let c = Command::new("powershell.exe").args(["ls"]);dbg!(c.output().unwrap());}
It works if you remove the async keyword. Same if you use (the underlying) std::process::Command::output(). Command::spawn() works fine fwiw.
Expected behavior
No response
Platform and versions
Operating System - Windows, version 10.0.19044 X64
Webview2 - 98.0.1108.55
Visual Studio Build Tools:
- Visual Studio Build Tools 2022
Node.js environment
Node.js - 16.14.0
@tauri-apps/cli - 1.0.0-rc.5
@tauri-apps/api - 1.0.0-rc.1
Global packages
npm - 8.3.1
pnpm - 6.31.0
yarn - Not installed
Rust environment
rustup - 1.24.3
rustc - 1.58.1
cargo - 1.58.0
toolchain - stable-x86_64-pc-windows-msvc
App directory structure
/dist
/node_modules
/src
/src-tauri
App
tauri - 1.0.0-rc.3 (no lockfile)
tauri-build - no manifest (no lockfile)
tao - no manifest (no lockfile)
wry - no manifest (no lockfile)
build-type - bundle
CSP - default-src 'self'
distDir - ../dist
devPath - http://localhost:3000/
framework - React
Stack trace
No response
Additional context
No response
The text was updated successfully, but these errors were encountered:
I think we can refactor the Command APIs a little bit and make them async instead, and offer blocking variants similar to what we did for the dialog APIs.
Describe the bug
If you try to execute a sidecar or Commands in general in an async command it never drives to completion (or probably doesn't even start in the first place).
I tested this only on windows, but according to discord it's a problem on linux or macOS too (can't remember which one they had)
Reproduction
Create a simple async command (I'm using windows for this example):
It works if you remove the async keyword. Same if you use (the underlying)
std::process::Command::output()
.Command::spawn()
works fine fwiw.Expected behavior
No response
Platform and versions
Operating System - Windows, version 10.0.19044 X64 Webview2 - 98.0.1108.55 Visual Studio Build Tools: - Visual Studio Build Tools 2022 Node.js environment Node.js - 16.14.0 @tauri-apps/cli - 1.0.0-rc.5 @tauri-apps/api - 1.0.0-rc.1 Global packages npm - 8.3.1 pnpm - 6.31.0 yarn - Not installed Rust environment rustup - 1.24.3 rustc - 1.58.1 cargo - 1.58.0 toolchain - stable-x86_64-pc-windows-msvc App directory structure /dist /node_modules /src /src-tauri App tauri - 1.0.0-rc.3 (no lockfile) tauri-build - no manifest (no lockfile) tao - no manifest (no lockfile) wry - no manifest (no lockfile) build-type - bundle CSP - default-src 'self' distDir - ../dist devPath - http://localhost:3000/ framework - React
Stack trace
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: