react-native-quick-crypto icon indicating copy to clipboard operation
react-native-quick-crypto copied to clipboard

Fails to build for iOS in Expo EAS

Open danscan opened this issue 3 years ago • 10 comments

I'm encountering the following when trying to build for iOS in Expo EAS.

  • Version 0.4.3
  • No such issues happen when building locally on apple silicon
❌  Undefined symbols for architecture arm64
┌─ Symbol: _SHA512_Init
└─ Referenced from: _fastpbkdf2_hmac_sha512 in libreact-native-quick-crypto.a(fastpbkdf2.o)

❌  ld: symbol(s) not found for architecture arm64


❌  clang: error: linker command failed with exit code 1 (use -v to see invocation)

▸ ** ARCHIVE FAILED **
▸ The following build commands failed:
▸ 	Ld /Users/expo/Library/Developer/Xcode/DerivedData/Genesis-earvumgnsszrpedcrmdycnmubadt/Build/Intermediates.noindex/ArchiveIntermediates/Genesis/InstallationBuildProductsLocation/Applications/Genesis.app/Genesis normal (in target 'Genesis' from project 'Genesis')
▸ (1 failure)
2022-07-26 16:16:

Any ideas?

Very excited to try this lib!

danscan avatar Jul 26 '22 23:07 danscan

Hi!

Which React Native version are you using? Can you open your project in Xcode and try building from there, then send me a screenshot of the error window (where only errors are visible, not warnings)? Thanks!

mrousavy avatar Jul 28 '22 12:07 mrousavy

React Native 0.69.3 – weirdly, there were no build errors locally. They only occurred for me in EAS.

danscan avatar Jul 30 '22 15:07 danscan

Can you maybe share your Podfile.lock here? I'm trying to find out which OpenSSL version you are using.

mrousavy avatar Aug 01 '22 09:08 mrousavy

Do you use expo-community-flipper by any chance? Looks for me that openSSL version is the problem here.

Szymon20000 avatar Aug 01 '22 13:08 Szymon20000

I have a similar issue, but on a project without expo. flipper version is 0.156.0 and uses OpenSSL-universal version 1.1.1100 as react-native-quick-crypto needs 1.1.1300?

react-native version: 0.68.2 image

any suggestions?

PadovaY avatar Aug 01 '22 13:08 PadovaY

Looks like flipper is the issue. Can you comment out the use_flipper line from your podfile and check it one more time?

Szymon20000 avatar Aug 01 '22 14:08 Szymon20000

Looks like flipper is the issue. Can you comment out the use_flipper line from your podfile and check it one more time?

indeed commenting out use_flipper as suggested (and installing the needed pod CocoaAsyncSocket) enabled to archive successfully.

could you guys find a solution other than that? 🙏 @mrousavy @Szymon20000

PadovaY avatar Aug 01 '22 14:08 PadovaY

Running into the same issue. Would be great to have this working.

izakfilmalter avatar Aug 16 '22 20:08 izakfilmalter

It looks like the OpenSSL-Universal version is hardcoded in the Flipper-Folly podspec. Check out line 26 here: https://github.com/CocoaPods/Specs/blob/master/Specs/5/7/2/Flipper-Folly/2.6.10/Flipper-Folly.podspec.json. Updating the logic in there to read the version from an environment variable and defaulting to a hardcoded value would have been nice.

adilmezghouti avatar Aug 22 '22 20:08 adilmezghouti

Running into the same issue. Would be great to have this working.

Have you tried to add OpenSSL.xframework to the "Framework, Libraries, and Embedded Content" section of your project target? This fixed the issue for me.

adilmezghouti avatar Sep 09 '22 17:09 adilmezghouti