fastlane: [deliver] During Deliver process I get a Transporter error: Could not create the Java Virtual Machine

New Issue Checklist

Issue Description

I’m running the latest and greatest from fastlane on Xcode Server GM2. Appears to be a transporter issue. Anyone else seeing this?

WARN [2019-09-17 07:01:16.45]: [iTMSTransporter] -Djava.ext.dirs=/usr/local/itms/java/lib/ext is not supported.  Use -classpath instead.

WARN [2019-09-17 07:01:16.45]: [iTMSTransporter] Error: Could not create the Java Virtual Machine.

WARN [2019-09-17 07:01:16.45]: [iTMSTransporter] Error: A fatal exception has occurred. Program will exit.
Command executed

deliver

Complete output when running fastlane, including the stack trace and command used
 INFO [2019-09-17 07:01:03.16]: ---------------------
INFO [2019-09-17 07:01:03.16]: --- Step: deliver ---
INFO [2019-09-17 07:01:03.16]: ---------------------
INFO [2019-09-17 07:01:03.20]: Successfully loaded '/Users/optimusprime/Library/Caches/XCSBuilder/Bots/f069cf7240fd7449d69f7c92a1a251c4/Source/dod-ios/fastlane/Deliverfile' 📄

±---------------------------±----------------------------------+ | Detected Values from ‘./fastlane/Deliverfile’ | ±---------------------------±----------------------------------+ | app_identifier | com.mycompany.abc | | username | myci@gmail.com | | team_name | MyCompany, Inc | | force | true | | submit_for_review | false | | automatic_release | false | | run_precheck_before_submit | true | | skip_metadata | true | | skip_app_version_update | false | | skip_screenshots | true | ±---------------------------±----------------------------------+

INFO [2019-09-17 07:01:03.20]: Login to App Store Connect (myci@gmail.com) Reading keychain entry, because either user or password were empty Loading session from ‘/Users/optimusprime/.fastlane/spaceship/myci@gmail.com/cookie’ Available session is not valid any more. Continuing with normal login. Looking for App Store Connect Team with name My Company, Inc Looking for App Store Connect Team with ID 1234567 INFO [2019-09-17 07:01:07.45]: Login successful

±-------------------------------------±-------------------------------------------------------------------------------------------------------------+ | deliver 2.131.0 Summary | ±-------------------------------------±-------------------------------------------------------------------------------------------------------------+ | ipa | /Users/optimusprime/Library/Caches/XCSBuilder/Bots/f069cf7240fd7449d69f7c92a1a251c4/Source/dod-ios/dodv3.ipa | | screenshots_path | ./fastlane/screenshots | | metadata_path | ./fastlane/metadata | | app_version | 3.38 | | username | myci@gmail.com | | app_identifier | com.mycompany.abc | | platform | ios | | edit_live | false | | use_live_version | false | | skip_binary_upload | false | | skip_screenshots | true | | skip_metadata | true | | skip_app_version_update | false | | force | true | | overwrite_screenshots | false | | submit_for_review | false | | reject_if_possible | false | | automatic_release | false | | phased_release | false | | reset_ratings | false | | team_name | MyCompany, Inc | | dev_portal_team_id | Z123456789 | | run_precheck_before_submit | true | | precheck_default_rule_level | warn | | individual_metadata_items | [] | | ignore_language_directory_validation | false | | precheck_include_in_app_purchases | true | ±-------------------------------------±-------------------------------------------------------------------------------------------------------------+

INFO [2019-09-17 07:01:08.01]: Making sure the latest version on App Store Connect matches ‘3.38’ from the ipa file… INFO [2019-09-17 07:01:10.85]: ’3.38’ is the latest version on App Store Connect INFO [2019-09-17 07:01:12.64]: Uploading app icon… INFO [2019-09-17 07:01:14.92]: Uploading binary to App Store Connect INFO [2019-09-17 07:01:16.35]: Wrote XML data to '/tmp/591981144.itmsp’ INFO [2019-09-17 07:01:16.38]: Going to upload updated app to App Store Connect INFO [2019-09-17 07:01:16.38]: This might take a few minutes. Please don’t interrupt the script. DEBUG [2019-09-17 07:01:16.38]: /usr/local/itms/java/bin/java -Djava.ext.dirs=/usr/local/itms/java/lib/ext -XX:NewSize=2m -Xms32m -Xmx1024m -Xms1024m -Djava.awt.headless=true -Dsun.net.http.retryPost=false -jar /usr/local/itms/lib/itmstransporter-launcher.jar -m upload -u myci@gmail.com -p YourPassword -f /tmp/591981144.itmsp -t DAV -t Signiant -k 100000 2>&1 WARN [2019-09-17 07:01:16.45]: [iTMSTransporter] -Djava.ext.dirs=/usr/local/itms/java/lib/ext is not supported. Use -classpath instead.  WARN [2019-09-17 07:01:16.45]: [iTMSTransporter] Error: Could not create the Java Virtual Machine.  WARN [2019-09-17 07:01:16.45]: [iTMSTransporter] Error: A fatal exception has occurred. Program will exit.  INFO [2019-09-17 07:01:16.45]: iTunes Transporter output above ^ ERROR [2019-09-17 07:01:16.45]: The call to the iTMSTransporter completed with a non-zero exit status: 1. This indicates a failure. WARN [2019-09-17 07:01:16.45]: Lane Context: INFO [2019-09-17 07:01:16.45]: {:DEFAULT_PLATFORM=>:ios, :PLATFORM_NAME=>:ios, :LANE_NAME=>“ios appstore_release”, :BUILD_NUMBER=>“20190917065235”, :SIGH_PROFILE_PATH=>“/Users/optimusprime/Library/Caches/XCSBuilder/Bots/f069cf7240fd7449d69f7c92a1a251c4/Source/dod-ios/AppStore_com.mycompany.abc.mobileprovision”, :SIGH_PROFILE_PATHS=>[“/Users/optimusprime/Library/Caches/XCSBuilder/Bots/f069cf7240fd7449d69f7c92a1a251c4/Source/dod-ios/AppStore_com.company.abc.mobileprovision”], :SIGH_UDID=>“dc39d489-4cc0-4cae-a25f-afece2b83f57”, :SIGH_UUID=>“dc39d489-4cc0-4cae-a25f-afece2b83f57”, :SIGH_NAME=>“com.company.abc AppStore”, :SIGH_PROFILE_TYPE=>“app-store”, :IPA_OUTPUT_PATH=>“/Users/optimusprime/Library/Caches/XCSBuilder/Bots/f069cf7240fd7449d69f7c92a1a251c4/Source/myapp/myapp.ipa”, :DSYM_OUTPUT_PATH=>“/Users/optimusprime/Library/Caches/XCSBuilder/Bots/f069cf7240fd7449d69f7c92a1a251c4/Source/dod-ios/dodv3.app.dSYM.zip”, :XCODEBUILD_ARCHIVE=>“/Users/optimusprime/Library/Developer/Xcode/Archives/2019-09-17/dodv3 2019-09-17 06.52.41.xcarchive”} ERROR [2019-09-17 07:01:16.45]: Could not upload binary to App Store Connect. Check out the error above INFO [2019-09-17 07:01:16.45]: Successfully generated documentation at path '/Users/optimusprime/Library/Caches/XCSBuilder/Bots/f069cf7240fd7449d69f7c92a1a251c4/Source/dod-ios/fastlane/README.md’

±-----±--------------------------------------------------------------±------------+ | fastlane summary | ±-----±--------------------------------------------------------------±------------+ | Step | Action | Time (in s) | ±-----±--------------------------------------------------------------±------------+ | 1 | Verifying fastlane version | 0 | | 2 | default_platform | 0 | | 3 | …/Scripts/reset_simulators.sh | 0 | | 4 | Switch to ios set_build_to_time lane | 0 | | 5 | increment_build_number | 0 | | 6 | set_info_plist_value | 0 | | 7 | sigh | 2 | | 8 | gym | 469 | | 9 | curl -F dsym=@“dodv3.app.dSYM.zip” -H "x-app-license-key: AA7 | 34 | | 💥 | deliver | 13 | ±-----±--------------------------------------------------------------±------------+

DEBUG [2019-09-17 07:01:16.46]: All plugins are up to date ERROR [2019-09-17 07:01:16.46]: fastlane finished with errors

Looking for related GitHub issues on fastlane/fastlane… Search query: Could not upload binary to App Store Connect. Check out the error above

Environment

