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

Cant build react native from box in XCode: 'event2/event-config.h' file not found #30836

Closed
0xmikko opened this issue Feb 3, 2021 · 80 comments
Closed
Labels
Needs: Triage 🔍 Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@0xmikko
Copy link

0xmikko commented Feb 3, 2021

Please provide all the information requested. Issues that do not follow this format are likely to stall.

Description

Try to build clear image on iOS using XCode (Version 12.4 (12D4e)).

React Native version:

"react-native": "0.63.4", also try 0.63.3

Steps To Reproduce

Provide a detailed list of steps that reproduce the issue.

  1. Create an app using npx: npx react-native init mob4 --template react-native-template-typescript
  2. Install pods: cd ios && pod install
  3. Open XCode and press Build

Expected Results

Normal stub app

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

Screenshot 2021-02-03 at 13 47 17

@wooller
Copy link

wooller commented Feb 3, 2021

Exact same for me

@k001
Copy link

k001 commented Feb 3, 2021

same from my side:

ios/Pods/Headers/Public/libevent/event.h:44:10: 'event2/event-config.h' file not found

#include <event2/event-config.h>

@BG687
Copy link

BG687 commented Feb 3, 2021

Same for me

@nicolasdevienne
Copy link

same for me. this morning, it was ok. but this evening, after "pod install" on an existing project, I had this line : "removing cocoalibevent" and build failed...

@oliversieto
Copy link

Same for me. I needed to enable google maps on iOS, I run pod install and I can't build anymore.

@Jorge-Luis-Rangel-Peralta

Same here for me

@michaelvitello
Copy link

Same for me too

@Jorge-Luis-Rangel-Peralta

Not even reverting to legacy build system or re-installing pods worked for me

@blaur
Copy link

blaur commented Feb 3, 2021

Experiencing this exact error on our end.

@Jorge-Luis-Rangel-Peralta
Copy link

Jorge-Luis-Rangel-Peralta commented Feb 3, 2021

Updating from 0.63.3 to 0.63.4 does not work as stated by @michaelvitello

@blaur
Copy link

blaur commented Feb 3, 2021

For me I could get around it by:

  1. remove ios/Pods
  2. cd ios && pod repo update
  3. sudo gem install cocoapods
  4. npx pod-install

@ahmetcbk
Copy link

ahmetcbk commented Feb 3, 2021

By disabling Flipper in my Podfile it's worked !

@Jorge-Luis-Rangel-Peralta
Copy link

Jorge-Luis-Rangel-Peralta commented Feb 3, 2021

Disabling Flipper works like a charm.

Go to ios/Podfile

And comment this lines:

use_flipper!
post_install do |installer|
flipper_post_install(installer)
end

Then remove Pods and re-install them

@Jorge-Luis-Rangel-Peralta

The update is indeed needed to re-activate Flipper, if you do not require it then disable it, if you require it you will have to wait for the update

@michaelvitello
Copy link

Yes, that's the probably the best for now indeed

@meirinaldojunior
Copy link

Exact same for me :/

@michaelgmcd
Copy link
Contributor

This issue is caused by an update to the "Flipper-Folly" pod-spec. If you'd like to keep Flipper enabled, you can override the version in your Podfile:

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

@LuizFelipeh
Copy link

