Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openssl/opensslv.h' file not found #28409

Closed
DaiYz opened this issue Mar 27, 2020 · 51 comments
Closed

openssl/opensslv.h' file not found #28409

DaiYz opened this issue Mar 27, 2020 · 51 comments
Labels
Needs: Triage 🔍 Resolution: Locked This issue was locked by the bot.

Comments

@DaiYz
Copy link

DaiYz commented Mar 27, 2020

Description

Pods/Headers/Private/Flipper-Folly/folly/portability/OpenSSL.h:26:10: 'openssl/opensslv.h' file not found

React Native version:

React-Natvie: 0.62
OS: macOS 10.15.4

Steps To Reproduce

Provide a detailed list of steps that reproduce the issue.

  1. npx react-native init Demo
  2. cd Demo / npx react-native run-ios

Expected Results

Xcode build successfully

Snack, code example, screenshot, or link to a repository:

Please provide a Snack (https://snack.expo.io/), a link to a repository on GitHub, or provide a minimal code example that reproduces the problem.
You may provide a screenshot of the application if you think it is relevant to your bug report.
Here are some tips for providing a minimal example: https://stackoverflow.com/help/mcve

@alloy
Copy link
Contributor

alloy commented Mar 27, 2020

Seems to work fine for me:

~/tmp » npx react-native init Demo
[…]
✔ Downloading template
✔ Copying template
✔ Processing template
✔ Installing CocoaPods dependencies (this may take a few minutes)
~/tmp » cd Demo/
~/t/Demo » npx react-native run-ios
info Found Xcode workspace "Demo.xcworkspace"
info Launching iPhone 11 (iOS 13.4)
info Building (using "xcodebuild -workspace Demo.xcworkspace -configuration Debug -scheme Demo -destination id=B9F2DEA5-13C9-4E2D-B239-69CA094AD1F8")
[…]
info Installing "/Users/eloy/Library/Developer/Xcode/DerivedData/Demo-gqwvjbhezendjvbjuzjpgewonvlm/Build/Products/Debug-iphonesimulator/Demo.app"
info Launching "org.reactjs.native.example.Demo"
success Successfully launched the app on the simulator

Perhaps the CocoaPods installation didn’t work well for you? Can you try the following and then build again?

~/t/Demo » cd ios/
~/t/D/ios » pod install
[…]
Pod installation complete! There are 33 dependencies from the Podfile and 37 total pods installed.

If still not, please run run-ios with the --verbose flag and paste the output.

@DaiYz
Copy link
Author

DaiYz commented Mar 28, 2020

@alloy

** BUILD FAILED **

The following build commands failed:
CompileC /Users/joe/Library/Developer/Xcode/DerivedData/Demo-dkuvxchlfnnanoctbfchibozyypb/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Flipper-Folly.build/Objects-normal/x86_64/AsyncPipe.o /Users/joe/Develop/yizhimei/Demo/ios/Pods/Flipper-Folly/folly/io/async/AsyncPipe.cpp
normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

@DaiYz
Copy link
Author

DaiYz commented Mar 28, 2020

Xcode Version 11.4

@xiaochuan4938
Copy link

2202A5DC-A801-4793-AF4E-FA7442DEC811

@alloy
Copy link
Contributor

alloy commented Mar 30, 2020

Alas I can’t do anything without more tangible information. Can you please share an example app that demonstrates the problem and that has all files checked in, including the ios/Pods directory?

@gao520sun
Copy link

+1

@alloy
Copy link
Contributor

alloy commented Apr 7, 2020

I’m going to close this for now, as there is no details for me to work with. Please do follow-up, though, and we can re-open the issue!

@alloy alloy closed this as completed Apr 7, 2020
@cristinaITdeveloper
Copy link

cristinaITdeveloper commented Apr 8, 2020

I have the same problem!

React-Natvie: 0.62.1
OS: macOS 10.14.6

I created the app with the command
npx react-native init
then I tried launching the app on the simulator with Xcode and getting that problem.

I have also tried using pod install, but it doesn't work.

@luism3861
Copy link
Contributor

hi i have the same problem i try to create a project with 0.62.2 but when i try to run in xcode appers this error , i try to install pod install but it doesn't work.

@alloy
Copy link
Contributor

alloy commented Apr 8, 2020

As mentioned before, I can’t do anything without an example app that reproduces the problem, so please help me help you by sharing such an example. 🙏

@luism3861
Copy link
Contributor

this is my error when i try to run "react-native run-ios"
fatal error: 'openssl/opensslv.h' file not found
#include <openssl/opensslv.h>
^~~~~~~~~~~~~~~~~~~~
1 error generated.

@daysv
Copy link

daysv commented Apr 10, 2020

+1

  1. upgrade react-native from 0.59 to 0.62.2. ❌
  2. npx react-native init Demo ❌
  3. upgarde Mac OS Catalina 10.15.4 & reinstall Xcode 11.4 ❌
  4. set Flipper-Folly target build settings header search paths library search paths, add libcrypto.a and libssl.a in Link Binary With Libraries, seems to work but causes other problems.
  5. finally I remove Flipper in Podfile and AppDelegate.m

@Sdoy
Copy link

Sdoy commented Apr 13, 2020

+1

@alloy
Copy link
Contributor

alloy commented Apr 14, 2020

I’m unsubscribing from this issue, as I mentioned what is needed to progress and until then this just adds to my notification load. When somebody posts a reproducing example, please @ mention me 🙏

@spuntin
Copy link

spuntin commented Apr 14, 2020

Creating a project with a slightly older version (0.61.5) worked for me. I've no idea why it worked, but thought i'd mention it in case it helps anyone else :)

npx react-native init AwesomeProject --version 0.61.5

@khkwan0
Copy link

khkwan0 commented Apr 16, 2020

I had the same issue. Could not find openSSL.
Latest Xcode version 11.4.1
Catalina.

SOLVED (for me at least).
I hope this helps everyone.

tldr:

  1. brew update // make sure it's up to date
  2. brew upgrade ruby // this takes a while. we really want to update gems
  3. sudo gem install cocoapods
  4. Restart Xcode
  5. Problem disappeared for me. Built successully.

the long version:
Here was my process. At first I couldn't even get a pod install to work correctly.

I went and 'mv ~/.cocoapods ~/.cocoapods.bak'
Basically I renamed the ./cocoapods directory in your home dir.

Then reran pod install. That worked. Buuuuttttt, when I hit Play in Xcode, the build failed with the openssl issue. For some reason it's not in the path. One option was to go find it and stick it in the build settings search path. hack hack hack. Not feeling that solution...so...

Hunch was somewhere in pod install. Had to go through some arduous process to update pod.

  1. brew update // make sure it's up to date
  2. brew upgrade ruby // this takes a while. we really want to update gems
  3. sudo gem install cocoapods
  4. Restart Xcode
  5. Problem disappeared for me. Built successully.

So basically, you want to upgrade cocoapods to get the latest 'pod' executable. One way top update is with "gems", but that should be updated too, so you do that with updating ruby by using brew, and of course make sure brew is up to date. Egads!

Was not a fan of updating minor versions.

@dushaobindoudou
Copy link

React-Natvie: 0.62.2

when i use brew install coocoapods this error has occurred.

use sudo gem install cocoapods fix this error.

Hope it helps

@wjacker
Copy link

wjacker commented Jun 30, 2020

+1 same issue with Xcode 11.5 macOS 10.15.5 when run
npx react-native run-ios

@wjacker
Copy link

wjacker commented Jun 30, 2020

Finally I found it's Pod config issue, add "${PODS_ROOT}/Headers/Public/OpenSSL_Universal" into Flipper, Flipper-Folly, Flipper-RSocket Targets->Build Setting->Header Search Paths. then rebuild project, this error will disappear 😄 @alloy

@luism3861
Copy link
Contributor

luism3861 commented Jul 2, 2020

Finally I found it's Pod config issue, add "${PODS_ROOT}/Headers/Public/OpenSSL_Universal" into Flipper, Flipper-Folly, Flipper-RSocket Targets->Build Setting->Header Search Paths. then rebuild project, this error will disappear 😄 @alloy

thank you so much it works for me!!!

React-Native: 0.62.2
Xcode: 11.4
OS: macOS Catalina 10.15.5
Pods Version: 1.7.0

👍

@KalebPortillo
Copy link

Still happening on a fresh install of React native 0.63 via npx react-native init AwesomeProject

@fairysspring
Copy link

cocoapods auto create the project with wrong infos,so i update the ruby env to latest ,and it works for me

@idkjs
Copy link

idkjs commented Feb 26, 2021

@Lax
Copy link

Lax commented Mar 11, 2021

npx react-native run-ios --verbose shows the following messages:

CompileC /Users/Lax/Library/Developer/Xcode/DerivedData/AwesomeTSProject-eeatlbsvwbdhoggydvqoqmuxyuas/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Flipper.build/Objects-normal/x86_64/CertificateUtils.o /tmp/AwesomeTSProject/ios/Pods/Flipper/xplat/Flipper/CertificateUtils.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'Flipper' from project 'Pods')
    cd /tmp/AwesomeTSProject/ios/Pods
    export LANG\=en_US.US-ASCII
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c++ -target x86_64-apple-ios8.0-simulator -fmessage-length\=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit\=0 -std\=c++14 -stdlib\=libc++ -fmodules -fmodules-cache-path\=/Users/Lax/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -fmodules-prune-interval\=86400 -fmodules-prune-after\=345600 -fbuild-session-file\=/Users/Lax/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror\=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Werror\=return-type -Wdocumentation -Wunreachable-code -Werror\=deprecated-objc-isa-usage -Werror\=objc-root-class -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions -DPOD_CONFIGURATION_DEBUG\=1 -DDEBUG\=1 -DCOCOAPODS\=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof -g -Wno-sign-conversion -Winfinite-recursion -Wmove -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wrange-loop-analysis -Wno-semicolon-before-method-body -Wunguarded-availability -index-store-path /Users/Lax/Library/Developer/Xcode/DerivedData/AwesomeTSProject-eeatlbsvwbdhoggydvqoqmuxyuas/Index/DataStore -I/Users/Lax/Library/Developer/Xcode/DerivedData/AwesomeTSProject-eeatlbsvwbdhoggydvqoqmuxyuas/Build/Products/Debug-iphonesimulator/Flipper/include -I/tmp/AwesomeTSProject/ios/Pods/Headers/Private -I/tmp/AwesomeTSProject/ios/Pods/Headers/Private/Flipper -I/tmp/AwesomeTSProject/ios/Pods/Headers/Public -I/tmp/AwesomeTSProject/ios/Pods/Headers/Public/Flipper -I/tmp/AwesomeTSProject/ios/Pods/Headers/Public/Flipper-DoubleConversion -I/tmp/AwesomeTSProject/ios/Pods/Headers/Public/Flipper-Folly -I/tmp/AwesomeTSProject/ios/Pods/Headers/Public/Flipper-Glog -I/tmp/AwesomeTSProject/ios/Pods/Headers/Public/Flipper-RSocket -I/tmp/AwesomeTSProject/ios/Pods/Headers/Public/libevent -I/tmp/AwesomeTSProject/ios/Pods/Flipper -I/tmp/AwesomeTSProject/ios/Pods/boost-for-react-native -I/tmp/AwesomeTSProject/ios/Pods/Flipper-RSocket -I/tmp/AwesomeTSProject/ios/Pods/Flipper-DoubleConversion -I/Users/Lax/Library/Developer/Xcode/DerivedData/AwesomeTSProject-eeatlbsvwbdhoggydvqoqmuxyuas/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Flipper.build/DerivedSources-normal/x86_64 -I/Users/Lax/Library/Developer/Xcode/DerivedData/AwesomeTSProject-eeatlbsvwbdhoggydvqoqmuxyuas/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Flipper.build/DerivedSources/x86_64 -I/Users/Lax/Library/Developer/Xcode/DerivedData/AwesomeTSProject-eeatlbsvwbdhoggydvqoqmuxyuas/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Flipper.build/DerivedSources -F/Users/Lax/Library/Developer/Xcode/DerivedData/AwesomeTSProject-eeatlbsvwbdhoggydvqoqmuxyuas/Build/Products/Debug-iphonesimulator/Flipper -F/tmp/AwesomeTSProject/ios/Pods/OpenSSL-Universal/Frameworks -F/Users/Lax/Library/Developer/Xcode/DerivedData/AwesomeTSProject-eeatlbsvwbdhoggydvqoqmuxyuas/Build/Products/Debug-iphonesimulator/XCFrameworkIntermediates/OpenSSL -DFLIPPER_OSS\=1 -DFB_SONARKIT_ENABLED\=1 -DFOLLY_NO_CONFIG -DFOLLY_MOBILE\=1 -DFOLLY_USE_LIBCPP\=1 -DFOLLY_HAVE_LIBGFLAGS\=0 -DFOLLY_HAVE_LIBJEMALLOC\=0 -DFOLLY_HAVE_PREADV\=0 -DFOLLY_HAVE_PWRITEV\=0 -DFOLLY_HAVE_TFO\=0 -DFOLLY_USE_SYMBOLIZER\=0 -Wall -std\=c++14 -Wno-global-constructors -include /tmp/AwesomeTSProject/ios/Pods/Target\ Support\ Files/Flipper/Flipper-prefix.pch -MMD -MT dependencies -MF /Users/Lax/Library/Developer/Xcode/DerivedData/AwesomeTSProject-eeatlbsvwbdhoggydvqoqmuxyuas/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Flipper.build/Objects-normal/x86_64/CertificateUtils.d --serialize-diagnostics /Users/Lax/Library/Developer/Xcode/DerivedData/AwesomeTSProject-eeatlbsvwbdhoggydvqoqmuxyuas/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Flipper.build/Objects-normal/x86_64/CertificateUtils.dia -c /tmp/AwesomeTSProject/ios/Pods/Flipper/xplat/Flipper/CertificateUtils.cpp -o /Users/Lax/Library/Developer/Xcode/DerivedData/AwesomeTSProject-eeatlbsvwbdhoggydvqoqmuxyuas/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Flipper.build/Objects-normal/x86_64/CertificateUtils.o

debug In file included from /tmp/AwesomeTSProject/ios/Pods/Flipper/xplat/Flipper/CertificateUtils.cpp:8:
/tmp/AwesomeTSProject/ios/Pods/Flipper/xplat/Flipper/CertificateUtils.h:11:10: fatal error: 'openssl/pem.h' file not found
#include <openssl/pem.h>
         ^~~~~~~~~~~~~~~
1 error generated.

@anandchakru
Copy link

I’m unsubscribing from this issue, as I mentioned what is needed to progress and until then this just adds to my notification load. When somebody posts a reproducing example, please @ mention me 🙏

@alloy Pls chk here for reproducing example.

@anandchakru
Copy link

This helped fix.

  • Remove Podfile.lock file
  • Add pod 'OpenSSL-Universal', '~>1.0.2.20' to Podfile like so:
platform :ios, '10.0'

pod 'OpenSSL-Universal', '~>1.0.2.20'

target 'deeplink' do
  • (cd ios; pod install)
  • npm run ios

@alloy appreciate if it can be resolved to make it work with latest OpenSSL-Universal out of the box

@gilbertl
Copy link

This helped fix.

  • Remove Podfile.lock file

  • Add pod 'OpenSSL-Universal', '~>1.0.2.20' to Podfile like so:

platform :ios, '10.0'



pod 'OpenSSL-Universal', '~>1.0.2.20'



target 'deeplink' do
  • (cd ios; pod install)

  • npm run ios

@alloy appreciate if it can be resolved to make it work with latest OpenSSL-Universal out of the box

Note that the older version of OpenSSL-Universal will
Not be compatible with the upcoming release (0.64).

@anandchakru
Copy link

@gilbertl, let's hope 0.64 is tested for this scenario before releasing.

@ravi0the0sun
Copy link

ravi0the0sun commented Mar 15, 2021

getting the same error after trying to upgrade from "react-native": "0.63.4" to 0.64 by using react-native upgrade in my project

