fastlane: Mac notarization is failing on team-id
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
The “fastlane notarize” tool is failing on setting the correct team-id.
The same command has previously worked for several months until recently.
I have tried setting FASTLANE_ITC_TEAM_ID in the .env file, but with no luck.
Command executed
bundle exec fastlane run notarize package:"$EXPORT_PATH/$PRODUCT_NAME.zip" bundle_id:"$PRODUCT_BUNDLE_IDENTIFIER" print_log:"true" verbose:"true"
Complete output when running fastlane, including the stack trace and command used
[✔] 🚀
[23:00:40]: ----------------------
[23:00:40]: --- Step: notarize ---
[23:00:40]: ----------------------
[23:00:40]: $ xcrun notarytool submit PATH/TO/APP.zip --output-format json --wait --apple-id APPLE_ID --password PASS --team-id
[23:00:40]: ▸ Error: Missing value for '--team-id <team-id>'
[23:00:40]: ▸ Usage: notarytool submit <options>
[23:00:40]: ▸ See 'notarytool submit --help' for more information.
[23:00:40]: Exit status of command 'xcrun notarytool submit PATH/TO/APP.zip--output-format json --wait --apple-id APPLE_ID --password PASS --team-id ' was 64 instead of 0.
Error: Missing value for '--team-id <team-id>'
Usage: notarytool submit <options>
See 'notarytool submit --help' for more information.
[23:00:40]: Error polling for notarization info: Error: Missing value for '--team-id <team-id>'
Usage: notarytool submit <options>
See 'notarytool submit --help' for more information.
Looking for related GitHub issues on fastlane/fastlane...
Found no similar issues. To create a new issue, please visit:
https://github.com/fastlane/fastlane/issues/new
Run `fastlane env` to append the fastlane environment to your issue
bundler: failed to load command: fastlane (/Users/radu/.rbenv/versions/2.6.5/bin/fastlane)
JSON::ParserError: [!] 859: unexpected token at 'Error: Missing value for '--team-id <team-id>'
Usage: notarytool submit <options>
See 'notarytool submit --help' for more information.
'
/Users/radu/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/json-2.6.1/lib/json/common.rb:216:in `parse'
/Users/radu/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/json-2.6.1/lib/json/common.rb:216:in `parse'
/Users/radu/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.198.1/fastlane/lib/fastlane/actions/notarize.rb:85:in `notarytool'
/Users/radu/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.198.1/fastlane/lib/fastlane/actions/notarize.rb:42:in `run'
/Users/radu/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.198.1/fastlane/lib/fastlane/runner.rb:263:in `block (2 levels) in execute_action'
/Users/radu/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.198.1/fastlane/lib/fastlane/actions/actions_helper.rb:69:in `execute_action'
/Users/radu/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.198.1/fastlane/lib/fastlane/runner.rb:255:in `block in execute_action'
/Users/radu/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.198.1/fastlane/lib/fastlane/runner.rb:229:in `chdir'
/Users/radu/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.198.1/fastlane/lib/fastlane/runner.rb:229:in `execute_action'
/Users/radu/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.198.1/fastlane/lib/fastlane/one_off.rb:42:in `run'
/Users/radu/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.198.1/fastlane/lib/fastlane/one_off.rb:22:in `execute'
/Users/radu/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.198.1/fastlane/lib/fastlane/commands_generator.rb:225:in `block (2 levels) in run'
/Users/radu/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/commander-4.6.0/lib/commander/command.rb:187:in `call'
/Users/radu/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/commander-4.6.0/lib/commander/command.rb:157:in `run'
/Users/radu/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/commander-4.6.0/lib/commander/runner.rb:444:in `run_active_command'
/Users/radu/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.198.1/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:117:in `run!'
/Users/radu/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/commander-4.6.0/lib/commander/delegates.rb:18:in `run!'
/Users/radu/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.198.1/fastlane/lib/fastlane/commands_generator.rb:353:in `run'
/Users/radu/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.198.1/fastlane/lib/fastlane/commands_generator.rb:42:in `start'
/Users/radu/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.198.1/fastlane/lib/fastlane/cli_tools_distributor.rb:122:in `take_off'
/Users/radu/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/fastlane-2.198.1/bin/fastlane:23:in `<top (required)>'
/Users/radu/.rbenv/versions/2.6.5/bin/fastlane:23:in `load'
/Users/radu/.rbenv/versions/2.6.5/bin/fastlane:23:in `<top (required)>'
<details>
<pre> [REPLACE THIS WITH YOUR INFORMATION] </pre>
</details>
Environment
✅ fastlane environment ✅
Stack
| Key | Value |
|---|---|
| OS | 11.6.1 |
| Ruby | 2.6.5 |
| Bundler? | false |
| Git | git version 2.29.2 |
| Installation Source | ~/.rbenv/versions/2.6.5/bin/fastlane |
| Host | macOS 11.6.1 (20G224) |
| Ruby Lib Dir | ~/.rbenv/versions/2.6.5/lib |
| OpenSSL Version | OpenSSL 1.1.1d 10 Sep 2019 |
| Is contained | false |
| Is homebrew | false |
| Is installed via Fabric.app | false |
| Xcode Path | /Applications/Xcode.app/Contents/Developer/ |
| Xcode Version | 13.1 |
| Swift Version | 5.5.1 |
System Locale
| Variable | Value | |
|---|---|---|
| LANG | en_US.UTF-8 | ✅ |
| LC_ALL | en_US.UTF-8 | ✅ |
| LANGUAGE |
fastlane files:
`./fastlane/Fastfile`
# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
# https://docs.fastlane.tools/actions
#
# For a list of all available plugins, check out
#
# https://docs.fastlane.tools/plugins/available-plugins
#
# Uncomment the line if you want fastlane to automatically update itself
# update_fastlane
default_platform(:mac)
platform :mac do
desc "Notarize App"
lane :notarize do
end
end
`./fastlane/Appfile`
# app_identifier("[[APP_IDENTIFIER]]") # The bundle identifier of your app
# apple_id("[[APPLE_ID]]") # Your Apple email address
# For more information about the Appfile, see:
# https://docs.fastlane.tools/advanced/#appfile
fastlane gems
| Gem | Version | Update-Status |
|---|---|---|
| fastlane | 2.198.1 | ✅ Up-To-Date |
Loaded fastlane plugins:
No plugins Loaded
Loaded gems
| Gem | Version |
|---|---|
| did_you_mean | 1.3.0 |
| rouge | 2.0.7 |
| xcpretty | 0.3.0 |
| terminal-notifier | 2.0.0 |
| terminal-table | 1.8.0 |
| plist | 3.6.0 |
| 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 |
| faraday-cookie_jar | 0.0.7 |
| gh_inspector | 1.1.3 |
| mini_magick | 4.11.0 |
| naturally | 2.2.1 |
| security | 0.1.3 |
| xcpretty-travis-formatter | 1.0.1 |
| dotenv | 2.7.6 |
| bundler | 1.17.2 |
| simctl | 1.6.8 |
| retriable | 3.1.2 |
| memoist | 0.16.2 |
| multi_json | 1.15.0 |
| signet | 0.16.0 |
| googleauth | 1.1.0 |
| httpclient | 2.8.3 |
| google-apis-core | 0.4.1 |
| google-apis-playcustomapp_v1 | 0.6.0 |
| rexml | 3.2.5 |
| nanaimo | 0.3.0 |
| colored2 | 3.1.2 |
| claide | 1.0.3 |
| CFPropertyList | 3.0.5 |
| atomos | 0.1.3 |
| xcodeproj | 1.21.0 |
| unicode-display_width | 1.8.0 |
| public_suffix | 4.0.6 |
| excon | 0.89.0 |
| ruby2_keywords | 0.0.5 |
| faraday-rack | 1.0.0 |
| faraday-patron | 1.0.0 |
| faraday-net_http_persistent | 1.2.0 |
| faraday-net_http | 1.0.1 |
| faraday-httpclient | 1.0.1 |
| faraday-excon | 1.1.0 |
| faraday-em_synchrony | 1.0.0 |
| faraday-em_http | 1.0.0 |
| faraday | 1.8.0 |
| unf_ext | 0.0.8 |
| unf | 0.1.4 |
| domain_name | 0.5.20190701 |
| http-cookie | 1.0.4 |
| faraday_middleware | 1.2.0 |
| fastimage | 2.2.5 |
| json | 2.6.1 |
| rubyzip | 2.3.2 |
| jwt | 2.3.0 |
| trailblazer-option | 0.1.2 |
| declarative | 0.0.20 |
| uber | 0.1.0 |
| representable | 3.1.1 |
| mini_mime | 1.1.2 |
| os | 1.1.4 |
| webrick | 1.7.0 |
| google-apis-androidpublisher_v3 | 0.14.0 |
| rake | 13.0.6 |
| digest-crc | 0.6.4 |
| google-apis-storage_v1 | 0.10.0 |
| google-apis-iamcredentials_v1 | 0.8.0 |
| google-cloud-errors | 1.2.0 |
| google-cloud-env | 1.5.0 |
| google-cloud-core | 1.6.0 |
| google-cloud-storage | 1.35.0 |
| emoji_regex | 3.2.3 |
| aws-eventstream | 1.2.0 |
| aws-sigv4 | 1.4.0 |
| aws-partitions | 1.540.0 |
| jmespath | 1.4.0 |
| aws-sdk-core | 3.124.0 |
| aws-sdk-kms | 1.52.0 |
| aws-sdk-s3 | 1.109.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 |
| mini_portile2 | 2.4.0 |
| nokogiri | 1.10.9 |
| psych | 3.1.0 |
generated on: 2021-12-08
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 15 (7 by maintainers)
I experienced the same issue. Notarization was working prior to upgrading the
fastlanegem in my project and then it stopped. I was able to resolve it, posting my experience here in case it helps you or others searching in the future.I had to set the
FL_NOTARIZE_ASC_PROVIDERenvironment variable to my apple developer team ID.I came to this conclusion by looking at the notarize docs where I found the
asc_providerconfiguration option. Further, looking at the source of thenotarizeaction I found that the--team-idargument was being set fromasc_provider. By settingasc_providerto myteam_ideverything started working.It looks like this problem was introduced by https://github.com/fastlane/fastlane/pull/19235 which added support for
notary tool.This issue is still outstanding.
@ospfranco it’s a bug. By default if no parameter is passed it takes a itd_team_id. https://github.com/fastlane/fastlane/blob/5c1621dd7edd9338fa1222efcc18fea6480aa85f/fastlane/lib/fastlane/actions/notarize.rb#L256
it should instead use a WWRTeamID (team_id from Appfile). https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution/customizing_the_notarization_workflow
It’s quite simple fix, maybe in free time i will do this.
The fact that a parameter called
asc_provideris actually used as ateam_idis so confusing… if it wasn’t for this issue, I would have never figure it outWill add to my list to look into! Unless somebody else wants to tackle 😊 I got quite a bit on my list right now 😉
It seems like this issue should be marked as a regression and fixed, not sure how to reopen @joshdholtz.
@johndbritton You are a lifesaver! I struggled so much with this, your solution works like a charm!