Expo building iOS – SSL_connect error

If you are trying to export an iOS project in Expo, you might encounter this error after authenticating with Apple:

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"

To solve this just execute the following commands:

 # 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

Open chat