facebook / react-native

A framework for building native applications using React
https://reactnative.dev
MIT License
118.45k stars 24.25k forks source link

openssl/opensslv.h' file not found #28409

Closed DaiYz closed 4 years ago

DaiYz commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

@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 commented 4 years ago

Xcode Version 11.4

xiaochuan4938 commented 4 years ago

2202A5DC-A801-4793-AF4E-FA7442DEC811

alloy commented 4 years ago

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 commented 4 years ago

+1

alloy commented 4 years ago

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!

cristinaITdeveloper commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

+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 commented 4 years ago

+1

alloy commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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

wjacker commented 4 years ago

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 commented 4 years ago

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 commented 3 years ago

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

fairysspring commented 3 years ago

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

idkjs commented 3 years ago

@fairysspring how did you update your ruby env? https://stackoverflow.com/questions/36485180/how-to-update-ruby-with-homebrew#36485498?

Lax commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

This helped fix.

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 commented 3 years ago

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 commented 3 years ago

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

ravi0the0sun commented 3 years ago

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 commented 3 years ago

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

gilbertl commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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

aqos156 commented 3 years ago

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)

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

I had the same issue, it seem the problem is with APFS case SENSITIVE file system. Here is the link https://github.com/krzyzanowskim/OpenSSL/issues/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 commented 3 years ago

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 https://github.com/facebook/react-native/issues/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: https://github.com/facebook/react-native/issues/28409#issuecomment-833182353 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 https://github.com/facebook/react-native/issues/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 commented 3 years ago

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 commented 3 years ago

'openssl/opensslv.h' file not found

choonq commented 3 years ago

'openssl/opensslv.h' file not found

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

then

rm Podfile.lock pod install

worked for me!

winmuse commented 3 years ago

Hi, I am sorry, how are you?

On Fri, Aug 13, 2021, 5:23 PM Dong Choon @.***> wrote:

'openssl/opensslv.h' file not found

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

then

rm Podfile.lock pod install

worked for me!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/facebook/react-native/issues/28409#issuecomment-898314663, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASC5ZQXBK4JUU5CHI4ETJRDT4TQAVANCNFSM4LUYXYQQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

thanhdatpd commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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