-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Update fails, when Application uses a different SharpCompress Library #1253
Comments
Having the same issue with one of my projects. |
Hard fails delta patching with SharpCompress 0.21.1
|
Got bitten by this just now, too. |
I believe you can remove the delta entries from your RELEASES file around the version you changed SharpCompress and it might bypass this. I remember hitting this a while ago and I think that fixed it. You will need to revert back to the right SharpCompress version still but at least users can hopefully do the full update still. |
Yeah full packages work fine, and removing the "broken" ones from the RELEASES file takes care of that. The default way most people use Squirrel even takes care of this issue as This commit seems to have changed the constructor that Squirrel is calling: <dependency id="SharpCompress" version="[0.17.1,0.21)" /> to enforce this or, probably better since SharpCompress has some security fixes in those later versions, Squirrel should be updated to use the latest SharpCompress. |
is there a well-known best practice to test or avoid a broken auto-update? |
Full packages DO NOT work fine! I have removed everything from the RELEASES file except for the latest full version. The update still fails:
I now face having to talk hundreds of customers through uninstalling and reinstalling my application because of this bug. 😡 |
It seems the problem is worse than I thought. With the wrong version of SharpCompress referenced, the update fails after creating the folder for the new version. As a result, when you close the application and try to launch it again, nothing happens. The launcher picks the empty folder as the latest version, and tries to launch the application from that folder. But the folder is empty, so there's nothing to launch. I think the updater needs to have some way of flagging that an update is not completed. Perhaps it could create the folder with the "hidden" attribute set, and only remove it when the update is finished. (The launcher would obviously need to ignore hidden folders when checking for the latest version.) |
That's not what I experienced - the full package install
Additionally the delta package failed, resulted in a folder but it was unused. |
Perhaps the behaviour changed with Squirrel 1.8? I'm definitely seeing the exception with only the full packages listed in the RELEASES file, and the update routine is creating an empty folder which prevents the application from launching the next time. The problem appears with the following package references:
After downgrading |
I observed it the same way @RichardD2 did. It is bad :( At least, users probably notice the app no longer works and start to contact you or search for a solution online. I am still thinking about fixing this in a way it that it does not return. ...and maybe either squirrel should properly tighten the allowed version of the deltacompression library to what it really expects or there should be some reflection magic to work with what is there. |
Yay thanks @RichardD2 for the tip (regarding Cecil and SharpCompress versions). I can now update 👍 |
+1, thank you @RichardD2 for the concise workaround steps, saved my bacon. |
Is there a plan to fix this besides downgrading? |
Hope for a soon fix too... |
This is easily fixed via #1362. If that is not merged soon and you need a temporarily solution, you could consider using the fork I mention in that PR, which I am maintaining nuget packages for my own purposes. |
* Since standard behavior is fine remove Squirrel awareness * Handle firstrun without Squirrel * Downgraded SharpCompress and Cecil See Squirrel/Squirrel.Windows#1253 * Restart after updater disposed This should fix leaked mutex errror
I mentioned this on the comment for the PR, but the last time we tried this it broke NuGet's garbage Zip parsing and broke a bunch of people. Unfortunately we're hamstrung by the particular zip parsing that NuGet does when it opens NuPkg files |
Oops, accidental close, sorry |
okay, if updating sharpcompress breaks squirrel, could you not at least release a new version which pins down the required sharpcompress version to 0.17.1 so everyone just trying to update his project gets an error before he releases his next version? Could this be a oneliner changing Squirrel.Windows/src/Squirrel.nuspec Line 15 in 17863e1
I went from nuspec Dependencies element docs to nuspec Version ranges and wildcards. I think it could simply be changed to <dependency id="SharpCompress" version="[0.17.1]" /> I am really not sure what
really means, but could it also be a thing to work with the sharpcompress devs so they could make vnext first which is compatible (again) with nuget in some way? At the moment, it is deeply worrying that everyone using squirrel will at some time release a new version with updated packages and break auto-updating. |
This is hitting us with on Sourcetree and has currently broken our delta update. |
There's an advisory on SharpCompress < 0.21 (adamhathcock/sharpcompress@80ceb1c), so we need to land something here. Perhaps @adamhathcock has some insight why your previous attempt to update broke against nuget's zip? |
Coming in completely out of context with regards to NuGet's zip parsing: Could it be that NuGet doesn't support reading "streaming" zip files? Meaning, the size doesn't exist in the header for a zip entry but the optional tail block? There seems to be a couple different things here. |
My Application is refering to SharpCompress 0.19.1 already.
When I execute the Update procedure through code, the processing/upgrade of my SharpCompress library fails. It seems to load it from the Update.exe, while it tries to merge mine.
The Update.exe includes the SharpCompress Library 0.17.1. If I replace the SharpCompress in my Application with the older version, the update process works fine.
As a workaround I can try to use the older SharpCompress library in my application too,. But I am wondering, why I end up in the exception of "wrong assembly version loaded".
The text was updated successfully, but these errors were encountered: