Transporter crashes when uploading app for notarization

I've started to get this issue recently. As a part of the build process, my build script calls 'xcrun altool --notarize-app' command to upload application package (inside disk image - DMG) for notarization. But approximately only 1 of 3-4 attempts complete successfully, as expected. All others lead to this output:


[2020-02-07 14:30:48.602 altool[41067:2472761]  Error:
[2020-02-07 14:30:39 GMT+07:00]   INFO: Configuring logging...
[2020-02-07 14:30:39 GMT+07:00]   INFO: Logging level set to eXtreme
[2020-02-07 14:30:39 GMT+07:00]   INFO: Transporter is searching for new software components.
[2020-02-07 14:30:39 GMT+07:00]   INFO: INFO: using cached repository.xml file.
[2020-02-07 14:30:40 GMT+07:00]   INFO: Update check complete.
[2020-02-07 14:30:43 GMT+07:00]  DEBUG: Attempting refresh of configuration data from https://contentdelivery.itunes.apple.com/transporter/Defaults.properties
[2020-02-07 14:30:44 GMT+07:00]  DEBUG: Configuration refresh successful.
[2020-02-07 14:30:44 GMT+07:00]  DEBUG: Saving configuration to local path: /Users/jenkins/Library/Caches/com.apple.amp.itmstransporter/Defaults.properties
[2020-02-07 14:30:44 GMT+07:00]   INFO: iTMSTransporter : iTunes Store Transporter [2.0.0]
[2020-02-07 14:30:44 GMT+07:00]   INFO: OS identifier: Mac OS X 10.14.6 (x86_64); jvm=25.71-b02; jre=1.8.0-u131-b11-iTMSTransporter-b02
[2020-02-07 14:30:44 GMT+07:00]   INFO: Memory: [JVM] 1066M free, 1109M total, 1820M max [System] (Physical) 2774M free, 16384M total (Swap) 0 free, 0 total
[2020-02-07 14:30:44 GMT+07:00]   INFO: Client: altool 1.1 (1138)
[2020-02-07 14:30:44 GMT+07:00]   INFO: Upload mode selected.
[2020-02-07 14:30:44 GMT+07:00]  DBG-X: Memory: [JVM] 1056M free, 1109M total, 1820M max [System] (Physical) 2774M free, 16384M total (Swap) 0 free, 0 total
[2020-02-07 14:30:44 GMT+07:00]  DBG-X: Using operation named: authenticateForTransportDiscovery
[2020-02-07 14:30:44 GMT+07:00]  DBG-X: Apple'\''s web service operation input parameters:
[2020-02-07 14:30:44 GMT+07:00]  DBG-X:   parameter Application = iTMSTransporter
[2020-02-07 14:30:44 GMT+07:00]  DBG-X:   parameter BaseVersion = 1.11.0
[2020-02-07 14:30:44 GMT+07:00]  DBG-X:   parameter Client = altool
[2020-02-07 14:30:44 GMT+07:00]  DBG-X:   parameter ClientVersion = 1.1 (1138)
[2020-02-07 14:30:44 GMT+07:00]  DBG-X:   parameter OSIdentifier = Mac OS X 10.14.6 (x86_64); jvm=25.71-b02; jre=1.8.0-u131-b11-iTMSTransporter-b02
[2020-02-07 14:30:44 GMT+07:00]  DBG-X:   parameter StatisticsClientStartDateTimeZoneISO = 2020-02-07T14:30:44+07:00
[2020-02-07 14:30:44 GMT+07:00]  DBG-X:   parameter StatisticsPreviousCallDurationInSecs = 0.885600676
[2020-02-07 14:30:44 GMT+07:00]  DBG-X:   parameter TransporterArguments = -m upload -u ieo@*****.com -vp json -sessionid @env:688AD10B-A9ED-48CD-989D-4FA1854C95A3 -sharedsecret **hidden value** -f /var/folders/z9/g8tt1tzj2sqfl2v9rpb5ssb00000gp/T/3DD41C97-AECA-434B-B2B7-E0F227195813/Untitled.itmsp -indicator true -v eXtreme -Dtransporter.client=altool -Dtransporter.client.version=1.1 (1138)
[2020-02-07 14:30:44 GMT+07:00]  DBG-X:   parameter Version = 2.0.0
[2020-02-07 14:30:44 GMT+07:00]  DBG-X:   parameter iTMSTransporterMode = upload
[2020-02-07 14:30:44 GMT+07:00]   INFO: id = 20200207143044-100
[2020-02-07 14:30:44 GMT+07:00]   INFO: iTMSTransporter Correlation Key: 7f2518a3-2b0d-464e-bee2-e75722d2a56b-0001
[2020-02-07 14:30:45 GMT+07:00]  DBG-X: Apple'\''s web service operation return value:
[2020-02-07 14:30:45 GMT+07:00]  DBG-X:   parameter EnableJWTForAllCalls = false
[2020-02-07 14:30:45 GMT+07:00]  DBG-X:   parameter PreferredTransports = [HTTP, Signiant, Aspera, DAV]
[2020-02-07 14:30:45 GMT+07:00]  DBG-X:   parameter TransportHosts.Signiant = [sgr604.apple.com:44001, sgr602.apple.com:44001, sgr603.apple.com:44001, sgr601.apple.com:44001]
[2020-02-07 14:30:45 GMT+07:00]  DBG-X:   parameter SessionExpiration = 2020-02-11T07:30:45.507Z
[2020-02-07 14:30:45 GMT+07:00]  DBG-X:   parameter TransportHosts.DAV = [itmsdav.apple.com:443]
[2020-02-07 14:30:45 GMT+07:00]  DBG-X:   parameter TransportHosts.Aspera = [vgr502.apple.com:33001, vgr503.apple.com:33001, vgr504.apple.com:33001, vgr501.apple.com:33001]
[2020-02-07 14:30:45 GMT+07:00]  DBG-X:   parameter StreamingSettings = {LogStreamingEnabled=true, MultipartUploadsEnabled=true, AssetDescriptionStreamingEnabled=false}
[2020-02-07 14:30:45 GMT+07:00]   INFO: Transporter'\''s command line arguments are: -m upload -u ieo@*****.com -vp json -sessionid @env:688AD10B-A9ED-48CD-989D-4FA1854C95A3 -sharedsecret **hidden value** -f /var/folders/z9/g8tt1tzj2sqfl2v9rpb5ssb00000gp/T/3DD41C97-AECA-434B-B2B7-E0F227195813/Untitled.itmsp -indicator true -v eXtreme -Dtransporter.client=altool -Dtransporter.client.version=1.1 (1138)
[2020-02-07 14:30:45 GMT+07:00]   INFO: Examining the package at: /var/folders/z9/g8tt1tzj2sqfl2v9rpb5ssb00000gp/T/3DD41C97-AECA-434B-B2B7-E0F227195813/Untitled.itmsp
[2020-02-07 14:30:45 GMT+07:00]   INFO: Ensuring that package has well formed metadata file...
[2020-02-07 14:30:45 GMT+07:00]  DEBUG: Getting case-sensitive metadata xml filename...
[2020-02-07 14:30:45 GMT+07:00]   INFO: Gathering the list of valid files from the package ...
[2020-02-07 14:30:45 GMT+07:00]  DEBUG:   MyApp-7.1.0.0.dmg will be verified by Apple'\''s web service to determine if it is a valid file.
[2020-02-07 14:30:45 GMT+07:00]  DEBUG:   metadata.xml will be verified by Apple'\''s web service to determine if it is a valid file.
[2020-02-07 14:30:45 GMT+07:00]   INFO: Finished gathering the list of valid files from the package.
[2020-02-07 14:30:45 GMT+07:00]  DEBUG:   Case-sensitive metadata filename is: metadata.xml
[2020-02-07 14:30:45 GMT+07:00]   INFO: JSON:{"msg":{"phase":"Upload","description":"Analyzing metadata","index":0},"messageType":"VerifyProgress"}
[2020-02-07 14:30:45 GMT+07:00]   INFO: Performing authentication of package Untitled.itmsp ...
[2020-02-07 14:30:45 GMT+07:00]  DBG-X: Memory: [JVM] 1042M free, 1109M total, 1820M max [System] (Physical) 2766M free, 16384M total (Swap) 0 free, 0 total
[2020-02-07 14:30:45 GMT+07:00]   INFO: JSON:{"msg":{"phase":"Upload","count":2,"description":"Analyzing metadata","index":1},"messageType":"VerifyProgress"}
[2020-02-07 14:30:45 GMT+07:00]  DBG-X: Deflated 549 bytes to 432
[2020-02-07 14:30:45 GMT+07:00]  DBG-X: Using operation named: validateMetadata
[2020-02-07 14:30:45 GMT+07:00]  DBG-X: Apple'\''s web service operation input parameters:
[2020-02-07 14:30:45 GMT+07:00]  DBG-X:   parameter Application = iTMSTransporter
[2020-02-07 14:30:45 GMT+07:00]  DBG-X:   parameter BaseVersion = 1.11.0
[2020-02-07 14:30:45 GMT+07:00]  DBG-X:   parameter Client = altool
[2020-02-07 14:30:45 GMT+07:00]  DBG-X:   parameter ClientVersion = 1.1 (1138)
[2020-02-07 14:30:45 GMT+07:00]  DBG-X:   parameter Files = [MyApp-7.1.0.0.dmg, metadata.xml]
[2020-02-07 14:30:45 GMT+07:00]  DBG-X:   parameter Metadata = 

    <software_assets
        app_platform="osx"
        primary_bundle_identifier="com.*****">
        
            <data_file>
                <file_name>MyApp-7.1.0.0.dmg
                bff83b8f3161f617371da9707db5e28a
                68519549
            
        
    


[2020-02-07 14:30:45 GMT+07:00]  DBG-X:   parameter MetadataChecksum = f8b9df83b55eb56a4d4cd73fa13fa0ca
[2020-02-07 14:30:45 GMT+07:00]  DBG-X:   parameter MetadataCompressed = (suppressed)
[2020-02-07 14:30:45 GMT+07:00]  DBG-X:   parameter MetadataInfo = {app_platform=osx, primary_bundle_identifier=com.****, device_id=, bundle_identifier=, packageVersion=software5.9, apple_id=, asset_types=[developer-id-package], bundle_version=, bundle_short_version_string=}
[2020-02-07 14:30:45 GMT+07:00]  DBG-X:   parameter OSIdentifier = Mac OS X 10.14.6 (x86_64); jvm=25.71-b02; jre=1.8.0-u131-b11-iTMSTransporter-b02
[2020-02-07 14:30:45 GMT+07:00]  DBG-X:   parameter PackageName = Untitled.itmsp
[2020-02-07 14:30:45 GMT+07:00]  DBG-X:   parameter PackageSize = 68520098
[2020-02-07 14:30:45 GMT+07:00]  DBG-X:   parameter StatisticsClientStartDateTimeZoneISO = 2020-02-07T14:30:45+07:00
[2020-02-07 14:30:45 GMT+07:00]  DBG-X:   parameter TransporterArguments = -m upload -u ieo@*****.com -vp json -sessionid @env:688AD10B-A9ED-48CD-989D-4FA1854C95A3 -sharedsecret **hidden value** -f /var/folders/z9/g8tt1tzj2sqfl2v9rpb5ssb00000gp/T/3DD41C97-AECA-434B-B2B7-E0F227195813/Untitled.itmsp -indicator true -v eXtreme -Dtransporter.client=altool -Dtransporter.client.version=1.1 (1138)
[2020-02-07 14:30:45 GMT+07:00]  DBG-X:   parameter Version = 2.0.0
[2020-02-07 14:30:45 GMT+07:00]  DBG-X:   parameter iTMSTransporterMode = upload
[2020-02-07 14:30:45 GMT+07:00]   INFO: id = 20200207143045-048
[2020-02-07 14:30:45 GMT+07:00]   INFO: iTMSTransporter Correlation Key: 7f2518a3-2b0d-464e-bee2-e75722d2a56b-0001
[2020-02-07 14:30:46 GMT+07:00]  DBG-X: Apple'\''s web service operation return value:
[2020-02-07 14:30:46 GMT+07:00]  DBG-X:   parameter EnableJWTForAllCalls = false
[2020-02-07 14:30:46 GMT+07:00]  DBG-X:   parameter SessionExpiration = 2020-02-11T07:30:45.946Z
[2020-02-07 14:30:46 GMT+07:00]  DBG-X:   parameter MinimumFileSizeThresholdForCheckum = 104857600
[2020-02-07 14:30:46 GMT+07:00]  DBG-X:   parameter SoftwareMediaDescriptionFormat = binary
[2020-02-07 14:30:46 GMT+07:00]  DBG-X:   parameter SoftwareMediaDescriptionThresholds = {in-app-purchase-content={extensions=[pkg], size=100000000}, ccats={extensions=[pdf], size=100000000}, product-archive={extensions=[pkg], size=100000000}, developer-id-package={extensions=[zip, pkg, dmg], size=100000000}, bundle={extensions=[zip, ipa], size=100000000}, large-icon={extensions=[jpg, png, jpeg], size=100000000}}
[2020-02-07 14:30:46 GMT+07:00]  DBG-X:   parameter Success = true
[2020-02-07 14:30:46 GMT+07:00]  DBG-X:   parameter StreamingSettings = {LogStreamingEnabled=true, MultipartUploadsEnabled=true, AssetDescriptionStreamingEnabled=false}
[2020-02-07 14:30:46 GMT+07:00]  DBG-X:   parameter FilesToUpload = [metadata.xml, MyApp-7.1.0.0.dmg]
[2020-02-07 14:30:46 GMT+07:00]  DBG-X:   parameter AssetsToDescribe = []
[2020-02-07 14:30:46 GMT+07:00]  DBG-X:   parameter CPUToken = bfb71ad1-fe8d-4934-8938-6837aadd634f/1581060646403
[2020-02-07 14:30:46 GMT+07:00]  DBG-X:   parameter Checksums = {MyApp-7.1.0.0.dmg=bff83b8f3161f617371da9707db5e28a}
[2020-02-07 14:30:46 GMT+07:00]  DBG-X:   parameter FileSizes = {MyApp-7.1.0.0.dmg=68519549}
[2020-02-07 14:30:46 GMT+07:00]  DBG-X:   parameter ProviderNameForToken = *****
[2020-02-07 14:30:46 GMT+07:00]   INFO: The list of files requested for upload by Apple is: [metadata.xml, MyApp-7.1.0.0.dmg].  These are the files that will be uploaded.
[2020-02-07 14:30:46 GMT+07:00]   INFO: Nothing to describe for media analysis of assets
[2020-02-07 14:30:46 GMT+07:00]  DBG-X: Memory: [JVM] 1042M free, 1109M total, 1820M max [System] (Physical) 2767M free, 16384M total (Swap) 0 free, 0 total
[2020-02-07 14:30:46 GMT+07:00]  DBG-X: Using operation named: lookupTransportDiagnostic
[2020-02-07 14:30:46 GMT+07:00]  DBG-X: Apple'\''s web service operation input parameters:
[2020-02-07 14:30:46 GMT+07:00]  DBG-X:   parameter Application = iTMSTransporter
[2020-02-07 14:30:46 GMT+07:00]  DBG-X:   parameter BaseVersion = 1.11.0
[2020-02-07 14:30:46 GMT+07:00]  DBG-X:   parameter Client = altool
[2020-02-07 14:30:46 GMT+07:00]  DBG-X:   parameter ClientVersion = 1.1 (1138)
[2020-02-07 14:30:46 GMT+07:00]  DBG-X:   parameter OSIdentifier = Mac OS X 10.14.6 (x86_64); jvm=25.71-b02; jre=1.8.0-u131-b11-iTMSTransporter-b02
[2020-02-07 14:30:46 GMT+07:00]  DBG-X:   parameter StatisticsClientStartDateTimeZoneISO = 2020-02-07T14:30:46+07:00
[2020-02-07 14:30:46 GMT+07:00]  DBG-X:   parameter TransporterArguments = -m upload -u ieo@*****.com -vp json -sessionid @env:688AD10B-A9ED-48CD-989D-4FA1854C95A3 -sharedsecret **hidden value** -f /var/folders/z9/g8tt1tzj2sqfl2v9rpb5ssb00000gp/T/3DD41C97-AECA-434B-B2B7-E0F227195813/Untitled.itmsp -indicator true -v eXtreme -Dtransporter.client=altool -Dtransporter.client.version=1.1 (1138)
[2020-02-07 14:30:46 GMT+07:00]  DBG-X:   parameter Version = 2.0.0
[2020-02-07 14:30:46 GMT+07:00]  DBG-X:   parameter iTMSTransporterMode = upload
[2020-02-07 14:30:46 GMT+07:00]   INFO: id = 20200207143046-301
[2020-02-07 14:30:46 GMT+07:00]   INFO: iTMSTransporter Correlation Key: 7f2518a3-2b0d-464e-bee2-e75722d2a56b-0001
[2020-02-07 14:30:46 GMT+07:00]  DBG-X: Apple'\''s web service operation return value:
[2020-02-07 14:30:46 GMT+07:00]  DBG-X:   parameter AsperaLoggingLevel = OFF
[2020-02-07 14:30:46 GMT+07:00]  DBG-X:   parameter EnableJWTForAllCalls = false
[2020-02-07 14:30:46 GMT+07:00]  DBG-X:   parameter SigniantLoggingLevel = OFF
[2020-02-07 14:30:46 GMT+07:00]  DBG-X:   parameter SessionExpiration = 2020-02-11T07:30:46.697Z
[2020-02-07 14:30:46 GMT+07:00]  DBG-X:   parameter StreamingSettings = {LogStreamingEnabled=true, MultipartUploadsEnabled=true, AssetDescriptionStreamingEnabled=false}
[2020-02-07 14:30:46 GMT+07:00]  DBG-X: Using operation named: createTestReservation
[2020-02-07 14:30:46 GMT+07:00]  DBG-X: Apple'\''s web service operation input parameters:
[2020-02-07 14:30:46 GMT+07:00]  DBG-X:   parameter Application = iTMSTransporter
[2020-02-07 14:30:46 GMT+07:00]  DBG-X:   parameter BaseVersion = 1.11.0
[2020-02-07 14:30:46 GMT+07:00]  DBG-X:   parameter Client = altool
[2020-02-07 14:30:46 GMT+07:00]  DBG-X:   parameter ClientVersion = 1.1 (1138)
[2020-02-07 14:30:46 GMT+07:00]  DBG-X:   parameter fileDescriptions = ( one FileDescription )
[2020-02-07 14:30:46 GMT+07:00]  DBG-X:   parameter iTMSTransporterMode = upload
[2020-02-07 14:30:46 GMT+07:00]  DBG-X:   parameter NewPackageName = http-transport-diagnostic-20200207143046-Asia/Tomsk-484.itmsp
[2020-02-07 14:30:46 GMT+07:00]  DBG-X:   parameter OSIdentifier = Mac OS X 10.14.6 (x86_64); jvm=25.71-b02; jre=1.8.0-u131-b11-iTMSTransporter-b02
[2020-02-07 14:30:46 GMT+07:00]  DBG-X:   parameter TransporterArguments = -m upload -u ieo@*****.com -vp json -sessionid @env:688AD10B-A9ED-48CD-989D-4FA1854C95A3 -sharedsecret **hidden value** -f /var/folders/z9/g8tt1tzj2sqfl2v9rpb5ssb00000gp/T/3DD41C97-AECA-434B-B2B7-E0F227195813/Untitled.itmsp -indicator true -v eXtreme -Dtransporter.client=altool -Dtransporter.client.version=1.1 (1138)
[2020-02-07 14:30:46 GMT+07:00]  DBG-X:   parameter Username = ieo@*****.com
[2020-02-07 14:30:46 GMT+07:00]  DBG-X:   parameter Version = 2.0.0
[2020-02-07 14:30:46 GMT+07:00]   INFO: id = 20200207143046-843
[2020-02-07 14:30:47 GMT+07:00]   INFO: iTMSTransporter Correlation Key: 7f2518a3-2b0d-464e-bee2-e75722d2a56b-0001
[2020-02-07 14:30:48 GMT+07:00]  DBG-X: Apple'\''s web service operation return value:
[2020-02-07 14:30:48 GMT+07:00]  DBG-X:   parameter EnableJWTForAllCalls = false
[2020-02-07 14:30:48 GMT+07:00]  DBG-X:   parameter Reservations = ( one Reservation )
[2020-02-07 14:30:48 GMT+07:00]  DBG-X:   parameter SessionExpiration = 2020-02-11T07:30:47.996Z
[2020-02-07 14:30:48 GMT+07:00]  DBG-X:   parameter StreamingSettings = {MultipartUploadsEnabled=true, AssetDescriptionStreamingEnabled=false, LogStreamingEnabled=true}
[2020-02-07 14:30:48 GMT+07:00]  DBG-X:   parameter Success = true
[2020-02-07 14:30:48 GMT+07:00]  ERROR: There was a general exception while executing
[2020-02-07 14:30:48 GMT+07:00]  ERROR: An exception has occurred: Invalid prefix or suffix
[2020-02-07 14:30:48 GMT+07:00]  DEBUG: java.lang.IllegalArgumentException: Invalid prefix or suffix
    at java.nio.file.TempFileHelper.generatePath(TempFileHelper.java:63)
    at java.nio.file.TempFileHelper.create(TempFileHelper.java:127)
    at java.nio.file.TempFileHelper.createTempFile(TempFileHelper.java:161)
    at java.nio.file.Files.createTempFile(Files.java:897)
    at com.apple.transporter.transport.http.impl.ObjectStoreTransport.transmitFilesForRequest(ObjectStoreTransport.java:455)
    at com.apple.transporter.transport.http.impl.ObjectStoreTransport.performDiagnostic(ObjectStoreTransport.java:435)
    at com.apple.transporter.transport.TransportByPodPolicy.performDiagnostic(TransportByPodPolicy.java:205)
    at com.apple.transporter.operation.Upload.performDiagnosticForTransport(Upload.java:474)
    at com.apple.transporter.operation.Upload.performUploadRequest(Upload.java:283)
    at com.apple.transporter.operation.Upload.performUploadRequest(Upload.java:129)
    at com.apple.transporter.operation.Upload.performRequest(Upload.java:1268)
    at com.apple.transporter.operation.Verify.execute(Verify.java:120)
    at com.apple.transporter.Application.reallyBegin(Application.java:224)
    at com.apple.transporter.Application.begin(Application.java:114)
    at com.apple.transporter.osgi.TransporterService.start(TransporterService.java:87)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.apple.transporter.starter.TransporterStarter.runService(TransporterStarter.java:476)
    at com.apple.transporter.starter.TransporterStarter.runTransporterService(TransporterStarter.java:450)
    at com.apple.transporter.starter.TransporterStarter.start(TransporterStarter.java:188)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.apple.transporter.bootstrap.BootstrapperPhase2.runStartable(BootstrapperPhase2.java:355)
    at com.apple.transporter.bootstrap.BootstrapperPhase2.runStarter(BootstrapperPhase2.java:317)
    at com.apple.transporter.bootstrap.BootstrapperPhase2.start(BootstrapperPhase2.java:130)
    at com.apple.transporter.bootstrap.BootstrapperPhase1.startOSGiFramework(BootstrapperPhase1.java:321)
    at com.apple.transporter.bootstrap.BootstrapperPhase1.bootstrap(BootstrapperPhase1.java:99)
    at com.apple.transporter.bootstrap.BootstrapperPhase1.bootstrap(BootstrapperPhase1.java:59)
    at com.apple.transporter.launcher.Launcher.launchBootstrapper(Launcher.java:37)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.apple.transporter.launcher.Application.start(Application.java:212)
    at com.apple.transporter.launcher.Application.main(Application.java:642)

[2020-02-07 14:30:48 GMT+07:00]  DBG-X: Returning 1
2020-02-07 14:30:48.603 altool[41067:2472761]  Out:
2020-02-07 14:30:48.696 altool[41067:2472692] *** Error: There was a general exception while executing
2020-02-07 14:30:48.696 altool[41067:2472692] *** Error: An exception has occurred: Invalid prefix or suffix



It looks like altool crashes and my build script is also interrupted. More specifically the crash happens in Apple Transporter tool used by altool.

Has anyone run into the same problem? Any ideas how to troubleshoot this issue?

Accepted Reply

After failed to find a solution (nothing suggested like change user/wifi/etc. helped, I've even reinstalled clear osx, since anyway planned to do that), I've end up with old good debugging. Can't say it was easy as I have no idea about java programming but with some luck I've figured out exact issue.
Apprently iTMSTransporter code uses user timezone to generate temprorary file name, so if your timezone have splash, it will fail in a most silly manner. In my case it was "Asia/Barnaul" and the file name it was trying to generate was something like "http-blabla-timestamp-Asia/Barnaul-something.ext' which apparently is wrong and java library code has explicit check to fail on names like that, which it does.
So, you can try to change your timezone to something like UTC (I actually did't try that as I wanted more solid solution)
Or you can hack a bit iTMSTransporter launcher script to explicitly set timezone for the application.
here that workaround I've used:
add line

DEFAULT_JVM_OPTIONS="-Duser.timezone=UTC${DEFAULT_JVM_OPTIONS:+ $DEFAULT_JVM_OPTIONS}"

into file

iTMSTransporter
just before
JAVA_EXECUTABLE=${JVM_EXECUTABLE}


that file located at

/Applications/Xcode.app/Contents/SharedFrameworks/ContentDeliveryServices.framework/Versions/A/itms/bin
for XCode

and

/Applications/Transporter.app/Contents/itms/bin
for Transporter.

I am not sure if it is only one place where it has such bug in generation of temp files but hope so.
Bug is reported with id: FB7613148

Replies

First things first, please file a bug about this. Even if you are doing something completely wrong,

altool
should not bail out with a meaningless diagnostic.

Please post your bug number, just for the record.

As to what’s causing this, my first step in investigating problems like this is to rule out potential environmental factors:

  • Create a dummy test app, notarise that, and see if it fails at the same rate.

  • Try notarising from a different network (if you’re at home, try work; if you’re at work, try home).

  • Try creating a new user on you Mac.

  • Try a different Mac entirely (I use a Mac-on-Mac VM to run tests like this).

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Thanks for reply, Quinn!

I filed a bug about this via Apple FeedbackAssistant, bug number is 7579597.


I'll try to rule out potential factors, but so far I was unable to reproduce this by manually executing the corresponding command.

Probably this only happens when command is run automatically by Jenkins build agent on macOS.

Probably this only happens when command is run automatically by Jenkins build agent on macOS.

Ah, that makes it tricky. I’m not an expert on Jenkins but I’m pretty sure I’ve seen other folks run

altool
from that environment. You might want to ask this via the Jenkins support channel. It’s likely that you’ll find someone with direct experience with this.

Also, looking at the backtrace of the

altool
crash, it’s seems like this this is related to creating temporary files:
[2020-02-07 14:30:48 GMT+07:00]  DEBUG: java.lang.IllegalArgumentException: Invalid prefix or suffix  
    at java.nio.file.TempFileHelper.generatePath(TempFileHelper.java:63)  
    at java.nio.file.TempFileHelper.create(TempFileHelper.java:127)  
    at java.nio.file.TempFileHelper.createTempFile(TempFileHelper.java:161)  
    at java.nio.file.Files.createTempFile(Files.java:897)

You might want to check out how Jenkins sets up the environment for temporary files versus how Terminal does that.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Same happens for me with both xcode and transporter (manually initiated submission to appstoreconnect) with 99% failure rate.

By “manually initiated submission” do you mean that you’re running

altool
from the Terminal?

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

I mean, I'm submitting an .ipa to appstoreconnect via regular app GUI ("Distribute App..." in Xcode Organizer, "Deliver" in Transporter). Interesting enough, Application Loader worked fine.

Interesting. Clearly that shouldn’t crash )-: If you create a new user (using System Preferences > Users & Groups) and repeat this test as that user, does it work?

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Hello eskimo! I have same issue during last 1-2 month. Not only I, but also 3 my friends have same issue. We have tried: change wi-fi hotspot, create new mac user, reboot mac, use transporter and altool, different apps, different mac's. Last times it's almost unable to upload app. Really 99.9% of failure tries. Do you have more ideas what we can try? Please help! Sometimes it takes 2-3 days to upload some new archive to appstoreconnect because of this issue.

Bummer. Unfortunately I don’t have much experience with uploading to App Store Connect (as opposed to the notary service, which I have a lot of experience with). My only advice is that you contact App Store Connect Support.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

We have the same problem, waiting for a solution...

The same issue. 100% reproducible on upload iOS/macOS/tvOS apps to the AppStore. It does not matter what I use: Transporter or Organizer app.

The same error. I can't upload my app for 2 days.

Please, refer to my answer on SO to see if it works for you: https://stackoverflow.com/a/60521035/3908065

You are Merlin and this is some kind of magic 🙂)) Thanks! It works! Perfect!

