tauri icon indicating copy to clipboard operation
tauri copied to clipboard

[bug] Android crashes when re-launching after closing from app switcher

Open will3942 opened this issue 6 months ago • 1 comments

Describe the bug

Steps to reproduce:

  • Build an Android app with tauri-plugin-log
  • Swipe away the app from the app switcher
  • Open the app
  • Observe a panic & crash

In the log you will see: error while running tauri application: PluginInitialization("log", "attempted to set a logger after the logging system was already initialized")

Reproduction

No response

Expected behavior

No crash should occur

Full tauri info output

[✔] Environment
    - OS: Mac OS 15.3.2 arm64 (X64)
    ✔ Xcode Command Line Tools: installed
    ✔ rustc: 1.87.0 (17067e9ac 2025-05-09)
    ✔ cargo: 1.87.0 (99624be96 2025-05-06)
    ✔ rustup: 1.28.2 (e4f3ad6f8 2025-04-28)
    ✔ Rust toolchain: stable-aarch64-apple-darwin (default)
    - node: 22.13.0
    - pnpm: 10.11.0
    - npm: 10.9.2

[-] Packages
    - tauri 🦀: 2.5.1
    - tauri-build 🦀: 2.2.0
    - wry 🦀: 0.51.2
    - tao 🦀: 0.33.0
    - @tauri-apps/api : 2.5.0
    - @tauri-apps/cli : 2.5.0

[-] Plugins
    - tauri-plugin-single-instance 🦀: 2.2.4
    - @tauri-apps/plugin-single-instance : not installed!
    - tauri-plugin-log 🦀: 2.4.0
    - @tauri-apps/plugin-log : not installed!
    - tauri-plugin-store 🦀: 2.2.0
    - @tauri-apps/plugin-store : 2.2.0
    - tauri-plugin-os 🦀: 2.2.1
    - @tauri-apps/plugin-os : 2.2.1
    - tauri-plugin-process 🦀: 2.2.1
    - @tauri-apps/plugin-process : 2.2.1
    - tauri-plugin-updater 🦀: 2.7.1
    - @tauri-apps/plugin-updater : 2.7.1
    - tauri-plugin-opener 🦀: 2.2.7
    - @tauri-apps/plugin-opener : 2.2.7
    - tauri-plugin-deep-link 🦀: 2.3.0
    - @tauri-apps/plugin-deep-link : 2.3.0
    - tauri-plugin-fs 🦀: 2.3.0
    - @tauri-apps/plugin-fs : not installed!
    - tauri-plugin-shell 🦀: 2.2.1
    - @tauri-apps/plugin-shell : 2.2.1

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../dist
    - devUrl: http://localhost:3001/
    - framework: React
    - bundler: Vite

[-] iOS
    - Developer Teams: [REDACTED]

Stack trace


Additional context

No response

will3942 avatar Jun 04 '25 19:06 will3942

More information: https://github.com/tauri-apps/cargo-mobile2/issues/47 and https://github.com/holochain-apps/kando/issues/10

will3942 avatar Jun 04 '25 19:06 will3942

I can't seem to reproduce this on Android 16 emulator, do you have an example that could reproduce it?

Legend-Master avatar Jun 20 '25 07:06 Legend-Master

see https://github.com/tauri-apps/tao/pull/1148

lucasfernog avatar Oct 15 '25 11:10 lucasfernog

Facing the same issue even on latest versions. Was this fixed?

MirazMac avatar Oct 23 '25 12:10 MirazMac