mattpannella / pupdate

Pupdate - A thing for updating your Analogue Pocket
https://mattpannella.github.io/pupdate/
MIT License
989 stars 33 forks source link

3.9.1 update fails on macos #285

Closed fluxens closed 2 months ago

fluxens commented 3 months ago

Describe the bug Updating via pupdate via CLI from 3.9.0 to pupdate to 3.9.1 fails

To Reproduce Steps to reproduce the behavior:

  1. Have a SD Card with 3.9.0 installed
  2. run pupdate and choose [i] install the updates
  3. update fails

Expected behavior Update to version 3.9.1 completes

Screenshots

./pupdate
Pupdate v3.9.0
Checking for updates...
A new version 3.9.1 is available. Downloading now...
Download complete.
/Volumes/pocket/pupdate.zip
Go to https://github.com/mattpannella/pupdate/releases/tag/3.9.1 for a change log
Would you like to [i]nstall the update, [c]ontinue with the current version, or [q]uit? [i/c/q]: i
Renaming /Volumes/pocket/pupdate to /Volumes/pocket/pupdate.backup
Extracting /Volumes/pocket/pupdate.zip to /Volumes/pocket
An error occurred: FileNotFoundException:System.IO.FileNotFoundException: Could not load file or assembly 'System.IO.Compression.ZipFile, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The system cannot find the file specified.

File name: 'System.IO.Compression.ZipFile, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
   at Pannella.Helpers.ZipExtension.ExtractToDirectory(ZipArchive zipFile, String target, IProgress`1 progress, Boolean overwrite)
   at Pannella.Helpers.ZipHelper.ExtractToDirectory(String zipFile, String destination, Boolean overwrite)
   at Pannella.Program.UpdateSelfAndRun(String directory, String[] updaterArgs)

Desktop (please complete the following information):

Contents of settings file pupdate_settings.json

hallem commented 3 months ago

I actually hit this myself, but was unable to figure out what is going wrong with the package. I was able to manually download the latest release and replace the old one with no issues. I'd suggest doing that so you can get the update.

mattpannella commented 3 months ago

yeah this has me stumped. its been long enough that i can't remember why i had to use Assembly.Load to load the zip library before extracting the release, but that code is still there so...hrm

mattpannella commented 3 months ago

3.10.0 should resolve the issue. note: installing 3.10.0 is still gonna trigger the bug, but the next release after that should be good to go

krali27 commented 3 months ago

Just received the exact same error on Windows, trying to go from 3.9.1 to 3.10.0. Will this fix also fix it on Windows? (starting with the next update)

Pupdate v3.9.1 Checking for updates... A new version 3.10.1 is available. Downloading now... Download complete. E:\pupdate.zip Go to https://github.com/mattpannella/pupdate/releases/tag/3.10.1 for a change log Would you like to [i]nstall the update, [c]ontinue with the current version, or [q]uit? [i/c/q]: i Renaming E:\pupdate.exe to E:\pupdate.exe.backup Extracting E:\pupdate.zip to E:\ An error occurred: FileNotFoundException:System.IO.FileNotFoundException: File name: 'System.IO.Compression.ZipFile, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' at Pannella.Helpers.ZipExtension.ExtractToDirectory(ZipArchive zipFile, String target, IProgress`1 progress, Boolean overwrite) at Pannella.Helpers.ZipHelper.ExtractToDirectory(String zipFile, String destination, Boolean overwrite) at Pannella.Program.UpdateSelfAndRun(String directory, String[] updaterArgs)

hallem commented 2 months ago

Yeah as @mattpannella mentioned, updating from 3.9.1 to 3.10.0 is still going to trigger it. It shouldn't happen after 3.10.0 though.

mcclure commented 1 week ago

Also reproducing on Linux, for the record. I will upgrade to 3.10 manually.