tauri-apps / tauri

Build smaller, faster, and more secure desktop and mobile applications with a web frontend.
https://tauri.app
Apache License 2.0
83.65k stars 2.51k forks source link

[bug] Notifications are not sent if app installed through NSIS #8512

Closed egebilecen closed 9 months ago

egebilecen commented 9 months ago

Describe the bug

As the title suggests, if a bundled app installed through NSIS installer, notifications sent from the app is not displayed. But if the same app is installed from Microsoft installer, notifications are displayed without any problem.

Reproduction

1-Install a bundled app that sends notifications through NSIS installer.

Expected behavior

1-Install a bundled app that sends notifications through NSIS installer. 2-Expect notifications to be displayed.

Full tauri info output

[✔] Environment
    - OS: Windows 10.0.22621 X64
    ✔ WebView2: 120.0.2210.91
    ✔ MSVC: Visual Studio Community 2022
    ✔ rustc: 1.71.1 (eb26296b5 2023-08-03)
    ✔ cargo: 1.71.1 (7f1d04c00 2023-07-29)
    ✔ rustup: 1.26.0 (5af9b9484 2023-04-05)
    ✔ Rust toolchain: stable-x86_64-pc-windows-msvc (environment override by RUSTUP_TOOLCHAIN)
    - node: 18.12.1
    - npm: 8.19.2

[-] Packages
    - tauri [RUST]: 1.5.3
    - tauri-build [RUST]: 1.5.0
    - wry [RUST]: 0.24.6
    - tao [RUST]: 0.16.5
    - tauri-cli [RUST]: 1.5.7
    - @tauri-apps/api [NPM]: 1.5.1 (outdated, latest: 1.5.3)
    - @tauri-apps/cli [NPM]: 1.5.7 (outdated, latest: 1.5.9)

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

Stack trace

No response

Additional context

I have tested my app on Windows and Linux, notifications are sent fine on Linux. For windows, it only worked if I installed it from Microsoft Installer.

ReactorScram commented 9 months ago

I ran into this "Powershell" thing too. In #3700 they say it's a limitation of Windows, you have to install through MSI to get the icon / name correct. I wonder if it's possible to do some registry hack to get around it?

amrbashir commented 9 months ago

Just tested using the NSIS installer and notifications worked just fine, could you share a minimal repro?

egebilecen commented 9 months ago

Just tested using the NSIS installer and notifications worked just fine, could you share a minimal repro?

I just tested it now and oddly... it works! I don't know what has changed. I think shutting down the computer did the trick because I have been keeping it in sleep for a very long time.