-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug] Application Updater Process Can't Restart - Tauri API error: Cross-device link (os error 18) #7169
Comments
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:
but the updater expects the version and arch with the named tar.gz file: tauri/core/tauri/src/updater/core.rs Line 832 in 076e1a8
I’m a bit confused about that because the docs here say it should just generate |
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 No idea about the cross-device link error, but the |
@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 |
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 tauri-apps/tauri-action#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. |
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) 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'm only talking about 1.3, there shouldn't be breaking changes between 1.2 and 1.3. v2 is still highly unstable ( |
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
EDIT: I went ahead and built my application and it works on the built version of it, but not on the dev version. 🤷 |
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_name>.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:
tauri/core/tauri/src/updater/core.rs
Line 832 in 076e1a8
Could this be related to by it's giving a Not Found error?
The logs show that it successfully got the tar.gz:
The text was updated successfully, but these errors were encountered: