Build failing on certs after included Apple Authentication

I can’t build a standalone IOS app after included apple sign in. Here is the command I’ve run

expo build:ios --apple-id deporte@linti.unlp.edu.ar --dist-p12-path certificado-2020-distribucion.p12 --team-id JV4X47B76U --provisioning-profile-path machigelp.mobileprovision --push-p8-path AuthKey_S5V4U6WP6R.p8 --push-id S5V4U6WP6R --clear-provisioning-profile

? Choose the build type you would like: archive

Checking if there is a build in progress…

Configuring credentials for machi.linti in project xxx
Authenticating to Apple Developer Portal…
Authenticated with Apple Developer Portal successfully!
Using Apple Team with ID: xxx
Fetching available credentials
:heavy_check_mark: App ID found on Apple Developer Portal.
:heavy_check_mark: Getting Distribution Certificates from Apple…
:heavy_multiplication_x: The Distribution Certificate is no longer valid on the Apple Developer Portal
Failed to set up Distribution Certificate
Failed to prepare all credentials.
The next time you build, we will automatically use the following configuration:

Project Credential Configuration:
Experience: @machi.linti/xxx, bundle identifier: xxx
Provisioning profile is missing. It will be generated during the next build
Apple Team ID: xxx, Apple Team Name: ---------

Cannot validate uploaded Distribution Certificate
Error: Cannot validate uploaded Distribution Certificate
at useDistCertFromParams (/home/federica/.nvm/versions/node/v13.8.0/lib/node_modules/expo-cli/src/credentials/views/IosDistCert.ts:684:11)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at IOSBuilder._setupDistCert (/home/federica/.nvm/versions/node/v13.8.0/lib/node_modules/expo-cli/src/commands/build/ios/IOSBuilder.ts:177:9)
at IOSBuilder.produceCredentials (/home/federica/.nvm/versions/node/v13.8.0/lib/node_modules/expo-cli/src/commands/build/ios/IOSBuilder.ts:258:5)
at IOSBuilder.prepareCredentials (/home/federica/.nvm/versions/node/v13.8.0/lib/node_modules/expo-cli/src/commands/build/ios/IOSBuilder.ts:130:7)
at IOSBuilder.run (/home/federica/.nvm/versions/node/v13.8.0/lib/node_modules/expo-cli/src/commands/build/ios/IOSBuilder.ts:51:7)
at IOSBuilder.command (/home/federica/.nvm/versions/node/v13.8.0/lib/node_modules/expo-cli/src/commands/build/BaseBuilder.ts:29:7)
at Command. (/home/federica/.nvm/versions/node/v13.8.0/lib/node_modules/expo-cli/src/exp.ts:82:7)
federica@notebook:~/linti/machi-react-native$

expo diagnostics

Expo CLI 3.20.9 environment info:
System:
OS: Linux 4.15 Ubuntu 18.04.4 LTS (Bionic Beaver)
Shell: 4.4.20 - /bin/bash
Binaries:
Node: 13.8.0 - ~/.nvm/versions/node/v13.8.0/bin/node
npm: 6.14.5 - ~/.nvm/versions/node/v13.8.0/bin/npm
npmPackages:
expo: ^36.0.0 => 36.0.2
react: 16.9.0 => 16.9.0
react-dom: 16.9.0 => 16.9.0
react-native: https://github.com/expo/react-native/archive/sdk-36.0.1.tar.gz => 0.61.4
react-native-web: ^0.11.7 => 0.11.7
npmGlobalPackages:
expo-cli: 3.20.9

I don’t understand why expo documentation ask to revoke credentials after include AppleAuthentication, I can’t revoke distribution certificate because it’s shared with other apps. I clear credentials from expo server (with -c) but then I couldn’t use my own certificate anymore.

I don’t understand why expo documentation ask to revoke credentials after include AppleAuthentication

Only provisioning profile was supposed to be revoked

The Distribution Certificate is no longer valid on the Apple Developer Portal

There are few potential reasons

  • certificate expired
  • you revoked it by mistake
  • you are passing wrong file to build command
  • validation might not work with manually specified credentials try (--skip-credentials-check flag)

Thanks for your reply. I revoked provisional profile and generated a new one before running the build.

The distribution certificate is valid in Apple Developer Portal, and I’ve already build an app with this file, so I think that the certificate is fine.

When I run the build with --skip-credentials-check flag, the build failed without logs:

expo build:ios --apple-id xxx --dist-p12-path xxx --team-id xxx --provisioning-profile-path xxx --push-p8-path xxx --push-id xxx --skip-credentials-check
? Choose the build type you would like: archive

Checking if there is a build in progress...

Configuring credentials for machi.linti in project machi-gelp
Authenticating to Apple Developer Portal...
Available session is not valid any more. Continuing with normal login.
Authenticated with Apple Developer Portal successfully!
Using Apple Team with ID: xxx
Skipping credentials check...
Fetching available credentials

Project Credential Configuration:
  Experience: @machi.linti/machi-gelp, bundle identifier: xxx
    Provisioning profile is missing. It will be generated during the next build
    Apple Team ID: xxx,  Apple Team Name: ---------

Unable to find an existing Expo CLI instance for this directory; starting a new one...
Starting Metro Bundler on port 19001.
Publishing to channel 'default'...
Building iOS bundle
Building Android bundle
Finished building JavaScript bundle in 63491ms.
Analyzing assets
Finished building JavaScript bundle in 55455ms.
Finished building JavaScript bundle in 1457ms.
Finished building JavaScript bundle in 1366ms.
Uploading assets
No assets changed, skipped.
Processing asset bundle patterns:
- /home/federica/linti/machi-react-native/**/*
Uploading JavaScript bundles
Publish complete

The manifest URL is: https://exp.host/@machi.linti/machi-gelp (​https://exp.host/@machi.linti/machi-gelp/index.exp?sdkVersion=36.0.0​). Learn more. (​https://expo.fyi/manifest-url​)
The project page is: https://expo.io/@machi.linti/machi-gelp (​https://expo.io/@machi.linti/machi-gelp​). Learn more. (​https://expo.fyi/project-page​)
› Closing Expo server
› Stopping Metro bundler
Checking if this build already exists...

Build started, it may take a few minutes to complete.
You can check the queue length at https://expo.io/turtle-status

You can make this faster. 🐢
Get priority builds at: https://expo.io/settings/billing

You can monitor the build at

 https://expo.io/dashboard/machi.linti/builds/e99ba80f-8162-439b-bff6-53f361d15faa

Waiting for build to complete.
You can press Ctrl+C to exit. It won't cancel the build, you'll be able to monitor it at the printed URL.
✖ Build failed.
Standalone build failed!