Hugo
Hugo

Reputation: 2204

expo build:ios throws Reason: Unknown reason, raw: "SSL_connect returned=1 errno=0 state=error: certificate verify failed"

Yesterday I managed to run the command expo build:ios successfully but this morning it just won't work, I get the following error message after entering my credentials:

Trying to authenticate with Apple Developer Portal...
Authentication with Apple Developer Portal failed!
Reason: Unknown reason, raw: "SSL_connect returned=1 errno=0 state=error: certificate 
verify failed"
Set EXPO_DEBUG=true in your env to view the stack trace.

Any idea where the error comes from? I've checked the apple services status and everything is up.

Here's my setup

Expo CLI 3.11.5 environment info:
System:
  OS: macOS 10.14.5
  Shell: 5.3 - /bin/zsh
Binaries:
  Node: 10.16.3 - /usr/local/bin/node
  Yarn: 1.19.1 - /usr/local/bin/yarn
  npm: 6.9.0 - /usr/local/bin/npm
  Watchman: 4.9.0 - /usr/local/bin/watchman
IDEs:
  Android Studio: 3.4 AI-183.6156.11.34.5692245
  Xcode: 11.3.1/11C504 - /usr/bin/xcodebuild
npmPackages:
  @storybook/react-native: ^4.1.7 => 4.1.7 
  @types/react: 16.4.7 => 16.4.7 
  @types/react-native: ^0.60.2 => 0.60.2 
  @types/react-navigation: ^3.0.7 => 3.0.7 
  expo: ^33.0.0 => 33.0.7 
  react: 16.8.3 => 16.8.3 
  react-native: https://github.com/expo/react-native/archive/sdk-33.0.0.tar.gz => 0.59.8 
  react-navigation: ^4.0.10 => 4.0.10 
npmGlobalPackages:
  expo-cli: 3.11.5

Upvotes: 8

Views: 3496

Answers (6)

foloinfo
foloinfo

Reputation: 693

The solution above npm install -g expo-cli is correct.
I just want to add DO NOT use yarn global add expo-cli since it did not work.

Upvotes: 0

Pascal Nitcheu
Pascal Nitcheu

Reputation: 799

If you are using a Mac, these 2 commands will do the tricks 1)which expo to locate expo in your Mac which will give you this "/usr/local/bin/expo" 2) "cd /usr/local/bin/" 3)-rm expo 4)-rm expo-cli

Then re-install the latest version of expo-cli or at least the 3.11.7

Upvotes: 0

Mirnamiq Abdullayev
Mirnamiq Abdullayev

Reputation: 171

go into the node_modules of your expo-cli

cd `npm root -g`/expo-cli/node_modules/@expo/traveling-fastlane-darwin/traveling-fastlane-1.10.0-osx/lib/ruby/lib

verify that the ca-bundle.crt is actually expired

openssl x509 -enddate -noout -in ca-bundle.crt

directory of your openssl cert_file

cert_file="$( openssl version -d | awk -F'"' '{print $2}' )/cert.pem"

backup expired crt

cp ca-bundle.crt ca-bundle.crt.bak

copy your openssl cert file

cp $cert_file ca-bundle.crt

Upvotes: 0

This worked for me:

npm install -g expo-cli

Upvotes: 6

Ahmed Taha
Ahmed Taha

Reputation: 131

My woking solution :

npm install -g expo-cli

Upvotes: 2

Andy Tran
Andy Tran

Reputation: 161

https://status.expo.io/incidents/vw27kb523vn7?u=mgkr96ykcctd

Turns out it's a known issue. One of Expo's certificates expired.

IMG

Upvotes: 5

Related Questions