electron/notarize

Error: Failed to staple your application with code: 65

naivefun opened this issue · 2 comments

I got this error with config:

module.exports = {
  packagerConfig: {
    name: "ReAPI Desktop",
    executableName: "ReAPI Desktop",
    asar: true,
    appBundleId: "com.reapi.desktop",
    protocols: [
      {
        name: "ReAPI Desktop Launch Protocol",
        schemes: ["reapi-desktop"],
      },
    ],
    osxSign: {
      identity: "xxx",
    },
    osxNotarize: {
      tool: "notarytool",
      appBundleId: "com.reapi.desktop",
      appleId: "xxx",
      appleIdPassword: "xxx",
      teamId: "xxx",
    },
  },
  rebuildConfig: {},
  makers: [
    {
      name: "@electron-forge/maker-squirrel",
      config: {},
    },
    {
      name: "@electron-forge/maker-zip",
      platforms: ["darwin"],
    },
    {
      name: "@electron-forge/maker-deb",
      config: {},
    },
    {
      name: "@electron-forge/maker-rpm",
      config: {},
    },
  ],
  publishers: [
    
  ],
};
An unhandled rejection has occurred inside Forge:
Error: Failed to staple your application with code: 65

Processing: /private/var/folders/86/3h_kf_td1698mfg5cx5t_vnm0000gn/T/electron-packager/darwin-arm64/ReAPI Desktop-darwin-arm64-72w1Yy/ReAPI Desktop.app
Properties are {
    NSURLIsDirectoryKey = 1;
    NSURLIsPackageKey = 1;
    NSURLIsSymbolicLinkKey = 0;
    NSURLLocalizedTypeDescriptionKey = Application;
    NSURLTypeIdentifierKey = "com.apple.application-bundle";
    "_NSURLIsApplicationKey" = 1;
}
Props are {
    cdhash = {length = 20, bytes = 0x02d82f0f130d23f653e9de718d5c60293a5c330c};
    digestAlgorithm = 2;
    flags = 65536;
    secureTimestamp = "2022-12-28 08:49:42 +0000";
    signingId = "com.reapi.desktop";
    teamId = K47WFKBF55;
}
JSON Data is {
    records =     (
                {
            recordName = "2/2/02d82f0f130d23f653e9de718d5c60293a5c330c";
        }
    );
}
 Headers: {
    "Content-Type" = "application/json";
}
Domain is api.apple-cloudkit.com
Response is <NSHTTPURLResponse: 0x11c9041c0> { URL: https://api.apple-cloudkit.com/database/1/com.apple.gk.ticket-delivery/production/public/records/lookup } { Status Code: 200, Headers {
    Connection =     (
        "keep-alive"
    );
    "Content-Encoding" =     (
        gzip
    );
    "Content-Type" =     (
        "application/json; charset=UTF-8"
    );
    Date =     (
        "Wed, 28 Dec 2022 08:50:43 GMT"
    );
    Server =     (
        "AppleHttpServer/3faf4ee9434b"
    );
    "Strict-Transport-Security" =     (
        "max-age=31536000; includeSubDomains;"
    );
    "Transfer-Encoding" =     (
        Identity
    );
    Via =     (
        "xrail:st53p00ic-qujn12070102.me.com:8301:22R606:grp60,631194250daa17e24277dea86cf30319:6657201a0c7ebf3e4e5ef4ec2bad51ef:sgsin8"
    );
    "X-Apple-CloudKit-Version" =     (
        "1.0"
    );
    "X-Apple-Edge-Response-Time" =     (
        254
    );
    "X-Apple-Request-UUID" =     (
        "5ef6c0fd-9250-4269-8b1a-e15ffeaca567"
    );
    "X-Responding-Instance" =     (
        "ckdatabasews:16309801:st52p63ic-qujn06040302:8201:2304B441:6bbe1d099d7a25d9fb6ae3c249ad6018fa3400a2"
    );
    "access-control-expose-headers" =     (
        "X-Apple-Request-UUID,X-Responding-Instance,Via"
    );
    "x-apple-user-partition" =     (
        63
    );
} }
Size of data is 165
JSON Response is: {
    records =     (
                {
            reason = "Record not found";
            recordName = "2/2/02d82f0f130d23f653e9de718d5c60293a5c330c";
            serverErrorCode = "NOT_FOUND";
        }
    );
}
CloudKit query for ReAPI Desktop.app (2/02d82f0f130d23f653e9de718d5c60293a5c330c) failed due to "Record not found".
Could not find base64 encoded ticket in response for 2/02d82f0f130d23f653e9de718d5c60293a5c330c
The staple and validate action failed! Error 65.
at Object.<anonymous> (/Users/peisong/dev/reapi/desktop/node_modules/@electron/notarize/lib/staple.js:22:19)
    at Generator.next (<anonymous>)
    at fulfilled (/Users/peisong/dev/reapi/desktop/node_modules/@electron/notarize/lib/staple.js:4:58)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
error Command failed with exit code 1.

I run it on github action with macOS-latest, got the same error. What's wrong I did? Thanks.

@naivefun I'm experiencing the same issue.. Were you able to fix this issue?

Fixed by following #120 (comment)