Skip to content

[bug] receiving error events even though window is closed #14190

@konsalex

Description

@konsalex

Describe the bug

Hey folks,

So we receive multiple events in Sentry around errors that are happening in a closed window.

This started happening in a specific window that we were running on main thread for using the vibrancy effect:
https://github.com/tauri-apps/window-vibrancy

Any clue why this may happening? This is how we initiate the window:
https://github.com/gethopp/hopp/blob/main/tauri/src-tauri/src/main.rs#L526

And specifically, we may receive errors hours after the window has been closed, by coincidence as something keeps pulling data, and a JWT token expires, thus the throwing of an error that Sentry is capturing.

Reproduction

No response

Expected behavior

To not run things on the background when window is closed

Full tauri info output

[✔] Environment
    - OS: Mac OS 15.6.0 x86_64 (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.2 (e4f3ad6f8 2025-04-28)
    ✔ Rust toolchain: stable-aarch64-apple-darwin (default)
    - node: 20.10.0
    - yarn: 4.9.2
    - npm: 10.2.3
    - bun: 1.2.19
    - deno: deno 2.1.0

[-] Packages
    - tauri 🦀: 2.8.2
    - tauri-build 🦀: 2.4.0
    - wry 🦀: 0.53.1
    - tao 🦀: 0.34.2
    - @tauri-apps/api : 2.5.0 (outdated, latest: 2.8.0)
    - @tauri-apps/cli : 2.2.7 (outdated, latest: 2.8.4)

[-] Plugins
    - tauri-plugin-single-instance 🦀: 2.2.0
    - @tauri-apps/plugin-single-instance : not installed!
    - tauri-plugin-global-shortcut 🦀: 2.3.0
    - @tauri-apps/plugin-global-shortcut : 2.2.0 (outdated, latest: 2.3.0)
    - tauri-plugin-deep-link 🦀: 2.4.2
    - @tauri-apps/plugin-deep-link : 2.2.1 (outdated, latest: 2.4.3)
    - tauri-plugin-notification 🦀: 2.3.1
    - @tauri-apps/plugin-notification : 2.2.2 (outdated, latest: 2.3.1)
    - tauri-plugin-shell 🦀: 2.3.0
    - @tauri-apps/plugin-shell : 2.2.1 (outdated, latest: 2.3.1)
    - tauri-plugin-os 🦀: 2.3.1
    - @tauri-apps/plugin-os : 2.2.1 (outdated, latest: 2.3.1)
    - tauri-plugin-updater 🦀: 2.9.0
    - @tauri-apps/plugin-updater : 2.7.1 (outdated, latest: 2.9.0)
    - tauri-plugin-log 🦀: 2.6.0
    - @tauri-apps/plugin-log : not installed!
    - tauri-plugin-positioner 🦀: 2.3.0
    - @tauri-apps/plugin-positioner : not installed!
    - tauri-plugin-fs 🦀: 2.4.2
    - @tauri-apps/plugin-fs : 2.2.1 (outdated, latest: 2.4.2)
    - tauri-plugin-process 🦀: 2.3.0
    - @tauri-apps/plugin-process : 2.2.1 (outdated, latest: 2.3.0)
    - tauri-plugin-autostart 🦀: 2.5.0
    - @tauri-apps/plugin-autostart : 2.3.0 (outdated, latest: 2.5.0)
    - tauri-plugin-opener 🦀: 2.2.3
    - @tauri-apps/plugin-opener : 2.5.0
    - tauri-plugin-http 🦀: 2.5.2
    - @tauri-apps/plugin-http : 2.4.3 (outdated, latest: 2.5.2)
    - tauri-plugin-clipboard-manager 🦀: 2.3.0
    - @tauri-apps/plugin-clipboard-manager : 2.2.2 (outdated, latest: 2.3.0)
    - tauri-plugin-dialog 🦀: 2.3.3
    - @tauri-apps/plugin-dialog : 2.2.1 (outdated, latest: 2.4.0)

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

Stack trace


Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions