Open cosi-conda opened 1 year ago
I think I finally found the cause. It looks like the macos bundler doesn't include the version and arch in the tar.gz on build: https://github.com/tauri-apps/tauri/blob/076e1a81a50468e3dfb34ae9ca7e77c5e1758daa/tooling/bundler/src/bundle/updater_bundle.rs#L89
but the updater expects the version and arch with the named tar.gz file: https://github.com/tauri-apps/tauri/blob/076e1a81a50468e3dfb34ae9ca7e77c5e1758daa/core/tauri/src/updater/core.rs#L832
I’m a bit confused about that because the docs here say it should just generate appname.app.tar.gz
from the build
, but the static json file shows the target in the url, even though we already specify the platform and the arch in the json structure.
https://tauri.app/v1/guides/distribution/updater/#static-json-file
Thanks for looking into it! I highly doubt that the name is the issue though, the updater shouldn't actually care/know about it. Also tauri-action
which is pretty widely used, changes the default name and no issues were reported about it yet.
No idea about the cross-device link error, but the No such file or directory
error most often means you're not running an installed app (like just the binary in target/ or tauri dev
), could that be the case here too?
@FabianLars Thank you for getting back to me! I realized I get NotFound when it's in dev, but I still get the cross link error with the installed app. Manually changing the tar.gz name to have the version and arch did fix the problem, but I'm not sure the best solution for an installed / prod application?
Do you have an example of the tauri-action
updating the updater name? Thank you!
Do you have an example of the tauri-action updating the updater name?
It automatically adds the arch here so that the x64 and arm artifacts don't overwrite each other. -> If you use the action for your own project and need it to rename the assets to include the version then you'll have to use a custom upload action until https://github.com/tauri-apps/tauri-action/issues/215 lands.
Also i just checked again, and i've seen both, the .gz without arch/version and the one with just the app name, working fine so i'm really confused what's going on here 😅
P.S. Did you ever try updating the Tauri packages to the latest versions? (though i'm fairly sure there are no relevant changes but who knows)
@FabianLars If you don't use a tauri-action and just use the tauri build, I think that's where we might see the discrepancy?
I did not update the packages, but I'm thinking it might have breaking changes if it's on v2 right now.
If you don't use a tauri-action and just use the tauri build, I think that's where we might see the discrepancy?
Like i said, i saw both working somewhat recently. And the action didn't include the arch until fairly recently (v0.4) too. I just checked again and the updater indeed doesn't actually see the name of the tar, afaik it extracts it directly from the download without saving it to disk. That said, i wonder if this somehow could be a similar problem to 4500 since its fix was only applied to Linux (though i don't see how a different package name would affect that) -> On that note, do you use multiple disks or something?
Edit: I should probably stop talking at this point since i don't have access to a macOS system to actually look into it...
I did not update the packages, but I'm thinking it might have breaking changes if it's on v2 right now.
I'm only talking about 1.3, there shouldn't be breaking changes between 1.2 and 1.3. v2 is still highly unstable (alpha
name checks out)
Good/Bad news. I'm also seeing this error in a similar situation. Just sorted out how to get files served to my updater (dev code), it downloads fine and then can't restart. Same exact err
thread 'tokio-runtime-worker' panicked at 'application failed to start: Os { code: 2, kind: NotFound, message: "No such file or directory" }', /Users/ultamatt/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tauri-1.5.1/src/api/process.rs:88:8
EDIT: I went ahead and built my application and it works on the built version of it, but not on the dev version. :shrug:
It only works in production 🤷🏼♂️
Describe the bug
I'm using the application updater with a static JSON file.
The app uses the built in dialog to prompt to install and restart the application. The updater status reaches "DONE" in dev mode:
After this, if I confirm that I would like to restart the application, I get the following error in the terminal, and the update is never applied:
Which points to this function in the tauri api/process.rs:
I tried to offload the updater functionality to the JavaScript side to see if I could get more information and built the app. Logging errors to the console, I also saw this error when built with an updater status of "DOWNLOADED" and then "ERROR":
How do I get the restart and update functionality to be applied?
Reproduction
Expected behavior
I expect the application to restart successfully and apply the update.
Platform and versions
Stack trace
Additional context
I saw this issue here regarding setting a tmp dir for Linux, so maybe it's related. However, I'm using Mac for now.
Also, the build process generates a tar.gz called.app.tar.gz, detailed here
However this line of code in the core.rs indicates that the tar.gz MUST have the arch, even though tauri only generates the .dmg with the version and the arch, and not the tar.gz: https://github.com/tauri-apps/tauri/blob/076e1a81a50468e3dfb34ae9ca7e77c5e1758daa/core/tauri/src/updater/core.rs#L832
Could this be related to by it's giving a Not Found error?
The logs show that it successfully got the tar.gz: