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.

ExceptionsManager.handleException is not a function

See original GitHub issue

Describe the bug

We recently upgraded to React Native 0.63, Jest 26, and React Native Testing Library 7. When running jest with --runInBand we have noticed the following error randomly in our CI:

/node_modules/react-native/Libraries/LogBox/Data/LogBoxData.js:104
  ExceptionsManager.handleException(error, true);
                    ^
TypeError: ExceptionsManager.handleException is not a function
    at reportLogBoxError (/node_modules/react-native/Libraries/LogBox/Data/LogBoxData.js:108:21)
    at Immediate.<anonymous> (/node_modules/react-native/Libraries/LogBox/Data/LogBoxData.js:217:7)
    at processImmediate (internal/timers.js:456:21)

I noticed a similar error in the previous project: https://github.com/testing-library/native-testing-library/issues/132

Any thoughts?

Expected behavior

No errors.

Versions

❯ npx envinfo --npmPackages react,react-native,react-test-renderer,@testing-library/react-native

  npmPackages:
    @testing-library/react-native: 7.0.2 => 7.0.2 
    react: 16.13.1 => 16.13.1 
    react-native: 0.63.2 => 0.63.2 
    react-test-renderer: 16.13.1 => 16.13.1 

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
thymikeecommented, Sep 3, 2020

This library has nothing to do with LogBox, nor ExceptionsManager. Make sure to use “react-native” Jest preset and mock the native module if necessary. Looks like ExceptionsManager is already mocked, but handleException is not there: https://github.com/facebook/react-native/blob/master/jest/setup.js#L42

1reaction
lukewlmscommented, Sep 10, 2020

Ah somehow I hallucinated that 🙂 thanks for the info!!

Read more comments on GitHub >

github_iconTop Results From Across the Web

ExceptionsManager.handleException is not a function #29849
We recently upgraded to React Native 0.63, Jest 26, and React Native Testing Library 7. When running jest with --runInBand we have noticed ......
Read more >
Getting 'TypeError: interpolate is not a function' in React-Native
Open the Drawer.js file found in the <project folder>/node_modules/react-navigation-drawer/lib/module/views/ folder. · You will find interpolate ...
Read more >
Expo-google-sign-in doesn't seem to work.
It's failing at line 93 of Expo.js where it's trying to return GoogleSignIn. Object.defineProperty(exports, "GoogleSignIn", { enumerable: true, ...
Read more >
Demystifying React Native Stack Traces in Production
In DEV, pass the error to the standard ExceptionsManager ... The JS stack traces in Production are not that useful by default.
Read more >
failed to initialize react-native-reanimated library - You.com
module.exports = function(api) { api.cache(true); return { presets: ... 'React/RCTBridge.h' file not found on Xcode Installing MS AppCenter in an ejected ...
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