Blocker: Expo Custom Client (iOS) Builds Failing

Our company has enjoyed utilizing Expo and have been happy customers of the new “Priority Plan” - however, we’re facing a blocker that’s really impacting us and our customers. We are no longer able to utilize the expo client:ios command that we’d been previously using to register our devices as well as installing the custom client built on Expo’s servers.

We rely on the release-channels aspect across our company to switch between builds, so this is a high priority for us!

Expo Diagnostics:

  Expo CLI 3.8.0 environment info:
      OS: macOS 10.15.1
      Shell: 5.7.1 - /bin/zsh
      Node: 10.16.3 - /usr/local/bin/node
      Yarn: 1.17.3 - /usr/local/bin/yarn
      npm: 6.9.0 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
      Xcode: 11.2/11B52 - /usr/bin/xcodebuild
      expo-cli: 3.8.0

Here’s the latest failed build log:

Using ad hoc provisioning profile id: X7U98Y988K
Error: Reason: Unknown reason, raw: {"type":"Spaceship::AppleTimeoutError","message":"Could not receive latest API key from App Store Connect, this might be a server issue.","backtrace":["/usr/local/turtle-js/node_modules/@expo/traveling-fastlane-darwin/traveling-fastlane-1.9.9-osx/lib/vendor/ruby/2.2.0/gems/fastlane-2.117.1/spaceship/lib/spaceship/client.rb:557:in `rescue in itc_service_key'","/usr/local/turtle-js/node_modules/@expo/traveling-fastlane-darwin/traveling-fastlane-1.9.9-osx/lib/vendor/ruby/2.2.0/gems/fastlane-2.117.1/spaceship/lib/spaceship/client.rb:537:in `itc_service_key'","/usr/local/turtle-js/node_modules/@expo/traveling-fastlane-darwin/traveling-fastlane-1.9.9-osx/lib/vendor/ruby/2.2.0/gems/fastlane-2.117.1/spaceship/lib/spaceship/client.rb:476:in `block in send_shared_login_request'","/usr/local/turtle-js/node_modules/@expo/traveling-fastlane-darwin/traveling-fastlane-1.9.9-osx/lib/vendor/ruby/2.2.0/gems/fastlane-2.117.1/spaceship/lib/spaceship/client.rb:835:in `extract_key_from_block'","/usr/local/turtle-js/node_modules/@expo/traveling-fastlane-darwin/traveling-fastlane-1.9.9-osx/lib/vendor/ruby/2.2.0/gems/fastlane-2.117.1/spaceship/lib/spaceship/client.rb:785:in `log_request'","/usr/local/turtle-js/node_modules/@expo/traveling-fastlane-darwin/traveling-fastlane-1.9.9-osx/lib/vendor/ruby/2.2.0/gems/fastlane-2.117.1/spaceship/lib/spaceship/client.rb:676:in `request'","/usr/local/turtle-js/node_modules/@expo/traveling-fastlane-darwin/traveling-fastlane-1.9.9-osx/lib/vendor/ruby/2.2.0/gems/fastlane-2.117.1/spaceship/lib/spaceship/client.rb:471:in `send_shared_login_request'","/usr/local/turtle-js/node_modules/@expo/traveling-fastlane-darwin/traveling-fastlane-1.9.9-osx/lib/vendor/ruby/2.2.0/gems/fastlane-2.117.1/spaceship/lib/spaceship/portal/portal_client.rb:28:in `send_login_request'","/usr/local/turtle-js/node_modules/@expo/traveling-fastlane-darwin/traveling-fastlane-1.9.9-osx/lib/vendor/ruby/2.2.0/gems/fastlane-2.117.1/spaceship/lib/spaceship/client.rb:769:in `do_login'","/usr/local/turtle-js/node_modules/@expo/traveling-fastlane-darwin/traveling-fastlane-1.9.9-osx/lib/vendor/ruby/2.2.0/gems/fastlane-2.117.1/spaceship/lib/spaceship/client.rb:384:in `login'","/usr/local/turtle-js/node_modules/@expo/traveling-fastlane-darwin/traveling-fastlane-1.9.9-osx/lib/vendor/ruby/2.2.0/gems/fastlane-2.117.1/spaceship/lib/spaceship/client.rb:346:in `login'","/usr/local/turtle-js/node_modules/@expo/traveling-fastlane-darwin/traveling-fastlane-1.9.9-osx/lib/vendor/ruby/2.2.0/gems/fastlane-2.117.1/spaceship/lib/spaceship/portal/spaceship.rb:25:in `login'","/usr/local/turtle-js/node_modules/@expo/traveling-fastlane-darwin/traveling-fastlane-1.9.9-osx/lib/app/manage_ad_hoc_provisioning_profile.rb:114:in `block in <main>'","/usr/local/turtle-js/node_modules/@expo/traveling-fastlane-darwin/traveling-fastlane-1.9.9-osx/lib/app/funcs.rb:13:in `with_captured_output'","/usr/local/turtle-js/node_modules/@expo/traveling-fastlane-darwin/traveling-fastlane-1.9.9-osx/lib/app/manage_ad_hoc_provisioning_profile.rb:108:in `<main>'"]}
    at runFastlaneAction (/usr/local/turtle-js/build/builders/utils/ios/adhocBuild.js:85:19)
    at <anonymous>

For additional context - we are only now facing this issue after a mistake was made on our end when we accidentally revoked the active Apple distribution certificate which was being used for our Expo Ad-Hoc Profile due to another team member needing to make room for creating a certificate for a non-Expo app’s ad-hoc distribution (This happens as our Apple Developer account limits us to a maximum of 2 distribution certs). Due to that certificate being revoked, all our devices that had the custom Expo client could no longer open it, as it would appear to crash.

After discovering this problem, we attempted to build the custom-client again after cleaning up all the Expo associated profiles and keys - and utilizing the expo-cli to revoke an inactive certificate in order to have Expo create a new certificate and ad-hoc profile for us to use. Unfortunately, this didn’t seem to work, despite repeating this process.

Thanks in advance!

Hey @tsaidavid,

Glad to hear you have been using Expo happily. Sorry that you’re encountering this error though! The error is coming from FastLane’s SpaceShip and from a glance at an SO post it looks like this could be related to either an anti-virus/firewall issue or a 2FA.

Could you let me know the Expo account name that you are using that’s running into this issue? We’re going to look into the cert database and see if there’s something wrong there.


1 Like

hi @tsaidavid,
i am able to reproduce your issue and will be looking into this. will keep you updated. thanks!

1 Like

@adamjnav & @quinlanj - thanks so much! Please let me know if there’s anything else I can provide on my end. We love your product! :slightly_smiling_face:

EDIT: Forgot to mention that we do in fact use a separate CI-specific Apple ID when utilizing expo-cli.

hey @tsaidavid , just rolled out the fix to production. if you could rerun expo client:ios again, that’d be great. sorry for the inconvenience, and pls let us know if u run into any additional problems. thx!


Thanks @quinlanj - really appreciate you looking into this so quickly. Will give it a shot and keep you all posted. We do also plan on uploading our own certificate, I know I was running into issues the last couple days, but your fix might have taken care of this.

@quinlanj - thanks again! The expo client:ios now works again for us, as expected.

This might be a separate issue: However, in testing with the shared p12 certificate approach (which includes generating the password for it) - I’m now seeing:

WARNING! In this mode, we won't be able to make sure your Distribution Certificate,
Push Notifications service key or Provisioning Profile are valid. Please double check
that you're uploading valid files for your app otherwise you may encounter strange errors!

Make sure you've created your app ID on the developer portal, that your app ID
is in app.json as `bundleIdentifier`, and that the provisioning profile you
upload matches that team ID and app ID.

Please provide your Apple Distribution Certificate:
? Path to P12 file: <REDACTED>
? P12 password: [hidden]
✔ Successfully validated Distribution Certificate you uploaded against Apple Servers
⚠ Push Keys: You have 0 valid and 3 revoked push keys on the Expo servers.
? Select an authentication token signing key to use for push notifications: [Create a new key] (Recommended)
Cannot read property 'distCertSerialNumber' of undefined

hey @tsaidavid glad it works again.

i just pushed a fix for the undefined distCertSerialNumber problem. if you could grab the latest version of expo-cli (3.8.1) , the problem should be resolved

Hi @quinlanj - we installed expo-cli (3.9.0) and walked through the process of building a custom Expo client, this time uploading our own certificate (.p12).

We were able to get to the question: “Would you like to register a new device to use the Expo Client with?” and answered “no”.

After doing so, we were presented with the error: "bundleIdentifier" is required.

Do you have this defined in app.json?

@wodin - I understand the usage of the app.json, but not sure how I’d set it up for building the custom Expo client for iOS usage.

hi @tsaidavid just pushed a fix, could you grab expo-cli@3.9.2 and try again. sorry!

1 Like

@quinlanj - really appreciate it! It works :slight_smile:


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