System:
    OS: macOS 10.15.7
    CPU: (4) x64 Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz
    Memory: 3.82 GB / 16.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 14.15.1 - /var/folders/nf/83z965450dd46qzdlrd86t6h0000gn/T/fnm_multishell_5077_1615785119485/bin/node
    Yarn: 1.22.10 - /var/folders/nf/83z965450dd46qzdlrd86t6h0000gn/T/fnm_multishell_5077_1615785119485/bin/yarn
    npm: 6.14.11 - /var/folders/nf/83z965450dd46qzdlrd86t6h0000gn/T/fnm_multishell_5077_1615785119485/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.10.1 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.2, DriverKit 19.0, macOS 10.15, tvOS 14.2, watchOS 7.1
    Android SDK:
      API Levels: 23, 28, 29, 30
      Build Tools: 28.0.3, 29.0.2, 29.0.3, 30.0.2
      System Images: android-28 | Intel x86 Atom_64, android-28 | Google APIs Intel x86 Atom_64, android-28 | Google Play Intel x86 Atom_64, android-29 | Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom_64, android-29 | Google Play Intel x86 Atom_64, android-30 | Google APIs Intel x86 Atom_64, android-30 | Google Play Intel x86 Atom_64
      Android NDK: Not Found
  IDEs:
    Android Studio: 4.1 AI-201.8743.12.41.7042882
    Xcode: 12.1.1/12A7605b - /usr/bin/xcodebuild
  Languages:
    Java: 15.0.2 - /usr/bin/javac
    Python: 2.7.16 - /usr/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.13.1 => 16.13.1 
    react-native: 0.63.4 => 0.63.4 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

@anandchakru
Copy link

Update: Unable to reproduce this issue after I reinstalled the OS from scratch.
Some kind of incomplete cleanup/initialization is the root cause ?

@gilbertl
Copy link

gilbertl commented Mar 17, 2021

Update: Unable to reproduce this issue after I reinstalled the OS from scratch.
Some kind of incomplete cleanup/initialization is the root cause ?

Are you saying you reinstalled OSX or iOS ?

If OSX, did you use a time machine backup, or was it a completely clean install?

@anandchakru
Copy link

anandchakru commented Mar 17, 2021

OSX, When frustration > patience, you do

  1. Full HD wipe
  2. New install Catalina
  3. Upgrade to latest (Bug Sur/v11.2.3)
    🤪

Apologies, if that wasn't a lot of help, I'm sure there is an easier way and we'll be able to find it.

Update: Unable to reproduce this issue after I reinstalled the OS from scratch.
Some kind of incomplete cleanup/initialization is the root cause ?

Are you saying you reinstalled OSX or iOS ?

If OSX, did you use a time machine backup, or was it a completely clean install?

@ravi0the0sun
Copy link

OSX, When frustration > patience, you do

  1. Full HD wipe
  2. New install Catalina
  3. Upgrade to latest (Bug Sur/v11.2.3)
    🤪

Apologies, if that wasn't a lot of help, I'm sure there is an easier way and we'll be able to find it.

Update: Unable to reproduce this issue after I reinstalled the OS from scratch.
Some kind of incomplete cleanup/initialization is the root cause ?

Are you saying you reinstalled OSX or iOS ?
If OSX, did you use a time machine backup, or was it a completely clean install?

WTF

@aqos156
Copy link

aqos156 commented Mar 21, 2021

Anybody was able to resolve this issue in any other way? I was unable to solve it with these proposed fixes.

@aqos156
Copy link

aqos156 commented Mar 23, 2021

Well, I did a complete system wipe and fresh install of Big Sur yesterday (at least my system was pretty bloated, so it was time for it already)

  • recovery mode (cmd + r at boot time)
  • wiped whole main drive partition via recovery menu
  • install Big Sur from recovery menu.

Sadly I can confirm that it fixed the issue for me and it was the only working solution.

One thing is interesting, I had firstly only reinstalled the Big Sur (no user data wipe) and the problem persisted (also redid the whole deed with pod install etc..)

I think it may not be something connected with react-native but as @anandchakru said:

Update: Unable to reproduce this issue after I reinstalled the OS from scratch.
Some kind of incomplete cleanup/initialization is the root cause ?

it may be some sort of incomplete installation of something. My co-worker (we have the exact same models and did the Big Sur update in the same way) didn't have any issues even with freshly init project (I was unable to compile it without this error)

Side note: I have not touched on any RN project for about 6 months and only recently just got to refreshing our apps packages and stuff and this came up.

@hepoblet
Copy link

hepoblet commented Mar 23, 2021

