onEvent never called for both downloadAndInstall nor download
Hi Tauri people,
I had updater working nicely as per documentation so far.
I moved the code to a different place and did not test for a while since i had to arrange the situation, but now when i am checking, onEvent function for downloadAndInstall nor download doesn't work.
Here is a snypet:
console.log("Starting download for update:", this.update);
return this.update.downloadAndInstall((event) => {
console.log("Received event:", event);
}).then(() => {
console.log("Update downloaded and installed successfully");
}).catch((error) => {
console.error("Error during update:", error);
});
First consol.log gets printed, and then the one in then(.. block, but the one inside passed onEvent function does not.
(you can see this.update printed, and since downloadAndInstall resolves successfully this.update must be ok. Same thing with download)
Can some1 please help 🙏
I have tried updating versions all around, but did not find any working one, so you can try with latest. I'm on Mac 15.6.
could you also share the output of the tauri info command for completeness sake?
[✔] Environment - OS: Mac OS 15.6.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: 1.86.0-aarch64-apple-darwin (overridden by environment variable RUSTUP_TOOLCHAIN) - node: 24.6.0 - npm: 11.3.0
[-] Packages - tauri 🦀: 2.8.2 - tauri-build 🦀: 2.4.0 - wry 🦀: 0.53.1 - tao 🦀: 0.34.2 - tauri-cli 🦀: 2.5.0 (outdated, latest: 2.8.0) - @tauri-apps/api : 2.4.0 (outdated, latest: 2.8.0) - @tauri-apps/cli : 2.5.0 (outdated, latest: 2.8.1)
[-] Plugins - tauri-plugin-dialog 🦀: 2.3.2, (outdated, latest: 2.3.3) - @tauri-apps/plugin-dialog : 2.2.1 (outdated, latest: 2.3.3) - tauri-plugin-global-shortcut 🦀: 2.3.0 - @tauri-apps/plugin-global-shortcut : not installed! - tauri-plugin-process 🦀: 2.3.0 - @tauri-apps/plugin-process : 2.2.1 (outdated, latest: 2.3.0) - tauri-plugin-fs 🦀: 2.4.1, (outdated, latest: 2.4.2) - @tauri-apps/plugin-fs : not installed! - tauri-plugin-opener 🦀: 2.4.0, (outdated, latest: 2.5.0) - @tauri-apps/plugin-opener : 2.2.6 (outdated, latest: 2.5.0) - tauri-plugin-autostart 🦀: 2.5.0 - @tauri-apps/plugin-autostart : not installed! - tauri-plugin-single-instance 🦀: 2.3.2 - @tauri-apps/plugin-single-instance : not installed! - tauri-plugin-shell 🦀: 2.3.0 - @tauri-apps/plugin-shell : 2.2.1 (outdated, latest: 2.3.0) - tauri-plugin-updater 🦀: 2.9.0 - @tauri-apps/plugin-updater : 2.7.0 (outdated, latest: 2.9.0)
[-] App - build-type: bundle - CSP: unset - frontendDist: ../build - devUrl: http://localhost:1420/ - framework: Svelte - bundler: Vite
Looking at your tauri info output, your rust and js plugin versions didn't match, do you mind updating @tauri-apps/plugin-updater to 2.9 and @tauri-apps/api to 2.8 and try again?
Omg, but good it's a simple thing 😄 It works now, thank you 🙇
No problem, it's such a common mistake that we actually added a warning/error about this recently in tauri-cli 2.8 😂