electron / notarize

Notarize your macOS Electron Apps
MIT License
137 stars 32 forks source link

Frequently receiving {"code":null,"output":""} as a result #125

Open summera opened 1 year ago

summera commented 1 year ago

Hello, when building for Mac I'm very frequently getting notary exceptions and the result from the notarytool is {"code":null,"output":""}. This leads to the following error output when making with Forge:

An unhandled rejection has occurred inside Forge:
Error: Failed to notarize via notarytool

at Object.<anonymous> (MY_PATH/node_modules/@electron/notarize/lib/notarytool.js:97:23)
    at Generator.next (<anonymous>)
    at fulfilled (MY_PATH/node_modules/@electron/notarize/lib/notarytool.js:4:58)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

I'm building using an appleId and appleIdPassword:

  "packagerConfig": {
    "osxSign": {},
    "osxNotarize": {
      "tool": "notarytool",
      "appleId": process.env.APPLE_ID,
      "appleIdPassword": process.env.APPLE_PASSWORD,
      "teamId": process.env.APPLE_TEAM_ID
    },
...

After I retry making enough times, it eventually works but the cycle can be very time consuming and failures are happening pretty frequently. Any help would be greatly appreciated! Thanks.

zeevl commented 1 year ago

Been dealing with the exact same thing for quite some time. The notarytool history shows it submitted, but seems stuck in "processing".

Would love some ideas on how to work around or fix!!

thomas-void0 commented 1 year ago

I have same question. But I'm worse than you.My terminal will always hang.Will not end. image

thomas-void0 commented 1 year ago

I have same question. But I'm worse than you.My terminal will always hang.Will not end. image

this questioni is sloved.Because I ignored the necessary conditions.

image

I think there should be a link here, or a template.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <!-- https://github.com/electron/electron-notarize#prerequisites -->
    <key>com.apple.security.cs.allow-jit</key>
    <true/>
    <key>com.apple.security.cs.allow-unsigned-executable-memory</key>
    <true/>
    <!-- https://github.com/electron-userland/electron-builder/issues/3940 -->
    <key>com.apple.security.cs.disable-library-validation</key>
    <true/>
  </dict>
</plist>