Skip to content

fix: update dependencies and fix tokio runtime panic#30

Open
reatlat wants to merge 1 commit intoaptabase:mainfrom
freshjuice-dev:update-dependencies
Open

fix: update dependencies and fix tokio runtime panic#30
reatlat wants to merge 1 commit intoaptabase:mainfrom
freshjuice-dev:update-dependencies

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

@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.

- Replace tokio::spawn with tauri::async_runtime::spawn to fix panic
  when called outside of Tokio runtime context
- Update deprecated PanicInfo to PanicHookInfo
- Bump @tauri-apps/api to ^2.7.0 for IPC fix

Fixes aptabase#22
Fixes aptabase#25
@reatlat reatlat force-pushed the update-dependencies branch from 28d232d to b9c06b2 Compare February 8, 2026 22:28
@reatlat
Copy link
Author

reatlat commented Feb 8, 2026

Thanks for the feedback! I've updated the PR — now it only contains the actual fixes:

  • tokio::spawntauri::async_runtime::spawn (runtime panic fix)
  • PanicInfoPanicHookInfo (deprecation fix)
  • @tauri-apps/api bump to ^2.7.0 (IPC fix)

All unnecessary dependency bumps have been removed.

I'll open a separate PR for dependency updates — I believe keeping dependencies up to date is important for security, even if semver ranges technically allow resolving newer versions. The minimum version floor still matters for projects that pin or use lockfiles.

@nekename
Copy link
Contributor

nekename commented Feb 9, 2026

Looks good, let me test it later today.

@nekename
Copy link
Contributor

Ah, so sorry, completely forgot. Will try to remember to do it today

@nekename
Copy link
Contributor

@reatlat @cristipufu works, LGTM - haven't tested panics but I'm sure it's fine, just updating to the non-deprecated struct name

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

2 participants