Skip to content

Conversation

rasheedcalgary
Copy link

@rasheedcalgary rasheedcalgary commented May 16, 2025

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

Motivation and Context
This change resolves a runtime error caused by passing the templateName attribute to Apple’s App Store Connect API, which currently does not recognize this parameter in provisioning profile creation requests.

The error message encountered:
The provided entity includes an unknown attribute - 'templateName' is not an attribute on the resource 'profiles'
Resolves
#29580
#29499
#29579

Description

This PR conditionally excludes the templateName field from the API request payload unless it is explicitly provided and non-nil. This preserves backward compatibility and avoids triggering an error from Apple’s API for standard use cases.

The change was made in Spaceship::ConnectAPI::Profile.create and ensures the attributes hash is built dynamically, only including templateName if present.

Testing Steps

1.	Used the patched fastlane fork in a GitHub Actions CI environment where provisioning profiles are generated dynamically.
2.	Verified that profiles are successfully created using fastlane match, both when templateName is omitted (nil) and when provided explicitly (for internal testing).
3.	Ensured existing behavior and arguments remain unaffected.

@rasheedcalgary rasheedcalgary changed the title Fix/template name is not an attribute on the resource profiles Fix: fastlane match issue -template name is not an attribute on the resource profiles May 16, 2025
@jonaswaigel
Copy link

jonaswaigel commented May 20, 2025

Still happening with using a local updated version with your provided fix:
/Users/admin/.rbenv/versions/3.3.5/lib/ruby/gems/3.3.0/gems/fastlane-2.227.3/spaceship/lib/spaceship/connect_api/api_client.rb:223:in `handle_response': [!] The provided entity includes an unknown attribute - 'templateName' is not an attribute on the resource 'profiles' - /data/attributes/templateName

@visuallization
Copy link
Contributor

Any progress on this PR or do we need to create yet another fork to fix this?

@visuallization
Copy link
Contributor

visuallization commented May 26, 2025

Still happening with using a local updated version with your provided fix: /Users/admin/.rbenv/versions/3.3.5/lib/ruby/gems/3.3.0/gems/fastlane-2.227.3/spaceship/lib/spaceship/connect_api/api_client.rb:223:in `handle_response': [!] The provided entity includes an unknown attribute - 'templateName' is not an attribute on the resource 'profiles' - /data/attributes/templateName

@jonaswaigel Here another PR which should solve the issue: #29591

I am not too familiar with fastlane and template_name so not sure is any other changes are needed but tests are passing for now.

Copy link

@kurt-nsuslab kurt-nsuslab left a comment

Choose a reason for hiding this comment

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

coool

@Monish-Graphy
Copy link

Team, Any fix for this ?

@devopstechteam
Copy link

Hi all! Do you happen to have any updates or fixes for this? We blocked because we automated all the flow from Fastlane. And for profile generation, there is an error:
The provided entity includes an unknown attribute - 'templateName' is not an attribute on the resource 'profiles' - /data/attributes/templateName (Spaceship::UnexpectedResponse)

@rockyev
Copy link

rockyev commented Jun 4, 2025

Any update on when we can expect a fix for this?

@cgarcia80
Copy link

Hi! Any updates on this issue?
I'm still getting this error when trying to create a provisioning profile:
"The provided entity includes an unknown attribute - 'templateName' is not an attribute on the resource 'profiles' - /data/attributes/templateName"

Let me know if there's a temporary workaround or if this is planned for the next release. Thanks!

@sonicxs
Copy link

sonicxs commented Jun 9, 2025

Same here

@Ananthakr-Jupiter
Copy link

If anyone looking for a temporary workaround for this issue, use this in your Gemfile to force usage of the patch branch from @rasheedcalgary

gem "fastlane",:git => 'https://github.com/rasheedcalgary/fastlane.git',:branch => 'fix/templateName-is-not-an-attribute-on-the-resource-profiles'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.