Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sigh] prevent crashes in fetch_profiles when profiles have no bundle_id #21758

Merged
merged 1 commit into from Jan 4, 2024

Conversation

jonas2808
Copy link
Contributor

Checklist

  • I've run bundle exec rspec from the root directory to see all new and existing tests pass
  • I've followed the fastlane code style and run bundle exec rubocop -a to ensure the code style is valid
  • I see several green ci/circleci builds in the "All checks have passed" section of my PR (connect CircleCI to GitHub if not)
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary.
  • I've added or updated relevant unit tests.

Motivation and Context

This change is required for fastlane sigh, if the provisioning profiles for Apple needs to be recreated or fetched.

Shell command:
fastlane sigh --app_identifier $APP_ID --username $FASTLANE_USER --provisioning_name $PROVISIONINF_NAME --team_id $TEAM_ID --template_name "$TEMPLATE_NAME" --ignore_profiles_with_different_name --skip_certificate_verification

Error: identifier' for nil:NilClass (NoMethodError)

If a build pipeline is running the same shell / bash command for fastlane sigh multiple times, the error is happening sporadically.

Resolves #21238

Description

The change is to check if the profile.bundle_id is nil / null.

Testing Steps

Changes are tested within a forked repository. From this forked repository, the forked version for gem install was created, implemented in the pipeline and many builds are triggered and ran successfully in parallel using the above fastlane sigh command.

@jonas2808
Copy link
Contributor Author

#21238

@jonas2808
Copy link
Contributor Author

@lacostej @rogerluan I couldn't sync the other PR anymore #21637 and reopened a new one with the rebased code. I included @lacostej suggestions. For the questions: I think the identifier is nil because the value was not correctly synced or anything like that.

Copy link
Member

@joshdholtz joshdholtz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is such a werid error 🙈 But thank you for fixing! This will go out today 💪

@joshdholtz joshdholtz merged commit 7970e41 into fastlane:master Jan 4, 2024
2 checks passed
This was referenced Jan 4, 2024
SubhrajyotiSen pushed a commit to KeepTruckin/fastlane that referenced this pull request Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants