-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Updater: New version is not signed by the application owner #3667
Comments
After some investigation, I think I may have found the problem. As far as I see it, the signature verification works by checking the publisher name against the subject name in the certificate. The publisher name is either given in the configuration ( Because I did not set the publisherName in the config, is was set during packaging. The problem is: It is set to the issuer name and not the subject name of the certificate. This leads to a failed verification while updating. My fix was setting the publisherName in config: "win": {
"publisherName": ["Helmut Poppen"],
"target": ["nsis"]
}, My problem is now: How do I get old versions to update? Is there any way to disable certificate validation remotely? Any ideas? |
Regarding hpop's fix about putting the publisherName in the package.json file. I found that this is a MUST. Even though the initial publication uses the certificate, any further updates will fail under Windows if this publisherName is not in the package.json file. I have seen other posts that have indicated that when they removed the publisherName that it fixed the problem. But this really doesn't seem to be the case for the latest version of Electron and Electron Builder. Either document this or fix the autoUpdater to properly handle it if the publisherName is missing. On a somewhat related note: I also noticed that my updates would also fail if I deleted the release version that I posted in github that was the same version installed. I was under the impression that all you needed was the newer release on github. This is not so. You need to maintain ALL release versions on github. Of course this is bad since you don't want users to manually downloaded outdated versions that could even have security issues. What I discovered is that although you cannot delete the older releases, you can delete the setup.exe or zip files that are in those releases. You must however keep the blockmap file. Personally I find the way this updater works rather bad. You shouldn't have to maintain any information about older versions. A properly designed updater simply looks at the version installed and the latest version available and decides to update the installed version if the published version is newer. No need to maintain information on the older versions. |
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. |
Just got this too. The publisherName remains empty and then it checks against the issuer name, not the subject. That's very unfortunate! Edit: This happens when creating the
@develar what would be the right change to make for this? |
@hpop were you able to sort this out for your old builds? I have a similar albeit a bit different issue. We had not set the publisher name as well so it picked up from the certificate which is now expired. The new certificate is now issued under a different name as our org name has changed. Now when we try to push an update signed with the new certificate the auto-update does not work and debugging that shows this error |
Honestly, I don't remember how or if I managed to fix it. Maybe this helps you: #6499 |
awesome thanks @hpop .. I had come across similar solutions.. the only problem we have is our old cert with old publisher name is expired. So can't sign apps with that.. But I suspect I will have to get/renew the cert with old publisher. |
I updated electron-builder from 20.28.4 to 20.38.5. The first update went fine for all users but if I release a new version now, I get this errors:
Sign verification failed, installer signed with incorrect certificate
Error: Error: New version 2.0.0-beta7 is not signed by the application owner
You can find the previous version here: 2.0.0-beta6
It will try to update to 2.0.0-beta7 and will fail.
Thanks for you great work!
The text was updated successfully, but these errors were encountered: