gon icon indicating copy to clipboard operation
gon copied to clipboard

notarize: Failed to detect code 1519

Open neilpa opened this issue 5 years ago • 3 comments

On a CI build today I hit a case where error 1519 wasn't detected and ignored.

==> 🍎  Notarizing...
    Path: **** 
    Submitting file for notarization...
    Submitted. Request UUID: ******
    Waiting for results from Apple. This can take minutes to hours.
    Error notarizing
  
❗️ Error notarizing:
 
1 error occurred:
 	* 1 error occurred:
	* Could not find the RequestUUID. (1519)

Looking at the code nothing obvious jumps out as to what went wrong. Unless there's some failure path where it didn't get wrapped in an Errors object so the type conversion failed. This is on version 0.2.3.

neilpa avatar May 11 '20 22:05 neilpa

Yikes. This is going to be kind of impossible to debug unless you can make this reliable. That's weird!

mitchellh avatar May 12 '20 01:05 mitchellh

I just started to see the same error (seems to be fixed now), luckily I was running with logs so here's and abstract of them in case it helps

 [2020/05/12 09:19:58.128] 2020-05-12T05:19:58.128-0400 [INFO]  notarize: notarization info command finished: output="<?xml version="1.0" encoding="UTF-8"?>
 [2020/05/12 09:19:58.128] <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 [2020/05/12 09:19:58.128] <plist version="1.0">
 [2020/05/12 09:19:58.128] <dict>
 [2020/05/12 09:19:58.128] 	<key>os-version</key>
 [2020/05/12 09:19:58.128] 	<string>10.14.6</string>
 [2020/05/12 09:19:58.128] 	<key>product-errors</key>
 [2020/05/12 09:19:58.128] 	<array>
 [2020/05/12 09:19:58.128] 		<dict>
 [2020/05/12 09:19:58.128] 			<key>code</key>
 [2020/05/12 09:19:58.128] 			<integer>1519</integer>
 [2020/05/12 09:19:58.128] 			<key>message</key>
 [2020/05/12 09:19:58.128] 			<string>Could not find the RequestUUID.</string>
 [2020/05/12 09:19:58.128] 			<key>userInfo</key>
 [2020/05/12 09:19:58.128] 			<dict>
 [2020/05/12 09:19:58.128] 				<key>NSLocalizedDescription</key>
 [2020/05/12 09:19:58.128] 				<string>Could not find the RequestUUID.</string>
 [2020/05/12 09:19:58.128] 				<key>NSLocalizedFailureReason</key>
 [2020/05/12 09:19:58.128] 				<string>Apple Services operation failed.</string>
 [2020/05/12 09:19:58.128] 				<key>NSLocalizedRecoverySuggestion</key>
 [2020/05/12 09:19:58.128] 				<string>Could not find the RequestUUID.</string>
 [2020/05/12 09:19:58.128] 			</dict>
 [2020/05/12 09:19:58.128] 		</dict>
 [2020/05/12 09:19:58.128] 	</array>
 [2020/05/12 09:19:58.128] 	<key>tool-path</key>
 [2020/05/12 09:19:58.128] 	<string>/Applications/Xcode11.3.0.app/Contents/SharedFrameworks/ContentDeliveryServices.framework/Versions/A/Frameworks/AppStoreService.framework</string>
 [2020/05/12 09:19:58.128] 	<key>tool-version</key>
 [2020/05/12 09:19:58.128] 	<string>4.00.1181</string>
 [2020/05/12 09:19:58.128] </dict>
 [2020/05/12 09:19:58.128] </plist>
 [2020/05/12 09:19:58.128] " err="exit status 239"

gssbzn avatar May 12 '20 10:05 gssbzn

One other possibility is a data consistency issue on the Apple end. That is, the info here succeeds, it breaks out of the loop and we immediately call info again here which returns a "stale" 1519. There's no sleep between these calls, and given the distributed/async nature of notarization it seems rather plausible.

It would be straightforward to collapse the two loops to avoid that possibility. Both cases would also handle the -19000 no network error as well. I'll follow up with a PR.

neilpa avatar May 12 '20 14:05 neilpa