After failed to find a solution (nothing suggested like change user/wifi/etc. helped, I've even reinstalled clear osx, since anyway planned to do that), I've end up with old good debugging. Can't say it was easy as I have no idea about java programming but with some luck I've figured out exact issue.
Apprently iTMSTransporter code uses user timezone to generate temprorary file name, so if your timezone have splash, it will fail in a most silly manner. In my case it was "Asia/Barnaul" and the file name it was trying to generate was something like "http-blabla-timestamp-Asia/Barnaul-something.ext' which apparently is wrong and java library code has explicit check to fail on names like that, which it does.
So, you can try to change your timezone to something like UTC (I actually did't try that as I wanted more solid solution)
Or you can hack a bit iTMSTransporter launcher script to explicitly set timezone for the application.
here that workaround I've used:
add line

DEFAULT_JVM_OPTIONS="-Duser.timezone=UTC${DEFAULT_JVM_OPTIONS:+ $DEFAULT_JVM_OPTIONS}"

into file

iTMSTransporter
just before
JAVA_EXECUTABLE=${JVM_EXECUTABLE}


that file located at

/Applications/Xcode.app/Contents/SharedFrameworks/ContentDeliveryServices.framework/Versions/A/itms/bin
for XCode

and

/Applications/Transporter.app/Contents/itms/bin
for Transporter.

I am not sure if it is only one place where it has such bug in generation of temp files but hope so.
Bug is reported with id: FB7613148