fastlane: [pilot] fails to upload build to TestFlight using api key after iTMSTransporter auto updated to version 3.0.0 with `An exception has occurred: issuerId is required` error
New Issue Checklist
- Updated fastlane to the latest version
- I read the Contribution Guidelines
- I read docs.fastlane.tools
- I searched for existing GitHub issues
Issue Description
Today fastlane run pilot
on one of our build runners started to exit with error An exception has occurred: issuerId is required
while other runners are seem to be ok. After some investigation we have found out that:
- “Good” runners have
[Transporter Warning Output]: Your version of iTMSTransporter will be updated in approximately 6 days.
message in pilot’s log - iTMSTransporter’s version on “good” runners is 2.3.0
- iTMSTransporter’s version on problem runner is 3.0.0
- Deleting
/Users/user/Library/Caches/com.apple.amp.itmstransporter
on problem runner reverts iTMSTransporter’s version to 2.3.0 and fixes the problem
It seems that upcoming iTMSTransporter auto update will break all our fastlane pilot
builds in a week.
Command executed
fastlane run pilot api_key_path:"/Users/some_user/work/api.json" skip_waiting_for_build_processing:"true" ipa:"/Users/some_user/work/build.ipa" changelog:"super feature"
Complete output when running fastlane, including the stack trace and command used
Get started using a Gemfile for fastlane https://docs.fastlane.tools/getting-started/ios/setup/#use-a-gemfile
-------------------
--- Step: pilot ---
-------------------
Creating authorization token for App Store Connect API
Ready to upload new build to TestFlight (App: 1567545467)...
Going to upload updated app to App Store Connect
This might take a few minutes. Please don't interrupt the script.
Transporter transfer failed.
There was a general exception while executing
An exception has occurred: issuerId is required
[iTMSTransporter] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[iTMSTransporter] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[iTMSTransporter] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[iTMSTransporter] at java.base/java.lang.reflect.Method.invoke(Unknown Source)
[iTMSTransporter] at com.apple.transporter.bootstrap.BootstrapperPhase1.bootstrap(BootstrapperPhase1.java:107)
[iTMSTransporter] at com.apple.transporter.bootstrap.BootstrapperPhase1.bootstrap(BootstrapperPhase1.java:78)
[iTMSTransporter] at com.apple.transporter.launcher.Launcher.launchBootstrapper(Launcher.java:37)
[iTMSTransporter] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[iTMSTransporter] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[iTMSTransporter] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[iTMSTransporter] at java.base/java.lang.reflect.Method.invoke(Unknown Source)
[iTMSTransporter] at com.apple.transporter.launcher.Application.start(Application.java:450)
[iTMSTransporter] at com.apple.transporter.launcher.Application.main(Application.java:947)
[iTMSTransporter]
[iTMSTransporter] <main> DBG-X: Returning 1
iTunes Transporter output above ^
There was a general exception while executing
An exception has occurred: issuerId is required
Return status of iTunes Transporter was 1: There was a general exception while executing
An exception has occurred: issuerId is required
The call to the iTMSTransporter completed with a non-zero exit status: 1. This indicates a failure.
[!] Error uploading ipa file:
Environment
✅ fastlane environment ✅
Stack
Key | Value |
---|---|
OS | 12.5 |
Ruby | 2.6.8 |
Bundler? | false |
Git | git version 2.37.1 |
Installation Source | /usr/local/bin/fastlane |
Host | macOS 12.5 (21G72) |
Ruby Lib Dir | /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib |
OpenSSL Version | LibreSSL 2.8.3 |
Is contained | false |
Is homebrew | false |
Is installed via Fabric.app | false |
Xcode Path | /Applications/Xcode-13.2.1.app/Contents/Developer/ |
Xcode Version | 13.2.1 |
Swift Version | 5.5.2 |
System Locale
Variable | Value | |
---|---|---|
LANG | en_US.UTF-8 | ✅ |
LC_ALL | en_US.UTF-8 | ✅ |
LANGUAGE |
fastlane files:
No Fastfile found
No Appfile found
fastlane gems
Gem | Version | Update-Status |
---|---|---|
fastlane | 2.210.1 | ✅ Up-To-Date |
Loaded fastlane plugins:
No plugins Loaded
Loaded gems
Gem | Version |
---|---|
did_you_mean | 1.3.0 |
atomos | 0.1.3 |
CFPropertyList | 2.3.6 |
claide | 1.1.0 |
colored2 | 3.1.2 |
nanaimo | 0.3.0 |
rexml | 3.2.5 |
xcodeproj | 1.22.0 |
rouge | 2.0.7 |
xcpretty | 0.3.0 |
terminal-notifier | 2.0.0 |
unicode-display_width | 1.8.0 |
terminal-table | 1.8.0 |
plist | 3.6.0 |
public_suffix | 4.0.7 |
addressable | 2.8.0 |
multipart-post | 2.0.0 |
word_wrap | 1.0.0 |
optparse | 0.1.1 |
tty-screen | 0.8.1 |
tty-cursor | 0.7.1 |
tty-spinner | 0.9.3 |
artifactory | 3.0.15 |
babosa | 1.0.4 |
colored | 1.2 |
highline | 2.0.3 |
commander | 4.6.0 |
excon | 0.92.4 |
faraday-em_http | 1.0.0 |
faraday-em_synchrony | 1.0.0 |
faraday-excon | 1.1.0 |
faraday-httpclient | 1.0.1 |
faraday-multipart | 1.0.4 |
faraday-net_http | 1.0.1 |
faraday-net_http_persistent | 1.2.0 |
faraday-patron | 1.0.0 |
faraday-rack | 1.0.0 |
faraday-retry | 1.0.3 |
ruby2_keywords | 0.0.5 |
faraday | 1.10.0 |
unf_ext | 0.0.8.2 |
unf | 0.1.4 |
domain_name | 0.5.20190701 |
http-cookie | 1.0.5 |
faraday-cookie_jar | 0.0.7 |
faraday_middleware | 1.2.0 |
fastimage | 2.2.6 |
gh_inspector | 1.1.3 |
json | 2.1.0 |
mini_magick | 4.11.0 |
naturally | 2.2.1 |
rubyzip | 2.3.2 |
security | 0.1.3 |
xcpretty-travis-formatter | 1.0.1 |
dotenv | 2.7.6 |
bundler | 1.17.2 |
simctl | 1.6.8 |
jwt | 2.4.1 |
uber | 0.1.0 |
declarative | 0.0.20 |
trailblazer-option | 0.1.2 |
representable | 3.2.0 |
retriable | 3.1.2 |
mini_mime | 1.1.2 |
memoist | 0.16.2 |
multi_json | 1.15.0 |
os | 1.1.4 |
signet | 0.17.0 |
googleauth | 1.2.0 |
httpclient | 2.8.3 |
webrick | 1.4.4 |
google-apis-core | 0.7.0 |
google-apis-playcustomapp_v1 | 0.10.0 |
google-apis-androidpublisher_v3 | 0.25.0 |
google-cloud-env | 1.6.0 |
google-cloud-errors | 1.2.0 |
google-cloud-core | 1.6.0 |
google-apis-iamcredentials_v1 | 0.13.0 |
google-apis-storage_v1 | 0.18.0 |
rake | 12.3.3 |
digest-crc | 0.6.4 |
google-cloud-storage | 1.37.0 |
emoji_regex | 3.2.3 |
jmespath | 1.6.1 |
aws-partitions | 1.609.0 |
aws-eventstream | 1.2.0 |
aws-sigv4 | 1.5.1 |
aws-sdk-core | 3.131.3 |
aws-sdk-kms | 1.58.0 |
aws-sdk-s3 | 1.114.0 |
forwardable | 1.2.0 |
logger | 1.3.0 |
date | 2.0.0 |
stringio | 0.0.2 |
ipaddr | 1.2.2 |
openssl | 2.1.2 |
zlib | 1.0.0 |
mutex_m | 0.1.0 |
ostruct | 0.1.0 |
strscan | 1.0.0 |
io-console | 0.4.7 |
fileutils | 1.1.0 |
etc | 1.0.1 |
libxml-ruby | 3.2.1 |
psych | 3.1.0 |
generated on: 2022-10-13
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 121
- Comments: 109 (7 by maintainers)
Commits related to this issue
- chore: attempt to align with new ios appstore requirements https://github.com/fastlane/fastlane/issues/20741 — committed to GetStream/stream-video-js by santhoshvai 2 years ago
- fix: broken react native auto deployment (#34) * chore: attempt to increase compile sdk in the jwt module * chore: attempt to align with new ios appstore requirements https://github.com/fastlan... — committed to GetStream/stream-video-js by santhoshvai 2 years ago
- ci: Fix failing TestFlight upload Use a workaround suggested in https://github.com/fastlane/fastlane/issues/20741. Fixes GH-2309 — committed to getsentry/sentry-cocoa by philipphofmann 2 years ago
- ci: Fix TestFlight upload with workaround (#2311) Use a workaround suggested in https://github.com/fastlane/fastlane/issues/20741. Fixes GH-2309 — committed to getsentry/sentry-cocoa by philipphofmann 2 years ago
- [hotfix] Fix ITMS upload bug https://github.com/fastlane/fastlane/issues/20741 — committed to nkalupahana/baseline by nkalupahana 2 years ago
- ci: Set ITMSTRANSPORTER_FORCE_ITMS_PACKAGE_UPLOAD to true Per fastlane/fastlane#20741, iTMSTransporter v3.0.0 appears to have broken package uploads without this flag. This is leading to iOS deploym... — committed to StoDevX/AAO-React-Native by rye 2 years ago
- ci: unset ITMSTRANSPORTER_FORCE_ITMS_PACKAGE_UPLOAD Per fastlane/fastlane#20741, iTMSTransporter is working correctly and does not require this workaround for updated versions of Xcode and fastlane. — committed to StoDevX/AAO-React-Native by drewvolz a year ago
I had the same problem.
In my environment, the upload was successful after setting the following environment variables.
Set the environment in the shell or shell script:
or set it on the command only:
It worked for me.
I used this combination:
👍 Xcode 13.4.1 - uploaded with
ITMSTRANSPORTER_FORCE_ITMS_PACKAGE_UPLOAD=true
before upload 👎 Xcode 13.4.1 - fail to upload withoutITMSTRANSPORTER_FORCE_ITMS_PACKAGE_UPLOAD=true
👎 Xcode 14.0.1 - fail with
ITMSTRANSPORTER_FORCE_ITMS_PACKAGE_UPLOAD=true
before upload 👍 Xcode 14.0.1 - uploaded withoutITMSTRANSPORTER_FORCE_ITMS_PACKAGE_UPLOAD=true
fastlane 2.210.1
Same on bitrise. Add this to your Env vars:
I do wonder why Apple keeps constantly breaking their build tools… Android has no such problem and has been stable for years.
Clearing the cache in the path helped us:
/Users/<username>/Library/Caches/com.apple.amp.itmstransporter
base on my test, this update works
I am using Xcode 14.1 Fastlane 2.211.0
and explicitly setting
ENV['ITMSTRANSPORTER_FORCE_ITMS_PACKAGE_UPLOAD'] = 'false'
in Fastfile fixed the issue for me.ITMSTRANSPORTER_FORCE_ITMS_PACKAGE_UPLOAD=true failed on Xcode 14
[05:59:38]: Could not determine the package’s bundle ID. The package is missing an Info.plist or the CFBundlePackageType is not ‘APPL’ or ‘FMWK’. Unable to validate your application. (-21017) На 13ом без флага An exception has occurred: issuerId is required [11:05:50]: [iTMSTransporter] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [11:05:50]: [iTMSTransporter] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [11:05:50]: [iTMSTransporter] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [11:05:50]: [iTMSTransporter] at java.base/java.lang.reflect.Method.invoke(Unknown Source) [11:05:50]: [iTMSTransporter] at com.apple.transporter.bootstrap.BootstrapperPhase1.bootstrap(BootstrapperPhase1.java:107) [11:05:50]: [iTMSTransporter] at com.apple.transporter.bootstrap.BootstrapperPhase1.bootstrap(BootstrapperPhase1.java:78) [11:05:50]: [iTMSTransporter] at com.apple.transporter.launcher.Launcher.launchBootstrapper(Launcher.java:37) [11:05:50]: [iTMSTransporter] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [11:05:50]: [iTMSTransporter] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [11:05:50]: [iTMSTransporter] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [11:05:50]: [iTMSTransporter] at java.base/java.lang.reflect.Method.invoke(Unknown Source) [11:05:50]: [iTMSTransporter] at com.apple.transporter.launcher.Application.start(Application.java:450) [11:05:50]: [iTMSTransporter] at com.apple.transporter.launcher.Application.main(Application.java:947) [11:05:50]: [iTMSTransporter] [11:05:50]: [iTMSTransporter] [2022-10-18 11:05:50 MSK] <main> DBG-X: Returning 1 [11:05:50]: iTunes Transporter output above ^
@Lascorbe You can take a look in code, I didn’t found any other doc. https://github.com/fastlane/fastlane/search?q=ITMSTRANSPORTER_FORCE_ITMS_PACKAGE_UPLOAD My guess is that the cli invocation differs .
Remember to remove the
ENV['ITMSTRANSPORTER_FORCE_ITMS_PACKAGE_UPLOAD'] = 'true'
now once you have upgraded, or you will face this error instead:Thanks
Alright - I traced and modified some code to make the upload work for my case, but very brute force like and inelegant due to me not knowing exactly how things work.
Summary of my findings (for my broken case - using Xcode 13 and API Key):
ITMSTRANSPORTER_FORCE_ITMS_PACKAGE_UPLOAD
totrue
because this causes, for reasons unknown, validate to fail in the transporter - similar to what’s discussed in #19572ITMSTRANSPORTER_FORCE_ITMS_PACKAGE_UPLOAD
totrue
, we’re back to the originalissuerId is required
; the reason this error is happening seems to be because the following command is being executed:xcrun iTMSTransporter -m upload -jwt YourJWT -assetFile /var/folders/sg/c0tzk72j58s8pbfbzxpp1hkc0000gn/T/74acf81b-00e8-46d0-b5e4-b434e1e2b194.ipa -k 100000 2>&1
Notice the above command references a JWT (which I don’t use) and doesn’t pass in the
apiKey
.Curiously, the original code above doesn’t use the apiKey at all. I made the above modifications to test my theory, and with those changes, things ALMOST work. I hard commented out the JWT bits because for some reason,
jwt
is not nil or empty - it’s set toYourJWT
🤷 .With the above code changes, I still get the following error:
Looking up the Transporter docs, I found this:
So, I manually created a
<user_home>/private_keys
folder and copied the p8 AuthKey to that location in the format specified, and lo and behold, everything works. I’ve tried creating aprivate_keys
folder in the “current working directory” from where I ran fastlane and copy the keys there, but that doesn’t seem to work.Phew. Those are a lot of things that I needed to change to make things work - hopefully provides enough clues for a proper fix.
(Updated the diff - the original diff was wrong - I updated the wrong
build_upload_command
method. Whoopsie)Same issue here with:
Could not determine the package’s bundle ID. The package is missing an Info.plist or the CFBundlePackageType is not ‘APPL’ or ‘FMWK’. Unable to validate your application.
Solved by settings
ITMSTRANSPORTER_FORCE_ITMS_PACKAGE_UPLOAD = false
We had a similar problem with our CI pipeline, but with a different error message. The above workaround with the environment variable solved it. Just commenting because I randomly stumbled into this issue and search engines couldn’t find it
We found it handy to introduce the workaround suggested above directly in our Fastfile, just before
pilot
Note: I managed to make it work again in Azure Devops by updating the Agent Specification to macOS-12. Here, Xcode 14 is the default.
Confirmed – now using this crude workaround to support both Xcode 13 and 14:
Any chance this workaround could be integrated in Fastlane?
confirmed adding
to the Fastfile fixes it
setting
ENV['ITMSTRANSPORTER_FORCE_ITMS_PACKAGE_UPLOAD'] = 'true'
in fastlane build job fixed the issue in Xcode 13.2.1 for usfor anyone using CircleCI, just adding the
ITMSTRANSPORTER_FORCE_ITMS_PACKAGE_UPLOAD=true
on Project Settings -> Environment Variables.Resolved the issue for me
After updating to the latest version of fastlane and ensuring that
upload_to_testflight
is using Xcode 14, it’s working again.I did some digging on my own. Looks like it’s a bug inside iTMSTransporter 3.0.0. Fastlane passes
-jwt
param to iTMSTransporter and that param is mutually exclusive with-apiKey
and-apiIssurer
.Also it’s Java NPE, but not arguments parsing error:
I don’t know how long will it take for Apple to provide a fix, so maybe there’s an option to force
pilot
to usealtool
instead ofiTMSTransporter
? AFAIK,altool
is the default choice when using Xcode 14.Can anyone confirm that Transporter is now working fine without any of the above mentioned workarounds? 🤔
Because I have noticed that all our Testflight uploads (more than 10+ builds) from 27th Oct onwards started succeeding again ✅, without adding any flags or workarounds to our fastlane
pilot
command (= didn’t touch anything on our side).What I noticed is:
3.0.0.28
❌ , which is exactly the version this issue was reported with as mentioned above3.0.0.30
✅Our build nodes are using Xcode
13.4.1
and macOS12.4
and fastlane2.204.3
(not the latest). Verified the transporter version by runningpilot --verbose
command.If I unterstand some things :
Here I understand that fastlane can use altool OR iTMSTransporter. So if you got these kinds of log :
That you use Altool. And so,
And
So, I wonder, there is 2 solutions, right ? One with iTMSTransporter and one with Altool.
-> How to froce fastlane to use iTMSTransporter ? -> What is the correct way with Altool ?
Sorry if my question is dumb 😦
Edit : For our project we keepts that configuration after the bump discovery :
ENV['ITMSTRANSPORTER_FORCE_ITMS_PACKAGE_UPLOAD'] = 'true'
app_identifier: config["app_identifier"]
to upload_to_testflightI Don’t know if theese thing are all needed, but now it’s deploy.
@victortumble The issue is not only 14.0.1, this also happens on 13.3.1.
hey guys the
ITMSTRANSPORTER_FORCE_ITMS_PACKAGE_UPLOAD
isn’t need.The issue is due to XCode version don’t use 14.0.1 it is a beta version, it doesn’t have the Transporter on it.
Use 14.1.0 this will fix the uploading but not the sign problem, in my case just by using the pod plugin cocoapods-pod-sign as described on the issue Xcode 14 build failed with manual code sign and app resource bundles resolved the issue once for all.
Oh and using the configuration from this comment to upload to testflight.
Thanks to @honkmaster I was able to get it up and running. If anyone is updating the yaml files, change
to
This issue popped up with our nightly builds. Using Xcode 13 + fastlane 2.210.1. Setting the env var
ITMSTRANSPORTER_FORCE_ITMS_PACKAGE_UPLOAD=true
got us past theAn exception has occurred: issuerId is required
error.However, hitting a different error after that. These automated builds were working fine until last night
We are currently manually uploading the IPA using Transporter and it uploads to TestFlight fine, so the IPA should be valid.
yes, same issue here
Yes, we haven´t applied any of the solutions mentioned on this thread (we were temporarily using altool directly instead of fastlane) and I can confirm fastlane is working again with the iTMSTransporter 3.0.0.30.
Hi We have couple of projects one with Xcode13 and other is with Xcode14. When we set the ENV[‘ITMSTRANSPORTER_FORCE_ITMS_PACKAGE_UPLOAD’] = ‘true’ in Fastfile, able to upload app from Xcode13 project where as it is failing with Xcode14. It seems it is not checking Xcode version to use either iTMS Transporter or altool to deploy app.
If you are using circleci, you can add the environment variable in the project setting.
This is a bug in the fastlane code. Do not set
ITMSTRANSPORTER_FORCE_ITMS_PACKAGE_UPLOAD
environment variable when using alltool.We’re seeing the exact same issue. Updating to Xcode 14 isn’t an option for us at the moment and we’re also now stuck manually uploading via Transporter. Everything was working yesterday until it just wasn’t.
we use 2.210.0, it works great without ITMSTRANSPORTER_FORCE_ITMS_PACKAGE_UPLOAD=true
where I should put this ENV in the fastline file? I try in the
then build fail:
Should I put it before the pilot() section like this:
I can confirm that
env: ITMSTRANSPORTER_FORCE_ITMS_PACKAGE_UPLOAD: true
in our github fastlane workflow fixed the issue.@victortumble XCode 14.1 is the solution?
Ah you’re right! I forgot to remove the env flag! Built again and it worked 👍
You can also add the variable using something like this, or adding this to your CI/CD env manager:
@stherold use this soltion then: https://github.com/fastlane/fastlane/issues/20741#issuecomment-1286699506
@thiagoguardado - see my post above - if you are using Xcode13 and apikey, then you can try to apply my patch. I’ve pinned our fastlane to version 2.210.1 and apply the patch during our build process.
e.g.:
Then I’d try to build the app with Xcode 13, but to upload with Xcode 14. You can use
xcode_select
just beforeupload_to_testflight
.Our current state after perusing this thread:
ITMSTRANSPORTER_FORCE_ITMS_PACKAGE_UPLOAD=true
results in “An error occurred while trying to call the requested method validateAssets” as a few others have observed.com.apple.amp.itmstransporter
library cache is ineffectual.We’d like to try the above-mentioned
FASTLANE_ITUNES_TRANSPORTER_PATH
workaround but cannot find any way to get back to a pre 3.0.0 version. All our build agents have auto-updated. Is anyone aware of a way to grab an older version (I believe we were on something like 2.3.x)?@Rakchon-n I haven’t tried the other workaround mentioned in this thread (i.e.
ITMSTRANSPORTER_FORCE_ITMS_PACKAGE_UPLOAD
). In my Fastfile,build_app
has already been using Xcode 14, but notupload_to_testflight
.Ok, so we’ve uncovered my issue above, and sorry this isn’t exactly matching the original report here, but is related and possible that others could hit both issues if they’re as dumb as us.
We have been using the wrong ios app ID in fastlane pilot for months (for an app that doesn’t even exist in our account). It seems fastlane/apple transporter has never checked/failed for this incorrect ID, and perhaps has matched based on the bundle ID.
I’m assuming Apple has also fixed this to now check and error, and released this fix at the same time they released the iTMSTransporter error that we all hit yesterday. So that’s why I felt things were too coincidental. Oops…
The env variable worked for one of our apps (dev env) today, but our production env app receives this error:
Obviously we have been pilot’ing this app up until today, and have checked that there’s nothing pending in itunesconnect.
EDIT: I’ve ran it twice, and still get the same response. The two apps are under the same account/org and both run via our bitrise. Our dev is making it there no problem, but production is failing with this. So I presume I can rule out account/permission issues on my end. Perhaps some bug on Apple’s side? 🤔
2nd EDIT: Still failing for our production app a day later. Perhaps this is more of an Apple issue, than fastlane though.