eas-cli icon indicating copy to clipboard operation
eas-cli copied to clipboard

Building iOS app invalidates provisioning profile when using document picker

Open seba9999 opened this issue 2 years ago • 56 comments

Build/Submit details page URL

No response

Summary

I've migrated to EAS build and in the same time I've used iCloud service with expo DocumentPicker.

So I'm no sur which is causing this issue...

But each time I launch a new build I'm facing Provisioning profile (id: *******979) is no longer valid image

If I answer Yes to Generate a new Provisionning Profile it generate a new one correctly and it works ... But if I run the command again (like 10 sc later) the previous (freshly generated) provisionning profil is now invalid ...

It may be linked to iCloud. I've added "usesicloudstorage": true in my app.json I also have this configured in my app identifier : image

With an container named iCloud.<your_bundle_identifier> as mentionned in the documentPicker docs

$ eas --version
eas-cli/0.50.0 win32-x64 node-v16.13.1

Managed or bare?

Managed

Environment

npx expo-env-info
expo-env-info 1.0.2 environment info:
    System:
      OS: Windows 10 10.0.19041
    Binaries:
      Node: 16.13.1 - C:\Program Files\nodejs\node.EXE
      npm: 8.1.2 - C:\Program Files\nodejs\npm.CMD
    SDKs:
      Android SDK:
        API Levels: 30
        Build Tools: 30.0.3
        System Images: android-30 | Google APIs Intel x86 Atom
    IDEs:
      Android Studio: Version  4.2.0.0 AI-202.7660.26.42.7351085
    npmPackages:
      expo: ^43.0.0 => 43.0.5
      react: 17.0.1 => 17.0.1
      react-dom: 17.0.1 => 17.0.1
      react-native: 0.64.3 => 0.64.3
      react-native-web: 0.17.1 => 0.17.1
    Expo Workflow: managed

Error output

No response

Reproducible demo or steps to reproduce from a blank project

I think it happens with any blank project

seba9999 avatar Apr 15 '22 12:04 seba9999

I've been having basically the exact same issue, but do not use iCloud in our app

marcfrankel avatar Apr 20 '22 02:04 marcfrankel

This sth we are aware of, We don't have any plans to fix it in the near future, as far as I understand the only problem here is that profile is regenerated every time which is not a problem (you do not need to login to apple for every build)

wkozyra95 avatar Apr 21 '22 11:04 wkozyra95

Well as far as I know I DO have to login for each build I want to send to testflight :/

And btw the certificat page will be a huge mess in a while ...

image

seba9999 avatar Apr 22 '22 13:04 seba9999

Well as far as I know I DO have to login for each build I want to send to testflight :/

You don't need to login when building for appstore(for ad-hoc builds you do) if your have credentials already configured. For submitting you need to login only if you don't have ascAppId specified in eas.json.

wkozyra95 avatar Apr 22 '22 13:04 wkozyra95

This issue is stale because it has been open for 30 days with no activity. If there is no activity in the next 7 days, the issue will be closed.

github-actions[bot] avatar May 23 '22 00:05 github-actions[bot]

This issue was closed because it has been inactive for 7 days since being marked as stale. Please open a new issue if you believe you are encountering a related problem.

github-actions[bot] avatar May 30 '22 00:05 github-actions[bot]

Can we reopen this? This problem still happens to me with latest CLI versions.

rafatrace avatar Aug 10 '22 08:08 rafatrace

@wkozyra95 Could you reopen this please? It's still an issue

billinghamj avatar Sep 12 '22 12:09 billinghamj

Can you please reopen this issue. It does not appear to be solved yet.

gbonventre avatar Sep 28 '22 15:09 gbonventre

👍 same issue here. Any news on that?

robertwe avatar Sep 29 '22 17:09 robertwe

Thank you for filing this issue! This comment acknowledges we believe this may be a bug and there’s enough information to investigate it. However, we can’t promise any sort of timeline for resolution. We prioritize issues based on severity, breadth of impact, and alignment with our roadmap. If you’d like to help move it more quickly, you can continue to investigate it more deeply and/or you can open a pull request that fixes the cause.

expo-bot avatar Sep 30 '22 22:09 expo-bot

thanks, we'll investigate. you can work around this with EXPO_NO_CAPABILITY_SYNC=1 eas build for now, or re-generated the profile every build automatically. more info

brentvatne avatar Sep 30 '22 22:09 brentvatne

This same thing started happening to us after following OneSignal's instructions for enabling Push Notifications when doing our next TestFlight build.

Note: I built for the simulator and for the dev-client without running into this issue and both builds correctly include the OneSignal packages - and the dev-client receives notifications from OneS correctly.

Now it's a bit unclear whether the workaround (EXPO_NOCAPABILITY_SYNC=1) should be used immediately or after the first capability sync. E.g. will I have our new push capability in a new build without doing the sync.

And if I get asked again, is Y or n the correct answer for the workaround?

pkreipke avatar Oct 12 '22 19:10 pkreipke

Now it's a bit unclear whether the workaround (EXPO_NOCAPABILITY_SYNC=1) should be used immediately or after the first capability sync. E.g. will I have our new push capability in a new build without doing the sync.

No workaround is strictly necessary, the only problem with the current state is that it regenerates a new profile even if it's not necessary. You should set EXPO_NO_CAPABILITY_SYNC when you know that there is nothing new to sync, so you need to run without that env only when changing entitlements in app.json or if are changing/adding/removing config-plugin that might modify entitlements.

And if I get asked again, is Y or n the correct answer for the workaround?

Answering no to login to apple prompt will also stop syncing profile, but e.g. internal distribution build requires login to apple, so it will not work in every case.

wkozyra95 avatar Oct 13 '22 10:10 wkozyra95

Every time I run EXPO_DEBUG=true eas build --platform ios --profile profilename it figures out (incorrectly) that Provisioning profile (id: 6BJB75X655) is no longer valid, however it was created just seconds earlier using the same command and is listed as valid in the expo GUI until next year. This breaks our CI builds. I guess we'll have to resort to EXPO_NOCAPABILITY_SYNC=1 for now

kennethlynne avatar Oct 18 '22 14:10 kennethlynne

Will this work properly if we update expo-document-picker?

rafatrace avatar Nov 28 '22 14:11 rafatrace

This issue is stale because it has been open for 30 days with no activity. If there is no activity in the next 7 days, the issue will be closed.

github-actions[bot] avatar Dec 29 '22 00:12 github-actions[bot]

Still an issue, not stale

billinghamj avatar Jan 03 '23 16:01 billinghamj

I'm not using expo-document-picker but i am using with-rn-image-crop-picker.

arjendevos avatar Jan 27 '23 08:01 arjendevos

Same issue here every single time.

edi avatar Jan 31 '23 14:01 edi

This issue is stale because it has been open for 30 days with no activity. If there is no activity in the next 7 days, the issue will be closed.

github-actions[bot] avatar Mar 03 '23 01:03 github-actions[bot]

Issue is still here

mguyard avatar Mar 03 '23 08:03 mguyard

This issue is stale because it has been open for 30 days with no activity. If there is no activity in the next 7 days, the issue will be closed.

github-actions[bot] avatar Apr 04 '23 00:04 github-actions[bot]

This is definitely an issue. Every time I have to change/select a certificate using the eas-cli, Certificates on Apple Developers get disabled.

alexbchr avatar Apr 04 '23 12:04 alexbchr

Are we getting a fix? :)

rajatbarman avatar May 03 '23 18:05 rajatbarman

This issue is stale because it has been open for 30 days with no activity. If there is no activity in the next 7 days, the issue will be closed.

github-actions[bot] avatar Jun 03 '23 00:06 github-actions[bot]

Still a problem, not stale

billinghamj avatar Jun 05 '23 08:06 billinghamj

This issue is stale because it has been open for 30 days with no activity. If there is no activity in the next 7 days, the issue will be closed.

github-actions[bot] avatar Jul 06 '23 00:07 github-actions[bot]

still not stale :|

billinghamj avatar Jul 06 '23 13:07 billinghamj

Same problem as @pkreipke once adding OneSignal to the mix, now every build incorrectly says provisioning file is invalid and generates a new one, next build the exact same thing. We need a fix as it is very annoying and adding the env var is likely to cause issues for some when changing entitlements as https://github.com/expo/eas-cli/issues/1069#issuecomment-1277391690 mentions and not knowing/remembering this is the "fix"

ChromeQ avatar Jul 13 '23 15:07 ChromeQ