fastlane: [pilot] undefined method `id' for nil:NilClass
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
Right after successful upload to TestFlight, Fastlane throws an error: undefined method 'id' for nil:NilClass
Command executed
bundle exec fastlane run pilot
Complete output when running fastlane, including the stack trace and command used
[09:43:58]: ---------------------------------- [09:43:58]: --- Step: upload_to_testflight --- [09:43:58]: ---------------------------------- [09:43:59]: Using deprecated option: '--update_build_info_on_upload' (true) [09:43:59]: Using deprecated option: '--wait_for_uploaded_build' (No longer needed with the transition over to the App Store Connect API) [09:43:59]: Login to App Store Connect (rewqrewqrewq) [09:44:01]: Login successful [09:44:02]: Ready to upload new build to TestFlight (App: rewqrewqrewq)... [09:44:04]: Going to upload updated app to App Store Connect [09:44:04]: This might take a few minutes. Please don't interrupt the script. [09:51:16]: iTunes Transporter successfully finished its job [09:51:16]: -------------------------------------------------------------------- [09:51:16]: Successfully uploaded package to App Store Connect. It might take a few minutes until it's visible online. [09:51:16]: -------------------------------------------------------------------- [09:51:16]: Successfully uploaded the new binary to App Store Connect [09:51:16]: If you want to skip waiting for the processing to be finished, use the `skip_waiting_for_build_processing` option [09:51:16]: Waiting for processing on... app_id: rewqrewqrewq, app_version: 1.0.0, build_version: 2936, platform: IOS [09:51:17]: Read more information on why this build isn't showing up yet - https://github.com/fastlane/fastlane/issues/14997 [09:51:17]: Waiting for the build to show up in the build list - this may take a few minutes (check your email for processing issues if this continues) [09:51:47]: Waiting for the build to show up in the build list - this may take a few minutes (check your email for processing issues if this continues) [09:52:17]: Waiting for the build to show up in the build list - this may take a few minutes (check your email for processing issues if this continues) [09:52:47]: Waiting for the build to show up in the build list - this may take a few minutes (check your email for processing issues if this continues) [09:53:17]: Waiting for the build to show up in the build list - this may take a few minutes (check your email for processing issues if this continues) [09:53:48]: Waiting for the build to show up in the build list - this may take a few minutes (check your email for processing issues if this continues) [09:54:18]: Waiting for the build to show up in the build list - this may take a few minutes (check your email for processing issues if this continues) [09:54:48]: Waiting for the build to show up in the build list - this may take a few minutes (check your email for processing issues if this continues) [09:55:18]: Waiting for the build to show up in the build list - this may take a few minutes (check your email for processing issues if this continues) [09:55:48]: Waiting for the build to show up in the build list - this may take a few minutes (check your email for processing issues if this continues) [09:56:19]: Waiting for the build to show up in the build list - this may take a few minutes (check your email for processing issues if this continues) [09:56:49]: Waiting for the build to show up in the build list - this may take a few minutes (check your email for processing issues if this continues) [09:57:30]: Waiting for App Store Connect to finish processing the new build (1.0.0 - 2936) for IOS [09:58:01]: Waiting for App Store Connect to finish processing the new build (1.0.0 - 2936) for IOS [09:58:31]: Waiting for App Store Connect to finish processing the new build (1.0.0 - 2936) for IOS [09:59:02]: Waiting for App Store Connect to finish processing the new build (1.0.0 - 2936) for IOS [09:59:32]: Waiting for App Store Connect to finish processing the new build (1.0.0 - 2936) for IOS [10:00:03]: Waiting for App Store Connect to finish processing the new build (1.0.0 - 2936) for IOS [10:00:39]: Waiting for App Store Connect to finish processing the new build (1.0.0 - 2936) for IOS [10:01:19]: Waiting for App Store Connect to finish processing the new build (1.0.0 - 2936) for IOS [10:01:50]: Waiting for App Store Connect to finish processing the new build (1.0.0 - 2936) for IOS [10:02:20]: Waiting for App Store Connect to finish processing the new build (1.0.0 - 2936) for IOS [10:02:52]: Waiting for App Store Connect to finish processing the new build (1.0.0 - 2936) for IOS [10:03:26]: Waiting for App Store Connect to finish processing the new build (1.0.0 - 2936) for IOS [10:04:03]: Waiting for App Store Connect to finish processing the new build (1.0.0 - 2936) for IOS [10:04:37]: Successfully finished processing the build 1.0.0 - 2936 for IOS [10:04:37]: Build did include information for app, build beta detail and pre release version [10:04:37]: Fetching a new build with all the information needed [10:04:44]: Successfully set the changelog for build +------------------------------------+-----------------------------------------------------------------------------------------------------+ | Lane Context | +------------------------------------+-----------------------------------------------------------------------------------------------------+ | LANE_NAME | uploadToTestflight | | BUILD_NUMBER | 2936 | | SIGH_PROFILE_TYPE | development | | MATCH_PROVISIONING_PROFILE_MAPPING | {"rewqrewq"=>"match Development rewqrewqrewq"} | | IPA_OUTPUT_PATH | /Users/vagrant/git/build/rewqrewq.ipa | | DSYM_OUTPUT_PATH | /Users/vagrant/git/build/rewqrewq.app.dSYM.zip | | XCODEBUILD_ARCHIVE | /Users/vagrant/Library/Developer/Xcode/Archives/2019-08-05/rewrewq 2019-08-05 09.40.29.xcarchive | | FL_CHANGELOG | Update Dependencies | +------------------------------------+-----------------------------------------------------------------------------------------------------+ [10:04:44]: undefined method 'id' for nil:NilClass +------+-----------------------------+-------------+ | fastlane summary | +------+-----------------------------+-------------+ | Step | Action | Time (in s) | +------+-----------------------------+-------------+ | 1 | ensure_bundle_exec | 0 | | 2 | clear_derived_data | 0 | | 3 | increment_build_number | 2 | | 4 | sync_code_signing | 7 | | 5 | update_project_provisioning | 0 | | 6 | build_app | 214 | | 7 | sync_code_signing | 4 | | 8 | update_project_provisioning | 0 | | 9 | changelog_from_git_commits | 0 | | π₯ | upload_to_testflight | 1245 | +------+-----------------------------+-------------+ [10:04:44]: fastlane finished with errors Looking for related GitHub issues on fastlane/fastlane... β‘οΈ Promoting iOS app to App Store throws NoMethodError: [!] undefined method `candidate_builds' for nil:NilClass https://github.com/fastlane/fastlane/issues/15029 [open] 5 π¬ 2 weeks ago β‘οΈ [deliver] submit_build, promote build to production: undefined method `select_build' for nil:NilClass https://github.com/fastlane/fastlane/issues/13809 [open] 28 π¬ 4 days ago β‘οΈ upload_to_testflight: fails with nil in pilot/build_manager.rb:449:in `update_build_beta_details` https://github.com/fastlane/fastlane/issues/14977 [open] 23 π¬ 13 hours ago and 214 more at: https://github.com/fastlane/fastlane/search?q=undefined%20method%20%60id%27%20for%20nil&type=Issues&utf8=β π You can β + double-click on links to open them directly in your browser. bundler: failed to load command: fastlane (/Users/vagrant/.rbenv/versions/2.6.3/bin/fastlane) NoMethodError: [!] undefined method `id' for nil:NilClass /Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/fastlane-2.128.1/pilot/lib/pilot/build_manager.rb:455:in `update_build_beta_details' /Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/fastlane-2.128.1/pilot/lib/pilot/build_manager.rb:217:in `update_beta_app_meta' /Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/fastlane-2.128.1/pilot/lib/pilot/build_manager.rb:128:in `distribute' /Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/fastlane-2.128.1/pilot/lib/pilot/build_manager.rb:53:in `upload' /Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/fastlane-2.128.1/fastlane/lib/fastlane/actions/upload_to_testflight.rb:16:in `run' /Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/fastlane-2.128.1/fastlane/lib/fastlane/runner.rb:256:in `block (2 levels) in execute_action' /Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/fastlane-2.128.1/fastlane/lib/fastlane/actions/actions_helper.rb:50:in `execute_action' /Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/fastlane-2.128.1/fastlane/lib/fastlane/runner.rb:235:in `block in execute_action' /Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/fastlane-2.128.1/fastlane/lib/fastlane/runner.rb:227:in `chdir' /Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/fastlane-2.128.1/fastlane/lib/fastlane/runner.rb:227:in `execute_action' /Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/fastlane-2.128.1/fastlane/lib/fastlane/server/socket_server_action_command_executor.rb:73:in `run' /Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/fastlane-2.128.1/fastlane/lib/fastlane/server/socket_server_action_command_executor.rb:42:in `execute' /Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/fastlane-2.128.1/fastlane/lib/fastlane/server/socket_server.rb:181:in `execute_action_command' /Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/fastlane-2.128.1/fastlane/lib/fastlane/server/socket_server.rb:176:in `process_action_command' /Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/fastlane-2.128.1/fastlane/lib/fastlane/server/socket_server.rb:123:in `handle_action_command' /Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/fastlane-2.128.1/fastlane/lib/fastlane/server/socket_server.rb:86:in `parse_and_execute_command' /Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/fastlane-2.128.1/fastlane/lib/fastlane/server/socket_server.rb:62:in `block in receive_and_process_commands' /Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/fastlane-2.128.1/fastlane/lib/fastlane/server/socket_server.rb:49:in `loop' /Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/fastlane-2.128.1/fastlane/lib/fastlane/server/socket_server.rb:49:in `receive_and_process_commands' /Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/fastlane-2.128.1/fastlane/lib/fastlane/server/socket_server.rb:158:in `listen' /Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/fastlane-2.128.1/fastlane/lib/fastlane/server/socket_server.rb:38:in `start' /Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/fastlane-2.128.1/fastlane/lib/fastlane/swift_lane_manager.rb:231:in `block in start_socket_thread'
Environment
fastlane gems
Gem | Version | Update-Status |
---|---|---|
fastlane | 2.128.1 | β Up-To-Date |
Loaded fastlane plugins:
No plugins Loaded
Loaded gems
Gem | Version |
---|---|
did_you_mean | 1.3.0 |
bundler | 2.0.2 |
CFPropertyList | 3.0.0 |
public_suffix | 2.0.5 |
addressable | 2.6.0 |
atomos | 0.1.3 |
babosa | 1.0.2 |
claide | 1.0.3 |
colored | 1.2 |
colored2 | 3.1.2 |
highline | 1.7.10 |
commander-fastlane | 4.4.6 |
declarative | 0.0.10 |
declarative-option | 0.1.0 |
digest-crc | 0.4.1 |
unf_ext | 0.0.7.6 |
unf | 0.1.4 |
domain_name | 0.5.20190701 |
dotenv | 2.7.5 |
emoji_regex | 1.0.1 |
excon | 0.65.0 |
multipart-post | 2.0.0 |
faraday | 0.15.4 |
http-cookie | 1.0.3 |
faraday-cookie_jar | 0.0.6 |
faraday_middleware | 0.13.1 |
fastimage | 2.1.5 |
gh_inspector | 1.1.3 |
jwt | 2.1.0 |
memoist | 0.16.0 |
multi_json | 1.13.1 |
os | 1.0.1 |
signet | 0.11.0 |
googleauth | 0.6.7 |
httpclient | 2.8.3 |
mime-types-data | 3.2019.0331 |
mime-types | 3.2.2 |
uber | 0.1.0 |
representable | 3.0.4 |
retriable | 3.1.2 |
google-api-client | 0.23.9 |
google-cloud-env | 1.2.0 |
google-cloud-core | 1.3.0 |
google-cloud-storage | 1.16.0 |
json | 2.2.0 |
mini_magick | 4.9.5 |
multi_xml | 0.6.0 |
plist | 3.5.0 |
rubyzip | 1.2.3 |
security | 0.1.3 |
naturally | 2.2.0 |
simctl | 1.6.5 |
slack-notifier | 2.3.2 |
terminal-notifier | 2.0.0 |
unicode-display_width | 1.6.0 |
terminal-table | 1.8.0 |
tty-screen | 0.7.0 |
tty-cursor | 0.7.0 |
tty-spinner | 0.9.1 |
word_wrap | 1.0.0 |
nanaimo | 0.2.6 |
xcodeproj | 1.12.0 |
rouge | 2.0.7 |
xcpretty | 0.3.0 |
xcpretty-travis-formatter | 1.0.0 |
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 12
- Comments: 49 (13 by maintainers)
@fastlane-bot I hate you, on every issue that freak fastlane-boot appear, does not provide relevant information damn robot.
We are also seeing the same issue here.
Details of a particular CI build that failed:
The next step invoked the fastlane summary with the
testflight
marked as crashed and the following stack trace:The offending line inside
build_manager.rb
is here so that tells mebuild.build_beta_detail
is returningnil
for whatever reason.This traces back to
get_build_beta_details
onmodels/build.rb
.I wonder if we should guard against a
nil
value onbuild_manager.rb
since the only thing that really happens inside that call is patching the build to notify testers if that is enabled.Ahhhh, I replicated this! I will get a fix out for this today π I think there was an API change that we need to account for now π I will report back soon π
The issue still happen on
fastlane-2.141.0
It seems like this issue might be related to code signing π«
Have you seen our new Code Signing Troubleshooting Guide? It will help you resolve the most common code signing issues π
I still believe it is an AppStore Connect problem, but I am reopening the issue to monitor it.
@scblason It seemed like it was an issue with AppStore Connect API since I wasnβt getting it all the time but I will look into it further later today and tomorrow.
Reopening this!
Reproduced 07.02 and reproducing in every upload now fastlane-2.141.0 No changes was made during this time in upload source code, error just occurs itself
This still happens on both fastlane-2.140.0 & fastlane-2.141.0
Will look into!
Ahh this is the error that was being swallowed by the previous error.
Since we are now guarding for
nil
here the call propagates and hits thatraise
becausebuild_beta_detail
is nil.Not sure what to do here? Do we know why/how sometimes the API doesnβt return this part of the payload? If so we should address that otherwise it seems like another guard for nil will be needed on the code linked above?
What do you think?
All our builds have been having this problem β until today. At 2:07PM pacific time, it succeeded, and again at 4:07. Still Fastlane 2.141.0. π€·ββ
@joshdholtz any thoughts on this? Seems like thereβs been an uptick in these errors. Could it be due to some recent backend changes?
Seems like problem was on the Apple side: we did nothing with the build system, but now fastlane returns success. Great!