fastlane gym failed: "no matching provisioning profile found" error
Fixes no matching provisioning profile found in a mobile release pipeline by working through the specific checks and corrections for this failure. Use when this exact error or symptom blocks an archive, upload, review or rollout step. Not for unrelated build failures or for general release planning with no error present.
TL;DR
Install the provisioning profile that matches the bundle id, distribution type and current certificate, then point the target at it. Run fastlane match for the right type, or download the profile from the portal and confirm its app id and expiry. gym fails at export because the archive was signed for one profile and the export options demand another, so align the export method, profile mapping and installed profiles.
no matching provisioning profile foundUse this when
- fastlane gym or build_app fails at export with this message.
- Profiles were renewed in the portal but not synced to this machine.
- The export options plist names a profile that does not exist locally.
Not for this skill when
- Automatic signing in Xcode succeeds locally. The gap is specific to the gym export configuration.
- The bundle id changed recently. Profiles for the old id will never match; create new ones.
Steps
- Read the gym log to capture the exact bundle id and profile name the export step requested. Verify: the requested bundle id and profile name are copied from the log, not guessed
- List installed profiles and check whether one exists for that bundle id with the app-store type and a future expiry. Verify: a matching unexpired profile is either found or confirmed missing
- Run fastlane match appstore, or the type gym requests, to fetch or regenerate the profile. Verify: match completes and reports the profile installed
- Fix the export options so the provisioningProfiles mapping keys the bundle id to the installed profile name. Verify: the mapping in the Gymfile or export options matches the installed profile exactly
- For app extensions, repeat the check per extension bundle id, since gym exports all targets together. Verify: every target bundle id has a matching profile listed
- Re-run the gym lane. Verify: gym produces the IPA and prints its path with no profile error
- Record the fix in the release runbook or the CI job notes, naming the error, the value or setting that changed, and the date, so the next release engineer does not re-diagnose it from scratch. Verify: the runbook or job notes contain an entry for this error that a teammate can find by searching the error text
Why it happens
gym archives fine with a development or generic signing setup, then the export step re-signs for distribution using the profiles named in the export options. If that named profile is absent, expired or built for a different bundle id or certificate, export aborts. The mismatch usually appears after profile renewal, because the new profile has a new name and UUID while build settings still reference the old one.
In practice this failure is rarely a one-off. It tends to recur at the worst point in the release cycle, when a certificate, a toolchain, a store policy or a team process has quietly changed since the last successful release and nobody connected that change to the release pipeline. That is why the steps above insist on reading the actual store, portal or build state at each point instead of trusting configuration files or memory: the configuration usually describes the release the team intended to ship, while this error describes the release the systems actually see. Once the immediate upload or build is unblocked, treat the underlying drift as the real defect. Pin the toolchain version, expiry date, identifier or policy value that caused it in the release checklist, and add the cheapest automatic check that would have caught it before submission day, for example a preflight lane that validates signing, versions and metadata lengths before the full archive runs. A release pipeline that fails in preflight costs minutes; the same failure discovered at submission costs a day.
Variants and edge cases
gym no matching provisioning profile found fastlane
The lane-level phrasing; sync match and fix the export mapping. When you land on this skill from that phrasing, start at step 1 rather than jumping to the most dramatic fix: the early steps are cheap state checks that confirm you are solving the failure you actually have, and they take minutes compared with a rebuild or a store-side change you cannot undo.
no matching provisioning profile found Xcode export
Same root cause through Organizer export instead of fastlane. When you land on this skill from that phrasing, start at step 1 rather than jumping to the most dramatic fix: the early steps are cheap state checks that confirm you are solving the failure you actually have, and they take minutes compared with a rebuild or a store-side change you cannot undo.
Edge case: renamed profiles
Portal-regenerated profiles change names. Any hardcoded profile name in CI must be updated or replaced with match-managed names. When you land on this skill from that phrasing, start at step 1 rather than jumping to the most dramatic fix: the early steps are cheap state checks that confirm you are solving the failure you actually have, and they take minutes compared with a rebuild or a store-side change you cannot undo.
Provenance
Resolved from the public thread: https://vectle.com/posts/pst_ec2ipYQA9vJQ607MOorCbA