I solved it using the old version of Flipper Folly (2.3.0)

Modify the Podfile with this configuration

React Native 0.63.4

use_flipper!({
  'Flipper-Folly' => '2.3.0'
})

React Native 0.64.0

use_flipper!({
  'Flipper' => '0.54.0',
  'Flipper-RSocket' => '1.1',
  'Flipper-Folly' => '2.3.0'
})

Greetings Bug Sur OSX

@MMasterson
Copy link

Using the older version of Flipper Folly fixed it, but I also had to remove the Pods directory and install fresh after editing the Podfile

rm -r -f Pods/

@apps-shiksha
Copy link

apps-shiksha commented Mar 26, 2021

I just upgraded to RN 64 and have the same issue. I tried this solution as well didn't work.

How to use this

use_flipper!({ 'Flipper' => '0.54.0', 'Flipper-RSocket' => '1.1', 'Flipper-Folly' => '2.3.0' })

as it will create duplicate entries:

[!] CocoaPods could not find compatible versions for pod "FlipperKit": In Podfile: FlipperKit (= 0.54.0) FlipperKit (~> 0.75.1)

If anyone is facing this duplicate issue ... we need to remove use_flipper! which is already there ... that's one more dumb thing that I did :)

@gilbertl
Copy link

Well, I did a complete system wipe and fresh install of Big Sur yesterday (at least my system was pretty bloated, so it was time for it already)

  • recovery mode (cmd + r at boot time)
  • wiped whole main drive partition via recovery menu
  • install Big Sur from recovery menu.

Sadly I can confirm that it fixed the issue for me and it was the only working solution.

One thing is interesting, I had firstly only reinstalled the Big Sur (no user data wipe) and the problem persisted (also redid the whole deed with pod install etc..)

I think it may not be something connected with react-native but as @anandchakru said:

Update: Unable to reproduce this issue after I reinstalled the OS from scratch.
Some kind of incomplete cleanup/initialization is the root cause ?

it may be some sort of incomplete installation of something. My co-worker (we have the exact same models and did the Big Sur update in the same way) didn't have any issues even with freshly init project (I was unable to compile it without this error)

Side note: I have not touched on any RN project for about 6 months and only recently just got to refreshing our apps packages and stuff and this came up.

I wiped by disk as well and reinstalled Big Sur. However, the first time I did this, the same "openssl/opeensslv.h file not found" error surfaced.

I wiped the disk again and reinstalled Big Sur a SECOND time. But this time

  1. I specified APFS case INSENSITIVE
  2. I installed XCode first thing, before installing anything else (e.g brew)

Something clicked and I 'm able to run

npx react-native init AwesomeProject --version 0.64

without any problems

@aqos156
Copy link

aqos156 commented Apr 1, 2021

I have APFS case SENSITIVE and when I was reinstalling the whole system I started downloading all things from appstore (xcode, word, etc..) and in the meantime I installed zsh, brew, etc...

After that it worked so I don't know where could the problem be.

@hostingoutfit
Copy link

xcode = Version 12.4
Macos = 10.15.7
I got same error since 2 weeks long, I try almost every thing like remove node folder reinstall react native, upgrades, brew installation, gem installation also update xcode restart everything but I did not get solve of this error.
I am very new to react native, I am unable to run simple hello world application. Let me know where I do wrong or react native environment is not setup correctly.
Regards

@felexx90
Copy link

felexx90 commented May 6, 2021

I had the same issue, it seem the problem is with APFS case SENSITIVE file system. Here is the link krzyzanowskim/OpenSSL#117. what I did as workaround was made a symbolic link to the framework folder with the same name but all lowercase. here is the code I put in the Podfile to create the links.

post_install do |installer|
  flipper_post_install(installer)
  # Other stuff here ...
  system('cd Pods/Headers/Public; ln -s Protobuf protobuf')
  system('cd Pods/OpenSSL-Universal/Frameworks/OpenSSL.xcframework/ios-arm64_arm64e_armv7_armv7s; ln -sfh OpenSSL.framework openssl.framework')
  system('cd Pods/OpenSSL-Universal/Frameworks/OpenSSL.xcframework/ios-arm64_i386_x86_64-simulator; ln -sfh OpenSSL.framework openssl.framework')
  system('cd Pods/OpenSSL-Universal/Frameworks/OpenSSL.xcframework/ios-arm64_x86_64-maccatalyst; ln -sfh OpenSSL.framework openssl.framework')
  system('cd Pods/OpenSSL-Universal/Frameworks/OpenSSL.xcframework/macos-arm64_arm64e_x86_64; ln -sfh OpenSSL.framework openssl.framework')