Thanks, Michael! That was exactly the issue (:

@meirinaldojunior
Copy link

Thanks! @michaelgmcd ! That's work for me.

@stothet
Copy link

stothet commented Feb 3, 2021

@michaelgmcd that worked for me too!

If you're using configurations, this is what I did
use_flipper!({ 'Flipper-Folly' => '2.3.0' }, configurations: ['Debug', 'Staging'])

@Amanek93
Copy link

Amanek93 commented Feb 3, 2021

This issue is caused by an update to the "Flipper-Folly" pod-spec. If you'd like to keep Flipper enabled, you can override the version in your Podfile:

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

working, thanks!

@BadtzMaru
Copy link

This issue is caused by an update to the "Flipper-Folly" pod-spec. If you'd like to keep Flipper enabled, you can override the version in your Podfile:

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

thanks, You did me a big favor!

@appasaheb4
Copy link

This issue is caused by an update to the "Flipper-Folly" pod-spec. If you'd like to keep Flipper enabled, you can override the version in your Podfile:

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

o great working thanks man.

@deepakverma4
Copy link

i'm facing library not found for -lPods-AppName error after updating "Flipper-Folly" pod-spec. Can anyone help me in resolving this please?

@pranathadoddy
Copy link

This issue is caused by an update to the "Flipper-Folly" pod-spec. If you'd like to keep Flipper enabled, you can override the version in your Podfile:

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

Thank you @michaelgmcd

@Theofilos-Chamalis
Copy link

I confirm the same problem as well. It is annoying how RN breaks every once in a while and small hacks like this are needed.

Thank you @michaelgmcd !

@oliveiraamanda91
Copy link

Thanks for the help!

@Cookizza
Copy link

Cookizza commented Feb 5, 2021

I am using bare expo and none of the above is working for me.. where would i put this use_flipper command - anywhere in my podfile seems to break it

@itaisir
Copy link

itaisir commented Feb 5, 2021

regardless of the way you are registering the flipper-folly just force this version 2.3.0
either

def add_flipper_pods!(versions = {})
  versions['Flipper-Folly'] ||= '~> 2.3.0'

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

@sefaenesergin
Copy link

Just update flipper is work.
use_flipper!({'Flipper' => '0.79.0'})

ıts worked for me. thx you

hyochan added a commit to hyochan/dooboo-native-ts that referenced this issue Mar 13, 2021
hyochan added a commit to hyochan/dooboo-native-ts that referenced this issue Mar 13, 2021
Removed `atomic design` presented in #164.

We'd rather use this pattern with more freedom.

* Android targetApi to 29

* Fixed gesture handler mock
   - Related software-mansion/react-native-gesture-handler#344

* Use [ThemeProvider] in `dooboo-ui`

* Updated packages

* Assign flipper version in ios pod
   - facebook/react-native#30836
@rochapablo
Copy link

All attempts of change to use_flipper!({'Flipper' => '*.*.*'}) did not work for me. It always fail the build with the same error #31181 (comment)

@wustzhy
Copy link

wustzhy commented Mar 31, 2021

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

@ssthil
Copy link

ssthil commented Apr 12, 2021

It worked for me.

My environment is:

"react": "16.13.1",
"react-native": "0.63.2",

Xcode: "12.4"

Update this change on ios/Podfile
use_flipper!({'Flipper' => '0.79.0'})

Make sure installed pods are up-to-date

pod repo update
cd ios && pod install && cd ..

And build it through Xcode -> Product -> Build

@SachinRajyaguru
Copy link

For me I could get around it by:

  1. remove ios/Pods
  2. cd ios && pod repo update
  3. sudo gem install cocoapods
  4. npx pod-install

this is not working

@SachinRajyaguru
Copy link

It worked for me.

My environment is:

"react": "16.13.1",
"react-native": "0.63.2",

Xcode: "12.4"

Update this change on ios/Podfile
use_flipper!({'Flipper' => '0.79.0'})

Make sure installed pods are up-to-date

pod repo update
cd ios && pod install && cd ..

And build it through Xcode -> Product -> Build

this idea is working for me

@flutterq
Copy link

[Solved] ‘event2/event-config.h’ file not found in React-Native

@aswinaryal
Copy link

This issue is caused by an update to the "Flipper-Folly" pod-spec. If you'd like to keep Flipper enabled, you can override the version in your Podfile:

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

Hi, i am getting this issue while trying to update flipper-folly inside Podfile

[!] CocoaPods could not find compatible versions for pod "Flipper-Folly":
In Podfile:
Flipper-Folly (= 2.3.0)

FlipperKit/Core (~> 0.75.1) was resolved to 0.75.1, which depends on
  Flipper (~> 0.75.1) was resolved to 0.75.1, which depends on
    Flipper-Folly (~> 2.5)

Specs satisfying the Flipper-Folly (= 2.3.0), Flipper-Folly (~> 2.5) dependency were found, but they required a higher minimum deployment target.

XCode: 12.5
React-Native: 0.64.0

@petekp
Copy link

petekp commented May 10, 2021

@aswinaryal Does pod install --repo-update fix your issue?

@mattyx96
Copy link

This issue is caused by an update to the "Flipper-Folly" pod-spec. If you'd like to keep Flipper enabled, you can override the version in your Podfile:

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

Hi, i am getting this issue while trying to update flipper-folly inside Podfile

[!] CocoaPods could not find compatible versions for pod "Flipper-Folly":
In Podfile:
Flipper-Folly (= 2.3.0)

FlipperKit/Core (~> 0.75.1) was resolved to 0.75.1, which depends on
  Flipper (~> 0.75.1) was resolved to 0.75.1, which depends on
    Flipper-Folly (~> 2.5)

Specs satisfying the Flipper-Folly (= 2.3.0), Flipper-Folly (~> 2.5) dependency were found, but they required a higher minimum deployment target.

XCode: 12.5
React-Native: 0.64.0

same here

@ynoval
Copy link

ynoval commented May 20, 2021

Using latest versions works for me
use_flipper!({'Flipper' => '0.91.1', 'Flipper-Folly' => '2.6.7', 'Flipper-RSocket' => '1.4.3'})

@amnbhr
Copy link

amnbhr commented Jun 17, 2021

Using latest versions works for me
use_flipper!({'Flipper' => '0.91.1', 'Flipper-Folly' => '2.6.7', 'Flipper-RSocket' => '1.4.3'})

it's work for me

@shrmaky
Copy link

shrmaky commented Jun 29, 2021

It worked for me with the latest flipper
use_flipper!({ 'Flipper' => '0.95.1', 'Flipper-Folly' => '2.6.7', 'Flipper-RSocket' => '1.4.3' })

@dehengxu
Copy link

I meet this issue on 0.63.4 , and I fix it by setting up 'System header search path' on some targets : FlipperKit, Flipper, Fliiper-Folly with value: "$(PODS_ROOT)/libevent/include" no-recursive
Another method you could upgrade to 0.64

@dehengxu
Copy link

Choose to use ReactNative you'd better master iOS/Android native development, cause RN is not stable at least development environment.

@riku99
Copy link

riku99 commented Nov 27, 2021

It worked for me.

use_flipper!({ 'Flipper' => '0.122.0' })
pod install --repo-update

Copy link

github-actions bot commented Nov 1, 2023

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Nov 1, 2023
Copy link

github-actions bot commented Nov 8, 2023

This issue was closed because it has been stalled for 7 days with no activity.

@github-actions github-actions bot closed this as completed Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Triage 🔍 Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests