#Why does my Tauri application sometimes fail to launch after compilation?

11 messages · Page 1 of 1 (latest)

pseudo lagoon
#

this is log

thread 'main' panicked at 'error while running tauri application: Runtime(SystemTray(OsError { line: 112, file: "C:\\Users\\xxx\.cargo\\registry\\src\\index.crates.io-6f17d22bba15001f\\tao-0.16.2\\src\\platform_impl\\windows\\system_tray.rs", error: CreationError("Error with shellapi::Shell_NotifyIconW") }))', src\main.rs:393:10
stack backtrace:
   0:     0x7ff7f851ea6c - <unknown>
   1:     0x7ff7f854702b - <unknown>
   2:     0x7ff7f85190d9 - <unknown>
   3:     0x7ff7f851e81b - <unknown>
   4:     0x7ff7f85212d9 - <unknown>
   5:     0x7ff7f8520f8f - <unknown>
   6:     0x7ff7f85217de - <unknown>
   7:     0x7ff7f85216cd - <unknown>
   8:     0x7ff7f851f699 - <unknown>
   9:     0x7ff7f85213d0 - <unknown>
  10:     0x7ff7f8558eb5 - <unknown>
  11:     0x7ff7f85594c3 - <unknown>
  12:     0x7ff7f7466c6b - <unknown>
  13:     0x7ff7f71c233d - <unknown>
  14:     0x7ff7f7384b4b - <unknown>
  15:     0x7ff7f725bcde - <unknown>
  16:     0x7ff7f73207d1 - <unknown>
  17:     0x7ff7f8512348 - <unknown>
  18:     0x7ff7f73207aa - <unknown>
  19:     0x7ff7f71c4009 - <unknown>
  20:     0x7ff7f8550e3c - <unknown>
  21:     0x7ff866b57614 - BaseThreadInitThunk
  22:     0x7ff8676a26b1 - RtlUserThreadStart
full pike
#

Please provide the output of tauri info.

pseudo lagoon
# full pike Please provide the output of `tauri info`.

[✔] Environment
- OS: Windows 10.0.22621 X64
✔ WebView2: 116.0.1938.69
✔ MSVC: Visual Studio Community 2022
✔ rustc: 1.71.0 (8ede3aae2 2023-07-12)
✔ Cargo: 1.71.0 (cfd3bbd8f 2023-06-08)
✔ rustup: 1.26.0 (5af9b9484 2023-04-05)
✔ Rust toolchain: stable-x86_64-pc-windows-msvc (default)
- node: 18.17.0
- pnpm: 8.7.1
- yarn: 1.22.19
- npm: 9.6.7

[-] Packages
- tauri [RUST]: 1.4.1
- tauri-build [RUST]: 1.4.0
- wry [RUST]: 0.24.3
- tao [RUST]: 0.16.2
- @tauri-apps/api [NPM]: 1.4.0
- @tauri-apps/cli [NPM]: 1.4.0

[-] App
- build-type: bundle
- CSP: unset
- distDir: ../dist
- devPath: http://localhost:5173/
- framework: React
- bundler: Vite

full pike
#

How do you set your system tray icon?

#

Is it in your tauri.conf.json or in Rust?

pseudo lagoon
full pike
#

Do you have any Rust code that overrides it?

pseudo lagoon
# full pike How do you set your system tray icon?

I guess this may be caused by the icon content of the tray.
But it is very strange that this error does not appear every time, and it cannot be reproduced after restarting the computer and trying again.

full pike
#

The behaviour should be consistent between boots since the image content isn't changing.

#

Can you create a minimum reproduction or is this specific to your current project?

pseudo lagoon