JavaPackager icon indicating copy to clipboard operation
JavaPackager copied to clipboard

Notarization error: the staple and validate action failed! Error 65

Open amariottini opened this issue 1 year ago • 12 comments

I'm submitting a…

  • [ ] bug report
  • [ ] feature request
  • [X ] other

Short description of the issue/suggestion: I didn't make a new build of my application for some months. Now I have di error at the end of notarization process: "The staple and validate action failed! Error 65"

Steps to reproduce the issue/enhancement: Simply executed packageMyAppForMac task.

What is the expected behavior? Have the app notarized

What is the current behavior? These are the last lines of the log:

Executing command: /bin/sh -c cd '/Users/andrea/Projects/firmasmartcardagent/.' && 'xcrun' notarytool submit /Users/andrea/Projects/firmasmartcardagent/build/assets/firmasmartcardagent.app-notarization.zip --wait --keychain-profile notarytool-password
    Conducting pre-submission checks for firmasmartcardagent.app-notarization.zip and initiating connection to the Apple notary service...
    Submission ID received
      id: 7210bde9-0c6a-4e7f-ba16-178b06659599
    Successfully uploaded file
      id: 7210bde9-0c6a-4e7f-ba16-178b06659599
      path: /Users/andrea/Projects/firmasmartcardagent/build/assets/firmasmartcardagent.app-notarization.zip
    Waiting for processing to complete.
    
    Current status: In Progress...
    Current status: In Progress....
    Current status: In Progress.....
    Current status: In Progress......
    Current status: In Progress.......
    Current status: In Progress........
    Current status: In Progress.........
    Current status: In Progress..........
    Current status: In Progress...........
    Current status: In Progress............
    Current status: In Progress.............
    Current status: In Progress..............
    Current status: In Progress...............
    Current status: In Progress................
    Current status: In Progress.................
    Current status: In Progress..................
    Current status: In Progress...................
    Current status: In Progress....................
    Current status: In Progress.....................
    Current status: In Progress......................
    Current status: In Progress.......................
    Current status: In Progress........................
    Current status: In Progress.........................
    Current status: In Progress..........................
    Current status: In Progress...........................
    Current status: In Progress............................
    Current status: In Progress.............................
    Current status: In Progress..............................
    Current status: In Progress...............................
    Current status: In Progress................................
    Current status: Invalid.................................Processing complete
      id: 7210bde9-0c6a-4e7f-ba16-178b06659599
      status: Invalid
    
    Executing command: /bin/sh -c cd '/Users/andrea/Projects/firmasmartcardagent/.' && 'xcrun' stapler staple /Users/andrea/Projects/firmasmartcardagent/build/firmasmartcardagent/firmasmartcardagent.app
    Processing: /Users/andrea/Projects/firmasmartcardagent/build/firmasmartcardagent/firmasmartcardagent.app
    CloudKit query for firmasmartcardagent.app (2/435cb5f69466b2c10ba8cbca35cd16c6807fe1be) failed due to "Record not found".
    Could not find base64 encoded ticket in response for 2/435cb5f69466b2c10ba8cbca35cd16c6807fe1be
    The staple and validate action failed! Error 65.

I executed this command: xcrun notarytool log 7210bde9-0c6a-4e7f-ba16-178b06659599 with this result:

{
  "logFormatVersion": 1,
  "jobId": "7210bde9-0c6a-4e7f-ba16-178b06659599",
  "status": "Invalid",
  "statusSummary": "Archive contains critical validation errors",
  "statusCode": 4000,
  "archiveFilename": "firmasmartcardagent.app-notarization.zip",
  "uploadDate": "2024-09-23T06:42:42.057Z",
  "sha256": "ac02687091ec4be0e07bd79c6d966d768bf3538f803fa1c6f717c0cf7b225ab0",
  "ticketContents": null,
  "issues": [
    {
      "severity": "error",
      "code": null,
      "path": "firmasmartcardagent.app-notarization.zip/firmasmartcardagent.app/Contents/Resources/Java/libs/jna-5.8.0.jar/com/sun/jna/darwin-aarch64/libjnidispatch.jnilib",
      "message": "The binary is not signed with a valid Developer ID certificate.",
      "docUrl": "https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution/resolving_common_notarization_issues#3087721",
      "architecture": "arm64"
    },
    {
      "severity": "error",
      "code": null,
      "path": "firmasmartcardagent.app-notarization.zip/firmasmartcardagent.app/Contents/Resources/Java/libs/jna-5.8.0.jar/com/sun/jna/darwin-aarch64/libjnidispatch.jnilib",
      "message": "The signature does not include a secure timestamp.",
      "docUrl": "https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution/resolving_common_notarization_issues#3087733",
      "architecture": "arm64"
    },
    {
      "severity": "error",
      "code": null,
      "path": "firmasmartcardagent.app-notarization.zip/firmasmartcardagent.app/Contents/Resources/Java/libs/jna-5.8.0.jar/com/sun/jna/darwin-x86-64/libjnidispatch.jnilib",
      "message": "The binary is not signed.",
      "docUrl": "https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution/resolving_common_notarization_issues#3087721",
      "architecture": "x86_64"
    },
    {
      "severity": "error",
      "code": null,
      "path": "firmasmartcardagent.app-notarization.zip/firmasmartcardagent.app/Contents/Resources/Java/libs/jna-5.8.0.jar/com/sun/jna/darwin-x86-64/libjnidispatch.jnilib",
      "message": "The signature does not include a secure timestamp.",
      "docUrl": "https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution/resolving_common_notarization_issues#3087733",
      "architecture": "x86_64"
    }
  ]
}

Do you have outputs, screenshots, demos or samples which demonstrate the problem or enhancement?

What is the motivation / use case for changing the behavior?

Please tell us about your environment:

  • JavaPackager version:
  • OS version: MacOS 14.6.1
  • JDK version: 1.8
  • Build tool:
    • [ ] Maven
    • [X ] Gradle

Other information (e.g. related issues, suggestions how to fix, links for us to have context)

amariottini avatar Sep 23 '24 07:09 amariottini