-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Open
Labels
platform: macOSstatus: needs triageThis issue needs to triage, applied to new issuesThis issue needs to triage, applied to new issuesstatus: upstreamThis issue is blocked by upstream dependencies and we need to wait or contribute upstream fixesThis issue is blocked by upstream dependencies and we need to wait or contribute upstream fixestype: bug
Description
Describe the bug
I know this is kind of a weird issue, but I can't get the devicechange event to fire on MacOS when running the app in release mode.
I did a bunch of tests and this only seems to happen when the app runs from the tauri:// URL. If I navigate to my dev URL, the event triggers fine even when the app is built in release mode.
Reproduction
I created a minimal repo that reproduces the issue: tauri-devicechange-bug.
I tested this on both Windows and MacOS: on MacOS the device list never updates if the app runs from tauri://localhost. I'm building the release app via npm run tauri build.
Expected behavior
I'd expect the devicechange event to trigger normally when a device is attached/removed from the system, as it does when running in a browser.
Full tauri info output
[✔] Environment
- OS: Mac OS 15.4.0 arm64 (X64)
✔ Xcode Command Line Tools: installed
✔ rustc: 1.86.0 (05f9846f8 2025-03-31)
✔ cargo: 1.86.0 (adf9b6ad1 2025-02-28)
✔ rustup: 1.28.1 (f9edccde0 2025-03-05)
✔ Rust toolchain: stable-aarch64-apple-darwin (default)
- node: 23.11.0
- npm: 11.2.0
[-] Packages
- tauri 🦀: 2.4.1
- tauri-build 🦀: 2.1.1
- wry 🦀: 0.50.5
- tao 🦀: 0.32.8
- @tauri-apps/api : 2.4.1
- @tauri-apps/cli : 2.4.1
[-] Plugins
- tauri-plugin-opener 🦀: 2.2.6
- @tauri-apps/plugin-opener : 2.2.6
[-] App
- build-type: bundle
- CSP: unset
- frontendDist: ../dist
- devUrl: http://localhost:1420/
- bundler: Vite
Stack trace
Additional context
No response
Metadata
Metadata
Assignees
Labels
platform: macOSstatus: needs triageThis issue needs to triage, applied to new issuesThis issue needs to triage, applied to new issuesstatus: upstreamThis issue is blocked by upstream dependencies and we need to wait or contribute upstream fixesThis issue is blocked by upstream dependencies and we need to wait or contribute upstream fixestype: bug