Skip to content

Conversation

@reatlat
Copy link

@reatlat reatlat commented Jan 26, 2026

Summary

  • Update all Rust and JavaScript dependencies to latest versions
  • Fix tokio runtime panic by replacing tokio::spawn with tauri::async_runtime::spawn
  • Fix deprecation: PanicInfoPanicHookInfo

Key Fix

The main fix is in src/client.rs where tokio::spawn is replaced with tauri::async_runtime::spawn. This resolves the panic:

thread 'main' panicked at tauri-plugin-aptabase/src/client.rs:78:9:
there is no reactor running, must be called from the context of a Tokio 1.x runtime

Using tauri::async_runtime::spawn is the correct approach for Tauri plugins as it properly integrates with Tauri's managed runtime.

Dependencies Updated

Rust

  • tauri: 2.2.5 → 2.7.0
  • tauri-plugin: 2.0.4 → 2.3.1
  • tokio: 1.43.0 → 1.47.1
  • serde: 1.0.217 → 1.0.219
  • serde_json: 1.0.138 → 1.0.142
  • reqwest: 0.12.12 → 0.12.22
  • time: 0.3.37 → 0.3.41
  • os_info: 3.9.2 → 3.12.0
  • rand: 0.9.0 → 0.9.2
  • log: 0.4.25 → 0.4.27

JavaScript

  • @tauri-apps/api: 2.1.1 → 2.7.0
  • Example project dependencies updated

Testing

  • ✅ Rust plugin compiles without errors
  • ✅ No more runtime panic on startup

Fixes #22
Fixes #25
Supersedes #26

braden-w and others added 3 commits August 11, 2025 00:24
- Update Tauri from 2.2.5 to 2.7.0
- Update tauri-plugin from 2.0.4 to 2.3.1
- Update various Rust dependencies to latest versions
- Fix deprecated PanicInfo to use PanicHookInfo
- Update example project dependencies
- Update @tauri-apps/api to 2.7.0 across all package.json files
- Update @rollup/plugin-node-resolve to 16.0.1
- Update Svelte to v5.14.0 in example
- Update Vite to v5.4.0 (compatible with Svelte plugin)
- Update @tauri-apps/cli to 2.7.0
- Update internal-ip to 8.0.0
- Update @sveltejs/vite-plugin-svelte to 4.0.0
@nekename
Copy link
Contributor

It may be the second change of #15 that fixed it (replacing tauri's block_on with futures' one, because any tokio-based block_on panics when called on an async thread), but let me check that this PR (which reverts the first, not second, change of that PR) doesn't break that later today.

As for updating dependencies, this is not a good idea. Bumping a version from 1.0.217 to 1.0.219, or 0.9.0 to 0.9.4, is not a meaningful change as this isn't an exact version specifier, but instead it means "any 1.x.x / 0.9.x version newer than this" - the root project that depends on this library may already have a newer version resolved, and bumping the versions here just causes unnecessary churn.

The other changes look good, especially the PanicHookInfo one, I remember someone else opened a PR that originally introduced the deprecated version which I found a bit sketchy

@nekename
Copy link
Contributor

I see the version bump is to fix the IPC issue: in that case, bump only the @tauri-apps/api library.

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

Successfully merging this pull request may close these issues.

Guide for Tauri v2 Integration and Workaround for window.__TAURI_IPC__ Error Requirement of async main function

3 participants