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

[eas-cli] [ENG-10555] Fix device provsioning #2119

Merged

Conversation

radoslawkrzemien
Copy link
Contributor

Why

https://linear.app/expo/issue/ENG-10555/ios-devices-get-stuck-in-failed-to-provision-state-until-the-developer
https://www.reddit.com/r/expo/comments/17kr7rr/failed_to_provision/?sort=new

How

The problem happened when the provisioning profile already existed and the user wanted to add new devices to it. In such a case, a missing device was added to the Apple Developer Portal if needed, but the provisioning profile from EAS was used unchanged. This meant that no matter what the devices list in the provisioning profile used was the same as before and thus resulted in a warning message and a failure.
Now another check has been added, if the id of the profile from EAS matches the one from Apple the list of devices is compared. If it's the same then the profile is reused as before. If the list is different then the profile in EAS gets updated first with the current devices data from Apple

Test Plan

Tested manually by reproducing the issue mentioned by the users, applying fix and confirming that the issue went away.
Also added an automated test to cover the new case and adjusted existing tests

Copy link

linear bot commented Nov 10, 2023

ENG-10555 iOS devices get stuck in "Failed to provision" state until the developer deletes their provisioning profile

See this Reddit thread:

Hi guys i added a device to the list of devices but getting this error below saying that the device is in "Processing". However the device is listed as "Active". Has anybody faced the same problem? Could it be related with the fact that i have the last iPhone 15 pro?

Failed to provision 1 of the selected devices:
- UDID (iPhone)
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

Someone posted a solution:

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.

It's good that developers have a workaround. However, it would be even better if they did not have to manually delete their provisioning profile, and if their device is listed as "Active" on the Apple Developer website, we should not continue to treat the device as being in the "Processing" state.

@radoslawkrzemien
Copy link
Contributor Author

/changelog-entry bug-fix Fixed provisioning of new devices into an existing profile

Copy link

codecov bot commented Nov 10, 2023

Codecov Report

Merging #2119 (acedc94) into main (5e31a9d) will increase coverage by 0.01%.
The diff coverage is 80.00%.

@@            Coverage Diff             @@
##             main    #2119      +/-   ##
==========================================
+ Coverage   54.20%   54.21%   +0.01%     
==========================================
  Files         509      509              
  Lines       18653    18657       +4     
  Branches     3739     3740       +1     
==========================================
+ Hits        10109    10113       +4     
  Misses       8523     8523              
  Partials       21       21              
Files Coverage Δ
...tials/ios/actions/SetUpAdhocProvisioningProfile.ts 43.71% <80.00%> (+1.54%) ⬆️

Copy link

✅ Thank you for adding the changelog entry!

Copy link

Size Change: -90 B (0%)

Total Size: 42.3 MB

Filename Size Change
./packages/eas-cli/dist/eas-linux-x64.tar.gz 42.3 MB -90 B (0%)

compressed-size-action

Copy link
Member

@szdziedzic szdziedzic left a comment

Choose a reason for hiding this comment

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

Nice! Looks reasonable

@radoslawkrzemien radoslawkrzemien merged commit 8e7c668 into main Nov 13, 2023
9 checks passed
@radoslawkrzemien radoslawkrzemien deleted the @radoslawkrzemien/ENG-10555-fix-device-provioning branch November 13, 2023 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants