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

Failing to provision selected iOS device even though it appears to work on apple.com #2107

Closed
trevordunn opened this issue Nov 1, 2023 · 25 comments
Labels
needs review Issue is ready to be reviewed by a maintainer

Comments

@trevordunn
Copy link

trevordunn commented Nov 1, 2023

Build/Submit details page URL

No response

Summary

Steps:

  1. I run eas build --profile development --platform ios --local and log onto my Apple account.
  2. It tells me "The provisioning profile is missing the following devices:" and displays my device id. I can confirm this is the true when I go to https://developer.apple.com/account/resources/profiles/list and look at the profile.
  3. After I select my device to provision again it says it "Updated existing profile: *[expo] com.my.app AdHoc 1234567", but errors out with "Failed to provision 1 of the selected devices:".

I can confirm after refreshing on apple.com that eas did actually succeed in adding my device to the provisioning profile, so I don't understand what's wrong. The error suggests that my device may be processing here https://developer.apple.com/account/resources/devices/list, but it's not - it's active and has been there for years. I can also confirm that if I download the provisioning profile, it lists my device on it. Is eas somehow downloading an old provisioning profile?

I've repeated this process a bunch of times but get the same result. Also tried restarting my computer, logging out of eas and back in. Nothing works.

Managed or bare?

bare

Environment

expo-env-info 1.0.5 environment info:
    System:
      OS: macOS 13.5.1
      Shell: 5.9 - /bin/zsh
    Binaries:
      Node: 18.17.1 - ~/.nvm/versions/node/v18.17.1/bin/node
      Yarn: 1.22.19 - ~/.nvm/versions/node/v18.17.1/bin/yarn
      npm: 10.2.0 - ~/.nvm/versions/node/v18.17.1/bin/npm
      Watchman: 2023.10.23.00 - /opt/homebrew/bin/watchman
    Managers:
      CocoaPods: 1.14.2 - /Users/trevor/.rbenv/shims/pod
    SDKs:
      iOS SDK:
        Platforms: DriverKit 23.0, iOS 17.0, macOS 14.0, tvOS 17.0, watchOS 10.0
      Android SDK:
        API Levels: 28, 29, 30, 31, 33, 34
        Build Tools: 30.0.3, 33.0.0, 34.0.0
        System Images: android-34 | Google APIs ARM 64 v8a
    IDEs:
      Android Studio: 2022.3 AI-223.8836.35.2231.10671973
      Xcode: 15.0.1/15A507 - /usr/bin/xcodebuild
    npmPackages:
      react: 18.2.0 => 18.2.0 
      react-native: ^0.72.5 => 0.72.5 
    npmGlobalPackages:
      eas-cli: 5.6.0
    Expo Workflow: bare

Error output

✔ Do you want to log in to your Apple account? … yes
› Log in to your Apple Developer account to continue
✔ Apple ID: … [email protected]
› Restoring session /Users/trevor/.app-store/auth/[email protected]/cookie
✔ Select a Team › Company Inc. - Company/Organization (a8s8d8f8)
› Provider Company Inc. (12345678)
✔ Logged in Local session
✔ Bundle identifier registered com.my.app
✔ Synced capabilities: No updates
✔ Synced capability identifiers: No updates
✔ Fetched Apple distribution certificates
✔ Fetched Apple provisioning profiles
The provisioning profile is missing the following devices:
- asdfasdfasdf123412341234 (iPhone 7) (created at: 2022-02-14T17:27:11.712Z)
✔ Would you like to choose the devices to provision again? … yes
✔ Select devices for the ad hoc build: › 5 devices selected
✔ Updated existing profile: *[expo] com.my.app AdHoc 1234567
Failed to provision 1 of the selected devices:
- asdfasdfasdf123412341234 (iPhone 7) (created at: 2022-02-14T17:27:11.712Z)
Most commonly devices fail to to be provisioned while they are still being processed by Apple, which can take up to 24-72 hours. Check your Apple Developer Portal page at https://developer.apple.com/account/resources/devices/list, the devices in "Processing" status cannot be provisioned yet

Reproducible demo or steps to reproduce from a blank project

Already mentioned in Summary.

@trevordunn trevordunn added the needs review Issue is ready to be reviewed by a maintainer label Nov 1, 2023
@leonore
Copy link

leonore commented Nov 2, 2023

I am also seeing this -- I can see my device is marked as enabled in Apple but I am getting the same error as above: Failed to provision 1 of the selected devices

We added other devices last night and they are fine.

@trevordunn
Copy link
Author

I've even tried removing my device from the profile, and eas successfully adds it back in cause I can see it added back in on apple.com, but it thinks it failed and says "Failed to provision 1 of the selected devices:".

@trevordunn
Copy link
Author

It's been reported on Reddit too: https://www.reddit.com/r/expo/comments/17kr7rr/failed_to_provision/

@supporteg
Copy link

i am having this issue. Just added two new devices and got this "failed to provision".

@lsps9150414
Copy link

same issue, in the Apple developer portal the device did not show any under review status and it's been added for over a week so I don't think the cli warning applies:

Most commonly devices fail to to be provisioned while they are still being processed by Apple, which can take up to 24-72 hours. Check your Apple Developer Portal page at https://developer.apple.com/account/resources/devices/list, the devices in "Processing" status cannot be provisioned yet

