Electron-builder: Auto-updater on Mac: Error: sha512 checksum mismatch

Created on 7 Jun 2019  路  4Comments  路  Source: electron-userland/electron-builder


  • Version: 20.41.0
  • version of electron-updater: 4.0.6

  • Target: macOS

Hello! I'm getting checksum mismatch after update is downloaded. The strangest thing is that the checksum it shows does not exist anywhere (it's not the checksum shown in the latest-mac.yml for it, and it's not the one in the latest version of the app).

backlog

Most helpful comment

For checking sha512 for you app, use the node script located in this thread:
https://github.com/electron-userland/electron-builder/issues/3913

Running that in node gave us the correct sha512 value...

As for the mismatch, I want to just put my 2cents here for anyone who stumbles upon this in the future. What our issue was that the signing process was happening asynchronously. So from time to time, the signing process would take longer than expected at which point the yaml file was generated for us hence the mismatched sha512 values. So in our case, it was a race condition against build process and sign process.. We ended up using execSync in our custom sign file and now the process hangs until the childprocess(sign process) is completely finished.. This seemed to have solved our mismatched issue. Hope this helps someone.

All 4 comments

Update:
I tried to manually check the checksums... and could not verify the expected one?

I build a new version of the application and tried to verify it the following ways:

openssl dgst -sha512 my-app.dmg
sha512sum my-app.dmg
shasum -a 512 my-app.dmg

None of which gave me the result, listed in the latest-mac.yml file.

I also tried verifying using Checksum Validator which also resulted in a checksum mismatch.

For checking sha512 for you app, use the node script located in this thread:
https://github.com/electron-userland/electron-builder/issues/3913

Running that in node gave us the correct sha512 value...

As for the mismatch, I want to just put my 2cents here for anyone who stumbles upon this in the future. What our issue was that the signing process was happening asynchronously. So from time to time, the signing process would take longer than expected at which point the yaml file was generated for us hence the mismatched sha512 values. So in our case, it was a race condition against build process and sign process.. We ended up using execSync in our custom sign file and now the process hangs until the childprocess(sign process) is completely finished.. This seemed to have solved our mismatched issue. Hope this helps someone.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

In my case with electron-updater v4.3.5 problem was not with the library. I was testing library which started giving this checksum error after the upgrade. I did several builds of app and uploaded thought file must be corrupted on upload.
The problems was that each time I uploaded build files with exact the same name, and my server was caching it. As a result, I did not get the latest version of the file.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ccorcos picture ccorcos  路  3Comments

noahprince22 picture noahprince22  路  3Comments

philcockfield picture philcockfield  路  3Comments

NPellet picture NPellet  路  3Comments

iklemm picture iklemm  路  3Comments