question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Thread 1: "You must override the `supportedEvents` method of RCTJCoreModule"

See original GitHub issue

Description

Xcode run app error: Thread 1: “You must override the supportedEvents method of RCTJCoreModule”

I don’t know why it’s happening, can you tell me what’s wrong?

Version

0.67.2

Output of npx react-native info

System: OS: macOS 11.5.2 CPU: (4) x64 Intel® Core™ i5-5257U CPU @ 2.70GHz Memory: 63.46 MB / 8.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 16.10.0 - /usr/local/bin/node Yarn: 1.22.11 - /usr/local/bin/yarn npm: 6.12.0 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman Managers: CocoaPods: 1.11.2 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4 Android SDK: API Levels: 21, 23, 25, 26, 27, 28, 29, 30 Build Tools: 26.0.2, 27.0.3, 28.0.2, 28.0.3, 29.0.2, 29.0.3, 30.0.2, 30.0.3 System Images: android-29 | Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom Android NDK: Not Found IDEs: Android Studio: 2020.3 AI-203.7717.56.2031.7678000 Xcode: 12.5.1/12E507 - /usr/bin/xcodebuild Languages: Java: 1.8.0_181 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 17.0.2 => 17.0.2 react-native: 0.67.2 => 0.67.2 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found

Steps to reproduce

Xcode run app

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

image

2022-05-16 22:27:16.639224+0800 PineConesGoField[59041:569305] *** Assertion failure in +RCTEventEmitter initialize, /Users/mac/pineconesgofield/node_modules/react-native/React/Modules/RCTEventEmitter.m:32 2022-05-16 22:27:16.759097+0800 PineConesGoField[59041:569305] *** Terminating app due to uncaught exception ‘NSInternalInconsistencyException’, reason: ‘You must override the supportedEvents method of RCTJCoreModule’ *** First throw call stack: ( 0 CoreFoundation 0x000000010e200fba _exceptionPreprocess + 242 1 libobjc.A.dylib 0x00000001145a7ff5 objc_exception_throw + 48 2 CoreFoundation 0x000000010e200de3 +[NSException raise:format:] + 0 3 Foundation 0x000000010f7d99b0 -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 166 4 PineConesGoField 0x000000010894064e +[RCTEventEmitter initialize] + 334 5 libobjc.A.dylib 0x000000011458de53 CALLING_SOME+initialize_METHOD + 17 6 libobjc.A.dylib 0x000000011458ed13 initializeNonMetaClass + 700 7 libobjc.A.dylib 0x000000011458fd89 _ZL24initializeAndMaybeRelockP10objc_classP11objc_objectR8mutex_ttILb0EEb + 173 8 libobjc.A.dylib 0x000000011459b879 lookUpImpOrForward + 668 9 libobjc.A.dylib 0x0000000114589d1b _objc_msgSend_uncached + 75 10 Foundation 0x000000010f8b4de1 _NSDescriptionWithStringProxyFunc + 41 11 CoreFoundation 0x000000010e198f2e __CFStringAppendFormatCore + 9154 12 CoreFoundation 0x000000010e19b589 _CFStringCreateWithFormatAndArgumentsReturningMetadata + 145 13 CoreFoundation 0x000000010e19b4f2 _CFStringCreateWithFormatAndArgumentsAux2 + 20 14 Foundation 0x000000010f8ada7c +[NSString stringWithFormat:] + 153 15 PineConesGoField 0x00000001088ddfae RCTRegisterModule + 62 16 PineConesGoField 0x00000001087dd239 +[RCTJCoreModule load] + 25 17 libobjc.A.dylib 0x0000000114595ff2 load_images + 1439 18 ??? 0x000000010d157e2c 0x0 + 4514479660 19 ??? 0x000000010d166ba5 0x0 + 4514540453 20 ??? 0x000000010d164ec7 0x0 + 4514533063 21 ??? 0x000000010d164f68 0x0 + 4514533224 22 ??? 0x000000010d15826b 0x0 + 4514480747 23 ??? 0x000000010d15cf56 0x0 + 4514500438 24 ??? 0x000000010d1571c2 0x0 + 4514476482 25 ??? 0x000000010ea05c27 0x0 + 4540357671 26 ??? 0x000000010ea0315e 0x0 + 4540346718 27 ??? 0x000000010e9fd224 0x0 + 4540322340 28 ??? 0x000000010e9fd025 0x0 + 4540321829 29 ??? 0x0000000000000001 0x0 + 1 ) libc++abi: terminating with uncaught exception of type NSException terminating with uncaught exception of type NSException *** Terminating app due to uncaught exception ‘NSInternalInconsistencyException’, reason: ‘You must override the supportedEvents method of RCTJCoreModule’ CoreSimulator 757.5 - Device: iPhone 11 (AB7146B7-B82B-4191-81BB-32F882405DCD) - Runtime: iOS 14.5 (18E182) - DeviceType: iPhone 11 (lldb)

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:10

github_iconTop GitHub Comments

4reactions
A-Happy-Fishcommented, Jun 27, 2022

update the version of jcore-react-native to V2.0.2

1reaction
tigerjiangcommented, Jun 21, 2022

Why close this issue. I have the same problem

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is the method can I use to send an event from native ...
So you can send an event called sayHello with data Hello to JavaScript by calling the tellJS method. In JavaScript side, you have...
Read more >
[React Native]Through the Bridge - Medium
We need to subclass RCTEventEmitter and then implement supportedEvents method that should return an array of supported events.
Read more >
Swift in React Native - The Ultimate Guide Part 2: UI ...
This second part focuses on UI Components, while part 1 covers native Modules. ... To suppress this warning, you have to override this...
Read more >
Sending Events to JavaScript from Your Native Module in ...
Communication between native modules and JavaScript thread happens ... is to override startObserving and stopObserving methods where you set ...
Read more >
Let's get native with React Native - Adapptor
override func supportedEvents() -> [String]! { ... Any methods we want available in React Native need to be exposed via the @ReactMethod ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found