electron / notarize

Notarize your macOS Electron Apps
MIT License
138 stars 33 forks source link

App says its notarized but is not #121

Closed andirsun closed 1 year ago

andirsun commented 2 years ago

Edited: Gatekeeper was throwing the error becuase the app had a code error from React. So after fix it all was ok.

Our CI pipeline just stops working suddenly. The library is notatrizing the app but when I try to open the app its says is not notarized: this is our code:

try {
    // Docs: https://github.com/electron/notarize#method-notarizeopts-promisevoid
    await notarize({
      tool: 'notarytool',
      appPath: `${appOutDir}/${appName}.app`,
      appleId: 'apple@webalys.com',
      // Not the account password but an App specific password
      appleIdPassword: process.env.APPLE_ID_PASSWORD,
      teamId: process.env.APPLE_TEAM_ID,
    })
    console.debug('⭐ Notarization completed ⭐')
  } catch (error) {
    console.error(`❌ Notarization error: ${error}`)
  }

Error:

"Streamline" cannot be opened because the developer cannot be verified.

image

But the library is notarizing the code.

[nextron] Packaging - please wait a moment
  • electron-builder  version=23.6.0 os=22.1.0
  • loaded configuration  file=/Users/andirsun/projects/streamline/streamline-web/electron-builder.yml
  • writing effective config  file=dist/builder-effective-config.yaml
  • packaging       platform=darwin arch=x64 electron=21.3.1 appOutDir=dist/mac-universal--x64
  • packaging       platform=darwin arch=arm64 electron=21.3.1 appOutDir=dist/mac-universal--arm64
  • packaging       platform=darwin arch=universal electron=21.3.1 appOutDir=dist/mac-universal
  • signing         file=dist/mac-universal/Streamline.app identityName=Developer ID Application: Webalys, LLC (U7XNJG59LL) identityHash=D67BA83C59353EA2BB7501103EB25119DCBDF921 provisioningProfile=none
📝 Notarizing, this may take a while...
⭐ Notarization completed ⭐
  • building        target=macOS zip arch=universal file=dist/Streamline.zip
  • building        target=DMG arch=universal file=dist/Streamline.dmg
  • Detected arm64 process, HFS+ is unavailable. Creating dmg with APFS - supports Mac OSX 10.12+
  • building block map  blockMapFile=dist/Streamline.zip.blockmap
[nextron] See `dist` directory
andirsun commented 2 years ago

Update: I tried to notarize the app manually from console but it still saying the same when tried to install: So probably is not an error with the library.

streamline-web on  dev [!⇡] is 📦 v4.0.68 via  v16.16.0
❯ xcrun notarytool submit /Users/andirsun/projects/streamline/streamline-web/dist/Streamline.dmg --keychain-profile "notary-profile" --wait
Conducting pre-submission checks for Streamline.dmg and initiating connection to the Apple notary service...
Submission ID received
  id: 960c2735-1a14-470f-9e92-96158fba24a4
Upload progress: 100,00 % (302 MB of 302 MB)
Successfully uploaded file
  id: 960c2735-1a14-470f-9e92-96158fba24a4
  path: /Users/andirsun/projects/streamline/streamline-web/dist/Streamline.dmg
Waiting for processing to complete.
Current status: Accepted.....................
Processing complete
  id: 960c2735-1a14-470f-9e92-96158fba24a4
  status: Accepted
andirsun commented 1 year ago

Edited: Gatekeeper was throwing the error becuase the app had a code error from React. So after fix it all was ok.