question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: Code signature at URL | did not pass validation: code failed to satisfy specified code requirement(s)

See original GitHub issue
  • Version: 20.15.1

electron-updater: v2.21.10

  • Target: Mac

After successful download of update, getting Error: Code signature at URL <path to .app> did not pass validation: code failed to satisfy specified code requirement(s)

To sign the app, we used a newly generated Developer ID application certificate as the old certificate that was used previously was expired.

What is already tried:

  • Run codesign --verify --deep --verbose=2 <path_to_app> Output:
<Path>: valid on disk
<Path>: satisfies its Designated Requirement

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:7

github_iconTop GitHub Comments

5reactions
mattdh250commented, Oct 31, 2019

Following on from my previous comment, I now understand how designated requirements work and how they can be specified to resolve the issue I ran into where auto-update was failing when the next version of our app was signed by a newly issued certificate.

As per the comment here, the only way I have found to get this working is to build an intermediate update with a custom designated requirement that covers both the original and new certificates and that is signed with the original certificate ensuring that it meets the requirements of the current version.

In practice, what you need to do to accomplish this is:

  1. Create a requirements.rqset file in the electron Build folder to store your requirements
  2. In the requirements file use a logical or so that the requirement is met if the certificate leaf matches either the original certificate or the new certificate. This will look like the following: designated => certificate leaf = “path/to/original/cert.crt” or certificate leaf = “path/to/new/cert.crt” More information about code signing requirements can be found here although I didn’t find the docs or general information on this subject on the internet to be particularly clear.
  3. Add the requirements property to the package.json in the mac settings specifying the path to the file you just created (build/requirements.rqset). This is to configure electron-builder to specify your custom requirements when calling codesign.
  4. Build and sign your app with your original certificate and update users to this version.
  5. Build the next version of your app signed with the new certificate and update from the version created in step 4 to this new version, which should now work. Note that when building this version you should not need to specific the requirements file in the package.json as that should only be necessary for the intermediate version.

This approach does have a limitation that users still can not directly update from the original version of the app to the latest version.

I hope this helps anyone that runs into this issue in the future.

0reactions
sivapaneerselvancommented, Oct 13, 2021

I have created dmg build using my old mac system with electron-updater( different apple credential developer id application - using my old system CertificateSigningRequest ). After some days I have changed my new mac system with a new apple credential and I got the build. The problem is old dmg build update not happening. Throwing error. Let me attach the error screenshot. Anyone please help me to sort out this dmg build update issue.

Changes from my end: Screenshot 2021-10-13 at 10 21 56 AM

   * I have changed both my system and apple credential.
Read more comments on GitHub >

github_iconTop Results From Across the Web

code signature in [app] not valid
I have an Electron app that uses a SQLite database, and has as a dependency the Sqlite3 npm package. I am building it...
Read more >
"Error while updating" - MacOS Monterey v12.6
Local.app/ did not pass validation: code failed to satisfy specified code requirements(s)” I've recently updated to MacOS Monterey 12.6 ...
Read more >
anyone else having an issue syncing the Neuron wallet?
Error : Code signature at URL file:///Users/username/Library/Caches/com.nervos.neuron.ShipIt/update.1IixIA3/Neuron.app/ did not pass validation: code failed ...
Read more >
no matter what keep getting "Application failed to code sign ...
Application failed codesign verification. The signature was invalid, or it was not signed with an iPhone Distribution Certificate. What do I do?
Read more >
Error Messages | Maps JavaScript API
Maps JavaScript API Error Codes for Developers and Site Owners ... If you are NOT the website owner, there are no steps you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found