tauri-apps / plugins-workspace

All of the official Tauri plugins in one place!
https://tauri.app
Apache License 2.0
802 stars 223 forks source link

[bug] After running `cargo tauri android dev`, the notification plugin is not working on Windows #1545

Open kui04 opened 1 month ago

kui04 commented 1 month ago

Initially, the notification plugin was working fine on Windows. Then, I tested it on an Android device, and it also worked. However, after continuing development and testing on Windows, the notification plugin stopped working. There were no error messages during this process, so I'm not sure if the issue is with the plugin itself.

After running cargo tauri android dev, a config.toml file is generated with the following content:

[build]
target = "x86_64-pc-windows-msvc"

[target]

If I delete this file, the notification plugin starts working on Windows again.

cargo tauri info:

[✔] Environment
    - OS: Windows 10.0.22631 X64
    ✔ WebView2: 120.0.2210.144
    ✔ MSVC: Visual Studio 生成工具 2022
    ✔ rustc: 1.79.0 (129f3b996 2024-06-10)
    ✔ cargo: 1.79.0 (ffa9cf99a 2024-06-03)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: stable-x86_64-pc-windows-msvc (environment override by RUSTUP_TOOLCHAIN)
    - node: 20.11.1
    - npm: 9.8.1

[-] Packages
    - tauri [RUST]: 2.0.0-beta.24
    - tauri-build [RUST]: 2.0.0-beta.19
    - wry [RUST]: 0.41.0
    - tao [RUST]: 0.28.1
    - tauri-cli [RUST]: 2.0.0-beta.22
    - @tauri-apps/api [NPM]: 2.0.0-beta.15
    - @tauri-apps/cli [NPM]: 2.0.0-beta.22

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

Thanks for the report! This is the same issue I tried to fix in https://github.com/tauri-apps/plugins-workspace/pull/1502. Note that installed apps are not affected by the logic bug, so your end-users won't have this issue.

kui04 commented 1 month ago

Thanks for the report! This is the same issue I tried to fix in #1502. Note that installed apps are not affected by the logic bug, so your end-users won't have this issue.

I did some research and found winrt_toast. We might be able to refer to this to register an AUMID.