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

[bug] Async commands are broken post alpha.12 #7801

Closed
CrendKing opened this issue Sep 9, 2023 · 2 comments
Closed

[bug] Async commands are broken post alpha.12 #7801

CrendKing opened this issue Sep 9, 2023 · 2 comments
Labels
status: needs triage This issue needs to triage, applied to new issues type: bug

Comments

@CrendKing
Copy link

CrendKing commented Sep 9, 2023

Describe the bug

Everything was fine in alpha.11. After updating to alpha.12, when the frontend invokes a command with async fn, it just times out after around 2 seconds. However, the debugger shows the command was actually called successfully. So it seems it is the callback part inside Tauri that's broken.

Reproduction

  1. pnpm create tauri-app --alpha. Right now it should uses Tauri alpha.13, which shares the problem.
  2. Add tokio dependency. Change the greeting function to async. Make the main function async.
  3. Launch the app. Type the name and click button. Notice nothing happens and error shows up in console.

Expected behavior

Async command should be usable as it always does since 1.0.

Platform and versions

[✔] Environment
    - OS: Windows 10.0.22621 X64
    ✔ WebView2: 116.0.1938.69
    ✔ MSVC: Visual Studio Build Tools 2022
    ✔ rustc: 1.72.0 (5680fa18f 2023-08-23)
    ✔ Cargo: 1.72.0 (103a7ff2e 2023-08-15)
    ✔ rustup: 1.26.0 (5af9b9484 2023-04-05)
    ✔ Rust toolchain: stable-x86_64-pc-windows-msvc (environment override by RUSTUP_TOOLCHAIN)
    - node: 18.17.1
    - pnpm: 8.7.4
    - npm: 9.6.7

[-] Packages
    - tauri [RUST]: 2.0.0-alpha.13
    - tauri-build [RUST]: 2.0.0-alpha.8
    - wry [RUST]: 0.32.0
    - tao [RUST]: 0.22.2
    - @tauri-apps/api [NPM]: 2.0.0-alpha.7
    - @tauri-apps/cli [NPM]: 2.0.0-alpha.10

[-] App
    - build-type: build
    - CSP: unset
    - distDir: ../dist
    - devPath: http://localhost:1420/
    - framework: Svelte
    - bundler: Vite

Stack trace

No response

Additional context

No response

@CrendKing CrendKing added status: needs triage This issue needs to triage, applied to new issues type: bug labels Sep 9, 2023
@deminearchiver
Copy link

Related: tauri-apps/wry#1023

@lucasfernog
Copy link
Member

We'll release the tauri fix in an hour.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs triage This issue needs to triage, applied to new issues type: bug
Projects
None yet
Development

No branches or pull requests

3 participants