karaggeorge / electron-builder-notarize

Notarize Electron applications using electron-builder
MIT License
80 stars 20 forks source link

Env variable name validation error #24

Open lilac opened 4 months ago

lilac commented 4 months ago

When following this project's readme on setting the environment variables, electron-builder would throwing the following error, and the whole build fails.

Env vars APPLE_API_KEY, APPLE_API_KEY_ID and APPLE_API_ISSUER need to be set

The root cause is the inconsistent env variable names. This project requires APPLE_API_KEY_ISSUER but electron-builder validate against APPLE_API_ISSUER. Either one of them need change.

https://github.com/karaggeorge/electron-builder-notarize/blame/4dde50bfd63b45157bf2058fc0366d8f59ce115f/validate.js#L13

https://github.com/electron-userland/electron-builder/blob/fa6fc16040a93c6ee751a7a27ab6eeb1dbdd31a7/packages/app-builder-lib/src/macPackager.ts#L537

brrian commented 3 months ago

I recently came across this issue as well. It turns out electron-builder now supports notarization without the need for 3rd party packages.

I was able to get my app to notarize simply by having the proper env set when compiling my app via electron-builder.

necipsagiro commented 1 month ago

Hey @brrian, can you share your env set? I'm having a problem where the APPLE_TEAM_ID env variable is not being seen by notary tool.

brrian commented 1 month ago

Sorry @necipsagiro I am using APPLE_API_KEY and APPLE_API_ISSUER so I don't think I can help you with that.