Loaded gems
Gem Version
did_you_mean 1.1.2
slack-notifier 2.3.2
atomos 0.1.3
colored2 3.1.2
nanaimo 0.2.6
xcodeproj 1.12.0
rouge 2.0.7
xcpretty 0.3.0
terminal-notifier 2.0.0
terminal-table 1.8.0
plist 3.5.0
multipart-post 2.0.0
word_wrap 1.0.0
public_suffix 2.0.5
babosa 1.0.2
colored 1.2
highline 1.7.10
commander-fastlane 4.4.6
faraday 0.15.4
http-cookie 1.0.3
faraday-cookie_jar 0.0.6
gh_inspector 1.1.3
mini_magick 4.9.5
multi_xml 0.6.0
security 0.1.3
xcpretty-travis-formatter 1.0.0
bundler 1.16.1
faraday_middleware 0.13.1
jwt 2.1.0
uber 0.1.0
declarative 0.0.10
declarative-option 0.1.0
representable 3.0.4
retriable 3.1.2
multi_json 1.13.1
signet 0.11.0
memoist 0.16.0
googleauth 0.6.7
httpclient 2.8.3
google-api-client 0.23.9
digest-crc 0.4.1
google-cloud-storage 1.16.0
emoji_regex 1.0.1
tty-cursor 0.7.0
tty-spinner 0.9.1
tty-screen 0.7.0
openssl 2.1.0
json 2.2.0
io-console 0.4.6
excon 0.66.0
rubyzip 1.2.4
CFPropertyList 3.0.1
claide 1.0.3
unf 0.1.4
domain_name 0.5.20190701
fastimage 2.1.7
unicode-display_width 1.6.0
addressable 2.7.0
os 1.0.1
psych 3.0.2
mime-types 3.3
mime-types-data 3.2019.0904
xctest_list 1.1.7
fastlane-plugin-test_center 3.6.3

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 34 (3 by maintainers)

Most upvoted comments

Here is the link to the old ITMS (XCode 10.3) in case anyone needs: https://drive.google.com/file/d/1AFHT-39yWkBf4f1eg87A_tyQWuCsRYsm/view?usp=sharing

Download, extract it, and override it to the /usr/local/itms folder.

Eventually I hope someone will help fix this into fastlane soon.

any one still seeing the issue? I am on fastlane 2.133.0 and still seeing the error:

[10:27:17]: [iTMSTransporter] -Djava.ext.dirs=/usr/local/itms/java/lib/ext is not supported.  Use -classpath instead.

[10:27:17]: [iTMSTransporter] Error: Could not create the Java Virtual Machine.

[10:27:17]: [iTMSTransporter] Error: A fatal exception has occurred. Program will exit.

[10:27:17]: iTunes Transporter output above ^
[10:27:17]: The call to the iTMSTransporter completed with a non-zero exit status: 1. This indicates a failure.

@fishercraigj Sorry, not sure about that one!

@janpio Our quick workaround was to use a (Java 8/9 compatible) version 1.11.0 of the Transporter from an old version of Application Loader, instead of version 2.0.0 - we copied the contents of Application Loader.app/Contents/itms into our itms location (which was /usr/local/itms)

Once our iOS 13 fires have been put out I’ll try and have a look at the iTMSTransporter.cmd file and see how they’re setting Java up. They’ve included Java 11 in version 2.0.0 so it should be easier to use.

Yep, running into exactly the same issue.

My understanding is that GM2’s version of iTMSTransporter uses Java 11 (which removes support for the -Djava.ext.dirs argument) whereas pilot uses Java 8 (which sets the -Djava.ext.dirs argument here)

We were still able to upload manually using the old iTMSTransporter

thanks @ungripped

I can confirm that running sudo mv /usr/local/itms /usr/local/itms.old fixes the problem.

When fiddling with the ITMS transporter at /usr/local/itms previously lots of things broke and I needed to revert the change. I tested this by first running fastlane and it delivered correctly, and then manually uploading using XCode and it did not break XCode.

For some now forgotten reason, one of our build machines had a separate version of itms installed in /usr/local which had java 11.0.2 bundled with it:

Xcode 11.2.1:

> /Applications/Xcode.app/Contents/SharedFrameworks/ContentDeliveryServices.framework/Versions/A/itms/java/bin/java -version 
openjdk version "1.8.0-u131-b11"
OpenJDK Runtime Environment (build 1.8.0-u131-b11-iTMSTransporter-b02)
OpenJDK 64-Bit Server VM (build 25.71-b02, mixed mode)

/usr/local:

> /usr/local/itms/java/bin/java -version
openjdk version "11.0.2" 2019-01-15
OpenJDK Runtime Environment 18.9 (build 11.0.2+9)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode)

Removing /usr/local/itms caused fast lane to use the iTMSTransporter bundled with Xcode instead without problems.

Running fastlane with the --verbose option will show which iTMSTransporter-version is being used.

Given that Xcode 11 is out I’m rather surprised there isn’t more urgency around this issue.

Run on latest fastlane 2.140.0 exactly the same issue

This issue will be auto-closed because there hasn’t been any activity for a few months. Feel free to open a new one if you still experience this problem 👍

FYI, I looked through the code in fastlane and it looked like a bit of work to redo transporter integration to support this xcrun approach while maintaining backward compatibility. So just to get by, I created a workaround script. If anyone else needs, you can find it here: https://github.com/dannys42/fastlane_workaround

Thanks @phonggenix you saved my day, it works!

@zolhaj - Looks like we’re both exactly on the same page. Just wish I knew the solution!