@ralyodio
Copy link

ralyodio commented Nov 2, 2023

its says it can't be installed because its integrity could not be verified.

@nemvik
Copy link

nemvik commented Nov 3, 2023

same problem with iPad Air
it happened like 2 weeks ago

@estatheo
Copy link

estatheo commented Nov 3, 2023

What fixed it for us was deleting the provisioning profile (eas credentials > iOS > staging > Build Credentials > Provisioning Profile > Delete) and creating a new build, generating a new profile with the new devices added in.

@nemvik
Copy link

nemvik commented Nov 3, 2023

What fixed it for us was deleting the provisioning profile (eas credentials > iOS > staging > Build Credentials > Provisioning Profile > Delete) and creating a new build, generating a new profile with the new devices added in.

tried that, didnt help - result is the same (Failed to provision 1 of the selected devices)

@trevordunn
Copy link
Author

@estatheo Interesting. I downloaded the one that was on expo.dev and it definitely doesn't have my device on it even though the same profile on apple.com does. Do you (or anyone) know if that's the profile that's used when the --local option is used?

If so, I'm guessing if I updated that profile by uploading the one from apple.com it would work for me. I kinda don't want to do that though until someone from the Expo team reviews this issue because it feels like a bug on their end (so I don't want to "force fix" it).

@liamlevesqueP8
Copy link

yeah same issue here - was working great a week or so ago and now it's failing consistently. Fixed temporarily by wiping the devices and provisioning profiles in the apple developer page, but happening again now

@ralyodio
Copy link

ralyodio commented Nov 3, 2023

is this project dead? we've been stuck for a week.

@thefinnomenon
Copy link

This solution from the top comment on the related Reddit post fixed it for me,

For anyone still having any trouble with this, I found that in order to get the provisioning profile to update with the new devices, I had to delete it and start a new build. This then generates a new profile with the new devices.

I had to run eas credentials > iOS > preview > Build Credentials > Provisioning Profile > Delete

Then run your build as normal.

@rgommezz
Copy link

rgommezz commented Nov 6, 2023

Eas CLI didn't seem to delete it out of the box.

An alternative is to delete the provisioning profile directly via Apple developer portal.

Just navigate to https://developer.apple.com/account/resources/profiles/list, delete the ad-hoc profile auto generated by Expo and kick off a new build with eas build. That will create a new profile that will include all devices you've selected.

@trevordunn
Copy link
Author

@rgommezz My understanding is EAS should update the provisioning profile, not delete it. If people want to work around this issue by deleting the provisioning profile (which forces EAS to make a new one) that's fine, but I'm still reproducing the original issue. I'll leave my setup alone for now until someone from the EAS team has had a chance to review this issue and provide recommendations (I just want to make sure I can confirm it's fixed if they change something on their end to resolve).

@MidnightTinge
Copy link

@rgommezz My understanding is EAS should update the provisioning profile, not delete it. If people want to work around this issue by deleting the provisioning profile (which forces EAS to make a new one) that's fine, but I'm still reproducing the original issue. I'll leave my setup alone for now until someone from the EAS team has had a chance to review this issue and provide recommendations (I just want to make sure I can confirm it's fixed if they change something on their end to resolve).

For us it did seem that EAS was appropriately updating the cert (when we download it from apple it has all the devices listed), but the final cert being applied by EAS doesn't get updated (extracting the profile from the final IPA shows the new devices are missing, despite the unix timestamp in the cert name matching). I'm not sure if this is a caching issue or EAS just isn't downloading the new cert after updating it on apple's side.

I'd dig into it myself but I honestly don't know my head from my feet when it comes to expo internals 😅 maybe over the weekend if the expo crew haven't taken a look yet.

@rvarner
Copy link

rvarner commented Nov 7, 2023

What fixed it for us was deleting the provisioning profile (eas credentials > iOS > staging > Build Credentials > Provisioning Profile > Delete) and creating a new build, generating a new profile with the new devices added in.

This was the solution for me.

@focux
Copy link

focux commented Nov 7, 2023

This solution from the top comment on the related Reddit post fixed it for me,

For anyone still having any trouble with this, I found that in order to get the provisioning profile to update with the new devices, I had to delete it and start a new build. This then generates a new profile with the new devices.

I had to run eas credentials > iOS > preview > Build Credentials > Provisioning Profile > Delete

Then run your build as normal.

I'm experiencing the same issue and this worked for me. I hope they fix this so we don't have to work around it again.

@tgentry300
Copy link

@focux Does this require us to readd each device via the URL or will the devices still be available to choose?

@MidnightTinge
Copy link

@focux Does this require us to readd each device via the URL or will the devices still be available to choose?

The devices are still available. You'll go through the normal "press space to select" flow and they should all be there as long as the devices themselves were added to apple/eas

@tgentry300
Copy link

@MidnightTinge Thanks! I will give this a shot.

@tgentry300
Copy link

@MidnightTinge Thanks! I will give this a shot.

Update, that worked. The registered devices were still listed and all were automatically selected.

@TrevPennington
Copy link

Looks like fix was merged in v5.8.0

@trevordunn
Copy link
Author

v5.8.0 fixed it for me! Thanks!

@MatkoMilic
Copy link

for me this worked: eas device:create

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs review Issue is ready to be reviewed by a maintainer
Projects
None yet
Development

No branches or pull requests