end

@ravi0the0sun
Copy link

ravi0the0sun commented May 21, 2021

I solved it using the old version of Flipper Folly (2.3.0)

Modify the Podfile with this configuration

React Native 0.63.4

use_flipper!({
  'Flipper-Folly' => '2.3.0'
})

React Native 0.64.0

use_flipper!({
  'Flipper' => '0.54.0',
  'Flipper-RSocket' => '1.1',
  'Flipper-Folly' => '2.3.0'
})

Greetings Bug Sur OSX

thank you so much for this it removed openssl error but then it showed error saying node not found which i was able to solve by this #31480 also because i was using https://github.com/Schniz/fnm

currently i have the latest node@16 version installed using homebrew and it is working fine i will update this comment after testing it on node@LTS wish me luck 👍

Edit 1: so i just need to find the proper PATH to node file from the bin and i was able to use node@LTS with fnm but not if i had node@LTS installed through brew where it places the node file in opt folder

Edit 2: well everything was okay untill i changed to an iphone 8 device then it just broke and now i have that same error above and i have no idea on how it was fixed the last time

Edit 3: #28409 (comment) this helped me out with the openssl as i had APFS case sensitive file system that was causing this error but now i get this error #31181 where xcode cant find node

Edit 4: good news when building using yarn ios the app gets build without any errors but it take a lot more time and the simulator feels a bit sluggish. but at least its working now. now its time for me to go back to work

Exposition on current error while using xcode to build my project xcode throws PhaseScript error where it cannot find node as a global var.

Error: Could not find node. Make sure it is in bash PATH or set the NODE_BINARY environment variable.
Command PhaseScriptExecution failed with a nonzero exit code

@deva11
Copy link

deva11 commented May 21, 2021

Add below line to pod file.
RN 0.63.4

Replace existing line ,
use_flipper!({ 'Flipper-Folly' => '2.5.3', 'Flipper' => '0.87.0', 'Flipper-RSocket' => '1.3.1' }),

with

use_flipper!({ 'Flipper-Folly' => '2.3.0', 'Flipper-RSocket' => '1.1' })

Worked like charm!

@winmuse
Copy link

winmuse commented Aug 2, 2021

'openssl/opensslv.h' file not found

@choonq
Copy link

choonq commented Aug 13, 2021

'openssl/opensslv.h' file not found

use_filpper!() to #use_flipper!() in Podfile

then

rm Podfile.lock
pod install

worked for me!

@winmuse
Copy link

winmuse commented Aug 13, 2021 via email

@thanhdatpd
Copy link

I had the same issue, it seem the problem is with APFS case SENSITIVE file system. Here is the link krzyzanowskim/OpenSSL#117. what I did as workaround was made a symbolic link to the framework folder with the same name but all lowercase. here is the code I put in the Podfile to create the links.

post_install do |installer|
  flipper_post_install(installer)
  # Other stuff here ...
  system('cd Pods/Headers/Public; ln -s Protobuf protobuf')
  system('cd Pods/OpenSSL-Universal/Frameworks/OpenSSL.xcframework/ios-arm64_arm64e_armv7_armv7s; ln -sfh OpenSSL.framework openssl.framework')
  system('cd Pods/OpenSSL-Universal/Frameworks/OpenSSL.xcframework/ios-arm64_i386_x86_64-simulator; ln -sfh OpenSSL.framework openssl.framework')
  system('cd Pods/OpenSSL-Universal/Frameworks/OpenSSL.xcframework/ios-arm64_x86_64-maccatalyst; ln -sfh OpenSSL.framework openssl.framework')
  system('cd Pods/OpenSSL-Universal/Frameworks/OpenSSL.xcframework/macos-arm64_arm64e_x86_64; ln -sfh OpenSSL.framework openssl.framework')

end

+1 working

@dgreasi
Copy link

dgreasi commented Sep 9, 2021

I had the same issue, it seem the problem is with APFS case SENSITIVE file system. Here is the link krzyzanowskim/OpenSSL#117. what I did as workaround was made a symbolic link to the framework folder with the same name but all lowercase. here is the code I put in the Podfile to create the links.

post_install do |installer|
  flipper_post_install(installer)
  # Other stuff here ...
  system('cd Pods/Headers/Public; ln -s Protobuf protobuf')
  system('cd Pods/OpenSSL-Universal/Frameworks/OpenSSL.xcframework/ios-arm64_arm64e_armv7_armv7s; ln -sfh OpenSSL.framework openssl.framework')
  system('cd Pods/OpenSSL-Universal/Frameworks/OpenSSL.xcframework/ios-arm64_i386_x86_64-simulator; ln -sfh OpenSSL.framework openssl.framework')
  system('cd Pods/OpenSSL-Universal/Frameworks/OpenSSL.xcframework/ios-arm64_x86_64-maccatalyst; ln -sfh OpenSSL.framework openssl.framework')
  system('cd Pods/OpenSSL-Universal/Frameworks/OpenSSL.xcframework/macos-arm64_arm64e_x86_64; ln -sfh OpenSSL.framework openssl.framework')

end

Seems to work fine. But it will fail if you are working a project on both machine types (Case-Sensitive, Case-Insensitive). Any workarounds?

@lucarge
Copy link

lucarge commented Sep 10, 2021

Seems to work fine. But it will fail if you are working a project on both machine types (Case-Sensitive, Case-Insensitive). Any workarounds?

I think you can conditionally make the symlinks, using a condition to determine if the file system is case-sensitive or not.

Example:

post_install do |installer|
  flipper_post_install(installer)

  # The real directory is /Users/<user>/Library.
  # In case-sensitive file systems the file won't exists.
  unless File.exist? "/Users/#{ENV['USER']}/library"
    system('cd Pods/Headers/Public; ln -s Protobuf protobuf')
    system('cd Pods/OpenSSL-Universal/Frameworks/OpenSSL.xcframework/ios-arm64_arm64e_armv7_armv7s; ln -sfh OpenSSL.framework openssl.framework')
    system('cd Pods/OpenSSL-Universal/Frameworks/OpenSSL.xcframework/ios-arm64_i386_x86_64-simulator; ln -sfh OpenSSL.framework openssl.framework')
    system('cd Pods/OpenSSL-Universal/Frameworks/OpenSSL.xcframework/ios-arm64_x86_64-maccatalyst; ln -sfh OpenSSL.framework openssl.framework')
    system('cd Pods/OpenSSL-Universal/Frameworks/OpenSSL.xcframework/macos-arm64_arm64e_x86_64; ln -sfh OpenSSL.framework openssl.framework')
  end
end

@2meeltd
Copy link

2meeltd commented Sep 27, 2021

Where your build file system is not the same as /Users, use just pods as the test case!

post_install do |installer|
  flipper_post_install(installer)

  # The real directory is /Users/<user>/Library.
  # In case-sensitive file systems the file won't exists.
  unless File.exist? "pods"
    system('cd Pods/Headers/Public; ln -s Protobuf protobuf')
    system('cd Pods/OpenSSL-Universal/Frameworks/OpenSSL.xcframework/ios-arm64_arm64e_armv7_armv7s; ln -sfh OpenSSL.framework openssl.framework')
    system('cd Pods/OpenSSL-Universal/Frameworks/OpenSSL.xcframework/ios-arm64_i386_x86_64-simulator; ln -sfh OpenSSL.framework openssl.framework')
    system('cd Pods/OpenSSL-Universal/Frameworks/OpenSSL.xcframework/ios-arm64_x86_64-maccatalyst; ln -sfh OpenSSL.framework openssl.framework')
    system('cd Pods/OpenSSL-Universal/Frameworks/OpenSSL.xcframework/macos-arm64_arm64e_x86_64; ln -sfh OpenSSL.framework openssl.framework')
  end
end

@facebook facebook locked as resolved and limited conversation to collaborators Oct 1, 2021
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Oct 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Needs: Triage 🔍 Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests