fastlane: update_project_provisioning failed
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
fastlane finished with errors:
/Library/Ruby/Gems/2.6.0/gems/fastlane-2.205.1/fastlane/lib/fastlane/actions/update_project_provisioning.rb:73:in `block (2 levels) in run': [!] undefined method `[]' for nil:NilClass (NoMethodError)
Command executed
update_project_provisioning(
xcodeproj: "#{PROJECT_NAME}.xcodeproj",
target_filter: PROJECT_NAME,
code_signing_identity: "iPhone Distribution",
profile: CERTIFICATES_PATH+"AppStore_#{APP_IDENTIFIER}.mobileprovision"
)
Complete output when running fastlane, including the stack trace and command used
$ fastlane test [✔] 🚀 [13:13:07]: fastlane detected a Gemfile in the current directory [13:13:07]: However, it seems like you didn't use `bundle exec` [13:13:07]: To launch fastlane faster, please use [13:13:07]: [13:13:07]: $ bundle exec fastlane test [13:13:07]: [13:13:07]: Get started using a Gemfile for fastlane https://docs.fastlane.tools/getting-started/ios/setup/#use-a-gemfile [13:13:09]: ------------------------------ [13:13:09]: --- Step: default_platform --- [13:13:09]: ------------------------------ [13:13:09]: Driving the lane 'ios test' 🚀 [13:13:10]: ----------------------------------------- [13:13:10]: --- Step: update_project_provisioning --- [13:13:10]: ----------------------------------------- [13:13:10]: You’re updating provisioning profiles directly in your project, but have you considered easier ways to do code signing? [13:13:10]: https://docs.fastlane.tools/codesigning/GettingStarted/ [13:13:10]: Parsing mobile provisioning profile from '/Users/***/AppStore_***.mobileprovision' [13:13:10]: Going to update project '***.xcodeproj' with UUID [13:13:10]: Updating target ***... [13:13:10]: Updating configuration Debug... +------------------+----------+ | Lane Context | +------------------+----------+ | DEFAULT_PLATFORM | ios | | PLATFORM_NAME | ios | | LANE_NAME | ios test | +------------------+----------+±-----±----------------------------±------------+ | fastlane summary | ±-----±----------------------------±------------+ | Step | Action | Time (in s) | ±-----±----------------------------±------------+ | 💥 | update_project_provisioning | 0 | ±-----±----------------------------±------------+
[13:13:10]: fastlane finished with errors
Looking for related GitHub issues on fastlane/fastlane…
➡️ select_team’: undefined method `[]’ for nil:NilClass (NoMethodError) https://github.com/fastlane/fastlane/issues/20086 [closed] 17 💬 3 weeks ago
➡️ [spaceship][tunes] fix ‘block in select_team’: [!] undefined method `[]’ for nil:NilClass https://github.com/fastlane/fastlane/pull/20088 [closed] 5 💬 3 weeks ago
➡️ [supply] added support for refresh tokens as an authentication method https://github.com/fastlane/fastlane/pull/16414 [open] 10 💬 23 May 2020
and 554 more at: https://github.com/fastlane/fastlane/search?q=undefined method `[]' for nil&type=Issues&utf8=✓
🔗 You can ⌘ + double-click on links to open them directly in your browser. /Library/Ruby/Gems/2.6.0/gems/fastlane-2.205.1/fastlane/lib/fastlane/actions/update_project_provisioning.rb:73:in
block (2 levels) in run': [!] undefined method
[]’ for nil:NilClass (NoMethodError) from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.205.1/fastlane/lib/fastlane/actions/update_project_provisioning.rb:57:ineach' from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.205.1/fastlane/lib/fastlane/actions/update_project_provisioning.rb:57:in
block in run’ from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.205.1/fastlane/lib/fastlane/actions/update_project_provisioning.rb:49:ineach' from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.205.1/fastlane/lib/fastlane/actions/update_project_provisioning.rb:49:in
run’ from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.205.1/fastlane/lib/fastlane/runner.rb:263:inblock (2 levels) in execute_action' from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.205.1/fastlane/lib/fastlane/actions/actions_helper.rb:69:in
execute_action’ from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.205.1/fastlane/lib/fastlane/runner.rb:255:inblock in execute_action' from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.205.1/fastlane/lib/fastlane/runner.rb:229:in
chdir’ from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.205.1/fastlane/lib/fastlane/runner.rb:229:inexecute_action' from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.205.1/fastlane/lib/fastlane/runner.rb:157:in
trigger_action_by_name’ from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.205.1/fastlane/lib/fastlane/fast_file.rb:159:inmethod_missing' from Fastfile:54:in
block (2 levels) in parsing_binding’ from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.205.1/fastlane/lib/fastlane/lane.rb:33:incall' from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.205.1/fastlane/lib/fastlane/runner.rb:49:in
block in execute’ from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.205.1/fastlane/lib/fastlane/runner.rb:45:inchdir' from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.205.1/fastlane/lib/fastlane/runner.rb:45:in
execute’ from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.205.1/fastlane/lib/fastlane/lane_manager.rb:47:incruise_lane' from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.205.1/fastlane/lib/fastlane/command_line_handler.rb:36:in
handle’ from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.205.1/fastlane/lib/fastlane/commands_generator.rb:110:inblock (2 levels) in run' from /Library/Ruby/Gems/2.6.0/gems/commander-4.6.0/lib/commander/command.rb:187:in
call’ from /Library/Ruby/Gems/2.6.0/gems/commander-4.6.0/lib/commander/command.rb:157:inrun' from /Library/Ruby/Gems/2.6.0/gems/commander-4.6.0/lib/commander/runner.rb:444:in
run_active_command’ from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.205.1/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:124:inrun!' from /Library/Ruby/Gems/2.6.0/gems/commander-4.6.0/lib/commander/delegates.rb:18:in
run!’ from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.205.1/fastlane/lib/fastlane/commands_generator.rb:354:inrun' from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.205.1/fastlane/lib/fastlane/commands_generator.rb:43:in
start’ from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.205.1/fastlane/lib/fastlane/cli_tools_distributor.rb:122:intake_off' from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.205.1/bin/fastlane:23:in
<top (required)>’ from /usr/local/bin/fastlane:25:inload' from /usr/local/bin/fastlane:25:in
<main>’
Environment
✅ fastlane environment ✅
Stack
Key Value OS 12.3.1 Ruby 2.6.8 Bundler? false Git git version 2.33.1 Installation Source /usr/local/bin/fastlane Host macOS 12.3.1 (21E258) 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.app/Contents/Developer/ Xcode Version 13.3.1 Swift Version 5.6 System Locale
Variable Value LANG en_US.UTF-8 ✅ LC_ALL en_US.UTF-8 ✅ LANGUAGE fastlane gems
Gem | Version | Update-Status |
---|---|---|
fastlane | 2.205.1 | ✅ Up-To-Date |
Loaded fastlane plugins:
No plugins Loaded
Loaded gems
Gem | Version |
---|---|
did_you_mean | 1.4.0 |
rouge | 2.0.7 |
xcpretty | 0.3.0 |
terminal-notifier | 2.0.0 |
plist | 3.5.0 |
addressable | 2.8.0 |
multipart-post | 2.0.0 |
word_wrap | 1.0.0 |
optparse | 0.1.1 |
tty-cursor | 0.7.1 |
tty-spinner | 0.9.3 |
artifactory | 3.0.15 |
colored | 1.2 |
highline | 2.0.3 |
commander | 4.6.0 |
faraday_middleware | 1.0.0 |
gh_inspector | 1.1.3 |
mini_magick | 4.10.1 |
rubyzip | 2.3.0 |
security | 0.1.3 |
xcpretty-travis-formatter | 1.0.0 |
simctl | 1.6.8 |
google-apis-playcustomapp_v1 | 0.2.0 |
uber | 0.1.0 |
declarative-option | 0.1.0 |
representable | 3.0.4 |
retriable | 3.1.2 |
mini_mime | 1.0.2 |
memoist | 0.16.2 |
signet | 0.14.0 |
googleauth | 0.17.0 |
httpclient | 2.8.3 |
webrick | 1.4.4 |
google-apis-core | 0.4.1 |
google-apis-androidpublisher_v3 | 0.10.0 |
google-cloud-core | 1.5.0 |
google-apis-iamcredentials_v1 | 0.3.0 |
google-apis-storage_v1 | 0.3.0 |
google-cloud-storage | 1.31.0 |
rexml | 3.2.5 |
nanaimo | 0.3.0 |
colored2 | 3.1.2 |
claide | 1.0.3 |
CFPropertyList | 3.0.2 |
atomos | 0.1.3 |
xcodeproj | 1.21.0 |
unicode-display_width | 1.7.0 |
terminal-table | 1.8.0 |
public_suffix | 4.0.6 |
tty-screen | 0.8.1 |
babosa | 1.0.4 |
excon | 0.78.0 |
unf_ext | 0.0.7.7 |
unf | 0.1.4 |
domain_name | 0.5.20190701 |
http-cookie | 1.0.3 |
ruby2_keywords | 0.0.2 |
faraday | 1.1.0 |
faraday-cookie_jar | 0.0.7 |
fastimage | 2.2.0 |
json | 2.3.1 |
naturally | 2.2.1 |
dotenv | 2.7.6 |
bundler | 2.1.4 |
jwt | 2.3.0 |
declarative | 0.0.20 |
multi_json | 1.15.0 |
os | 1.1.1 |
google-cloud-env | 1.4.0 |
google-cloud-errors | 1.0.1 |
rake | 13.0.1 |
digest-crc | 0.6.1 |
emoji_regex | 3.2.1 |
aws-eventstream | 1.1.0 |
aws-sigv4 | 1.2.2 |
aws-partitions | 1.393.0 |
jmespath | 1.4.0 |
aws-sdk-core | 3.109.2 |
aws-sdk-kms | 1.39.0 |
aws-sdk-s3 | 1.84.1 |
forwardable | 1.3.1 |
logger | 1.3.0 |
stringio | 0.0.2 |
ipaddr | 1.2.2 |
openssl | 2.1.2 |
ostruct | 0.1.0 |
strscan | 1.0.0 |
date | 3.0.1 |
io-console | 0.5.6 |
fileutils | 1.4.1 |
zlib | 1.0.0 |
libxml-ruby | 3.2.1 |
psych | 3.1.0 |
mutex_m | 0.1.0 |
generated on: 2022-04-13
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 2
- Comments: 40 (1 by maintainers)
Commits related to this issue
- Migrate to update_code_signing_settings https://github.com/fastlane/fastlane/issues/20172 — committed to RocketChat/Rocket.Chat.ReactNative by diegolmello 2 years ago
I started getting this error this morning. It was working fine the last few days.
why is update_project_provisioning suddenly no longer working? for me, swapping to update_code_signing_settings is not a 1 for 1 change from update_project_provisioning so it’s not a good fix for this issue.
I tried to re-generate provisioning profiles.
Edit
Save
rebuilding now, it seems to be working.
Deleting was not required in my case.
This worked for us, thanks!
This is my replacement code:
We don’t use match for the profiles though.
@BDProject yes. i remove all provisioning profile in apple developer and use match to regenerate the provision profile
same here, the problem is in update_project_provisioning.rb:
seems that p7.data is empty, thus data is empty, then below line of code:
raise a “undefined method `[]’ for nil:NilClass (NoMethodError)” error.
For me, I didn’t want to update my update_project_provisioning.
I just did the following.
and then let the CI build.
@LifetimeCode you can go the
https://developer.apple.com/
login. go to profile remove the problem provision profile and create a new oneReplace
to
fix my problem.
Hi All,
For those who didn’t have the time to read everything, Apple expired a lot of Provisioning Profiles, here https://stackoverflow.com/questions/71850186/invalid-provisioning-profile-signature-state-error-validation-error-90165/71853423#71853423
Stackoverflow mainly offers manual solutions to reset the expiration date, but with fastlane it can be done as well.
Depending how you have your lane setup, when you run get_provisioning_profile there is a parameter force to renew its expiration date. Most likely better to just do once.
See: https://docs.fastlane.tools/actions/get_provisioning_profile/
Apple’s intermediate certificates used to sign the mobileprovision file expired, best option is to re-generate the provisioning profiles, I suppose. See http://stackoverflow.com/a/71853423
I manage dozens of projects, and if deleting profiles one by one is time-consuming, I don’t know if there’s a better way
How to use this?
Added
force:true
toget_provisioning_profile
solved it for us. We followed this guide for the fastlane setup. https://thecodingmachine.github.io/react-native-boilerplate/docs/BetaBuild/#code-signingNot using
update_project_provisioning
anymore 🙂What parts did you replace exactly? 😃
From my previous comment: If one needs to do this manually, does it mean deleting the existing provisioning profile and recreating it on the Apple Developer Portal?
I can confirm that by deleting the existing provisioning profile and recreating it on the Apple Developer Portal solved the issue on my side (for those who use Fastlane with GitHub Actions automation).
This worked fine for me!
@yixiangfeng confirm!
force: true
update all profiles viamatch
helps!