exp build:ios => "Error: validateProvisioningProfile"

Hello.

I have problems building binaries for iOS, at the stage of building and signing the IPA.

building and signing IPA
[02:28:48] Using gulpfile /usr/local/turtle-agent/tools-public/gulpfile.js
[02:28:48] Starting 'ios:build-and-sign-ipa'...
provisioning profile copied to home directory
done retrieving provisioning profile data
checking if teamID is present in keychain and that certificate is valid...
ensured certificate is valid
validating provisioning profile...
[stderr] [02:28:49] 'ios:build-and-sign-ipa' errored after 494 ms
[stderr] [02:28:49] Error: validateProvisioningProfile: wrong bundleIdentifier found in provisioning profile; expected: com.company.app, found: com.company.app
[stderr]     at ensureBundleIdentifierIsValid (/xdl@50.1.0/src/detach/IosUtils.js:89:11)
[stderr]     at Object.validateProvisioningProfile (/xdl@50.1.0/src/detach/IosUtils.js:61:3)
[stderr]     at Object.<anonymous> (/xdl@50.1.0/src/detach/IosIPABuilder.js:42:11)
[stderr]     at Generator.next (<anonymous>)
[stderr]     at step (/usr/local/turtle-agent/tools-public/node_modules/xdl/build/detach/IosIPABuilder.js:52:191)
[stderr]     at /usr/local/turtle-agent/tools-public/node_modules/xdl/build/detach/IosIPABuilder.js:52:361
[stderr]     at <anonymous>
unable to build and sign IPA

It says the bundleId is wrong but the expected and actual is the same!?!

I have tried google it but very few/none hits on the problem :frowning:
Maybe someone here can help me?

1 Like

Now I have removed and cleared all certs and created new from scratch (“Let Expo handle the process”), still the same problem? And error message is telling me nothing since expected = actual…

please help :slight_smile:

Hey I’m really sorry you are having this issue @jwallinder

It seems like you’ve done a lot of things that the team would prescribe doing, are you absolutely sure you’ve cleared your credentials and that the bundleIDs are 100% identical?

If so, I’ll try to get some more eyes on your problem. Also our services were down ~5-8 hours ago so it might have impacted you.

Hey @jwallinder,
Could you please send us your build id? This could be helpful.
Thanks!

Hi all,

we are experiencing very similar problem. We had a build sat up with wildcard certificate, which was working for months and then suddenly we got:

Error: validateProvisioningProfile: wrong bundleIdentifier found in provisioning profile; expected: com.mycompany.project, found: com.mycompany.*

So I decided to generate a not wildcard certificate for that specific AppID, which didn’t fail with that but also didn’t correctly match the AppID (and I’ve made very sure they are the same):
Couldn't automatically detect the provisioning profile mapping, and that build eventually dies with:

INFO [2018-06-21 23:13:39.37]: â–¸ /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.95.0/gym/lib/assets/wrap_xcodebuild/xcbuild-safe.sh: line 61: 12183 Segmentation fault: 11  xcodebuild "$@"
[stderr] [23:13:39] 'ios:build-and-sign-ipa' errored after 1.27 min
[stderr] [23:13:39] Error: Process exited with non-zero code: 1
+ xcodebuild -exportArchive -exportOptionsPlist /var/folders/8s/t4vscjs14yd6p8736s7b3wyc0000gn/T/gym_config20180621-12153-vmboug.plist -archivePath /private/tmp/turtle/ede7dd4f-8d17-4478-a72a-e61abf45992e/archive.xcarchive -exportPath /var/folders/8s/t4vscjs14yd6p8736s7b3wyc0000gn/T/gym_output20180621-12153-1wdt0aj 'OTHER_CODE_SIGN_FLAGS=--keychain /private/tmp/xdl/2862a6e0-75e3-11e8-a93b-75671481d32e.keychain'
[stderr]     at ChildProcess.child.on (/usr/local/turtle-agent/tools-public/node_modules/@expo/spawn-async/build/spawnAsync.js:39:21)
[stderr]     at emitTwo (events.js:125:13)
2018-06-21 23:12:33.343 xcodebuild[12183:4300992] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/8s/t4vscjs14yd6p8736s7b3wyc0000gn/T/ExpoKitApp_2018-06-21_23-12-33.341.xcdistributionlogs'.
[stderr]     at ChildProcess.emit (events.js:213:7)
/usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.95.0/gym/lib/assets/wrap_xcodebuild/xcbuild-safe.sh: line 61: 12183 Segmentation fault: 11  xcodebuild "$@"
ERROR [2018-06-21 23:13:39.37]: Exit status: 139

build URLs:
wildcard: https://expo.io/builds/b79d7072-05f4-43b4-b0ac-dc494ee27330
specific AppID: https://expo.io/builds/001518bd-ba72-4846-ab7f-91d1aadee826

Thanks!

It is a private app and build is not publically available :frowning:
https://expo.io/builds/e2593026-2dbc-484c-83fc-8da9db21a939

Can you please elaborate “things that the team would prescribe doing”.

I have read the documentation and tried to follow it as much as possible but still I end up in problems.

Right, but I work for Expo and I can check things :wink: Could you please tell me, do you happen to have two Apple Developer accounts? I think in some weird way it may be causing this issue, because we’re comparing application-identifier from provisioning profile (which is composed with teamId and bundleIdentifier) with a string which we build on our own - we take teamId (we get it when you input apple id/password using exp command) and bundleIdentifier from app.json file. Even though bundleIdentifier values are the same, teamId might be different and this may be causing the issue. Unfortunately we don’t log teamId when both values don’t match, so this is why you are getting misleading error.
Looks like we might have overlooked something. Sorry for the trouble, i’ll take care of it.

I have access to 3 different accounts, one personal and 2 corporate (but not enterprise accounts)

Thank you @dsokal for helping us out.
I have compared the application-identifier in the provisioning profile with my teamId’s and none of them are matching. Unsure about the past but the app ownership might have been transfered from one team to another (current).

Anyway, this is bug on our side. I think we shouldn’t fail builds if team id from application-identifier doesn’t match the one from which the provisioning profile was generated. I guess we should compare bundle id only and maybe print warning if team ids are different. I’ll let you know when we deploy a fix to our builders. Sorry again.

3 Likes

Alright! Keep me posted.

We just deployed a fix to production, could you try building you app again?

We can build ipa again :slight_smile:
We need to do some more testing and validation but so far so good.

Thank you for your help.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.