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

Error: Redefinition of 'RCTMethodInfo' when including ReactNativeExceptionHandler.h #46

Closed
thatjuan opened this issue Mar 18, 2018 · 4 comments

Comments

@thatjuan
Copy link

When I include ReactNativeExceptionHandler.h in AppDelegate.m in order to use replaceNativeExceptionHandlerBlock, I get:

screenshot 2018-03-18 14 29 11

If I go into ReactNativeExceptionHandler.h and change:

#if __has_include("RCTBridgeModule.h")
#import "RCTBridgeModule.h"
#else
#import <React/RCTBridgeModule.h>
#endif

To just:

#import <React/RCTBridgeModule.h>

The problem goes away.

What could this be a symptom of?

@a7ul
Copy link
Owner

a7ul commented Mar 27, 2018

Does this issue still persists or were you able to find a fix for it @thatjuan ?

I am unable to replicate this :/

@thatjuan
Copy link
Author

thatjuan commented Apr 3, 2018

I had to continue using a custom version with this change:

thatjuan@808233f

It's almost as my codebase somehow has both RCTBridgeModule.h and <React/RCTBridgeModule.h> or something. I haven't had time to dig deeper.

@TomMahle
Copy link
Contributor

TomMahle commented Apr 5, 2018

I also had this issue and was able to solve it by using thatjuan's commit. Would it be possible to get that into the main branch, or would it be somehow harmful?

TomMahle added a commit to TomMahle/react-native-exception-handler that referenced this issue Apr 9, 2018
This appears to be the accepted fix for this issue: a7ul#46 per facebook/react-native#15775 (comment) and other posts in the same thread.
@a7ul
Copy link
Owner

a7ul commented Apr 9, 2018

This will be fixed in v2.7.5

@a7ul a7ul closed this as completed Apr 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants