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

Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'RNShake' could not be found. Verify that a module by this name is registered in the native binary., js engine: hermes #53

Open
rzoro opened this issue Aug 22, 2023 · 3 comments
Labels

Comments

@rzoro
Copy link

rzoro commented Aug 22, 2023

Getting this error after upgrading to 5.5.0.

Invariant Violation: Failed to call into JavaScript module method AppRegistry.runApplication(). Module has not been registered as callable. Registered callable JavaScript modules (n = 11): Systrace, JSTimers, HeapCapture, SamplingProfiler, RCTLog, RCTDeviceEventEmitter, RCTNativeAppEventEmitter, GlobalPerformanceLogger, JSDevSupportModule, HMRClient, RCTEventEmitter.
        A frequent cause of the error is that the application entry file path is incorrect. This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native., js engine: hermes
 ERROR  Invariant Violation: Failed to call into JavaScript module method AppRegistry.runApplication(). Module has not been registered as callable. Registered callable JavaScript modules (n = 11): Systrace, JSTimers, HeapCapture, SamplingProfiler, RCTLog, RCTDeviceEventEmitter, RCTNativeAppEventEmitter, GlobalPerformanceLogger, JSDevSupportModule, HMRClient, RCTEventEmitter.
        A frequent cause of the error is that the application entry file path is incorrect. This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native., js engine: hermes
@WayneKim92
Copy link

jest.config.js

setupFiles: [
  mockReactNativeShake.js
}

mockReactNativeShake.js

jest.mock('react-native-shake', () => ({
    addListener: jest.fn(),
    removeAllListeners: jest.fn(),
}));

@asteriomanet
Copy link

I'm encountering the same issue as @rzoro reported with RN version 0.72.1.

In addition, I tried to create a new/fresh project with the latest RN version 0.73.4, iOS version 17.3. Just to validate if my current app RN version is just the one having an issue.

Created an adhoc version of it for release mode and install in actual device.
Result: The listener is not triggered at all.

I wonder if anyone got the same issue.

@Doko-Demo-Doa
Copy link
Owner

Published a new version (6.0.0-beta.2). Can you try?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants