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.

The native module for Flipper seems unavailable. Please verify that `react-native-flipper` is installed

See original GitHub issue

🐛 Bug Report

I have updated React Native from v0.61.4 to v0.62.2 to try and use Flipper.

When I build and run the app The Metro Bundler throws the warning:

The native module for Flipper seems unavailable. Please verify that react-native-flipper is installed as yarn dependency to your project and, for iOS, that pod install is run in the ios directory.

I have installed it using npm.

My package.json looks like this:

  "dependencies": {
    "react": "16.13.1",
    "react-native": "0.62.2",
    "react-native-flipper": "^0.45.0",
    "react-redux": "^7.1.3",
    "redux": "^4.0.4",
    "redux-flipper": "^1.2.0",
    "redux-thunk": "^2.3.0",
 ...

In Flipper, React DevTools can connect to the app but when I try to use the Hermes Debugger or plugins they cannot be used:

enter image description here enter image description here

When I run this: adb shell am start -n com.app/com.facebook.flipper.android.diagnostics.FlipperDiagnosticActivity

I get this error:

Error type 3 Error: Activity class {com.app/com.facebook.flipper.android.diagnostics.FlipperDiagnosticActivity} does not exist.

What could be the reason for the modules not installing correctly?

To Reproduce

Environment

“react”: “16.13.1”, “react-native”: “0.62.2”, “react-native-flipper”: “^0.45.0”, Mac OSX 10.14 Android 10, physical Pixel 2XL

Update

So I created a new React Native app just to see if I could get Flipper working and I could but without the redux-flipper plug-in. I also got Hermes debugger working. If I remove all reference and use of the redux-flipper plug in, I don’t get the warning anymore saying that is can’t find the package because I am not using this code in the redux store anymore:

// if (__DEV__) {
//   const createDebugger = require('redux-flipper').default;
//   middlewares.push(createDebugger());
// }

I do however get this error in Flipper developer tools console opened from the view menu:

Error: Feature not implemented
    at getUser (bundle.js:597)
    at e.default (bundle.js:2281)
    at bundle.js:1577
    at Array.map (<anonymous>)
    at _default (bundle.js:1577)
    at bundle.js:3
    at Object.rehydrate (bundle.js:707)
    at _rehydrate (bundle.js:699)
    at bundle.js:699

I also don’t get any of these options in the left hand side of Flipper (databases, images etc): Screenshot 2020-06-13 at 19 15 28

I am not using devTools v3 and a I keep having to do adb reverse.

Flipper still only connects to the device, not the app.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:8
  • Comments:32 (11 by maintainers)

github_iconTop GitHub Comments

60reactions
Epick362commented, Jun 26, 2020

I found the culprit. Package identifier in ReactNativeFlipper.java was com.rndiffapp and I didn’t notice it. Everything works now, thank you for the help 😃

57reactions
redbluenatcommented, Jul 24, 2020

I had the same problem, for me, directory structure in debug folder wasn’t the same as in the main folder so it couldn’t find it, check your folder structure and check this line: Class<?> aClass = Class.forName("YOUR_PACKAGE_NAME.ReactNativeFlipper");

I am just dropping this reply if somebody has the same problem 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

React native - The native module for Flipper seems unavailable
Please verify that react -native-flipper is installed as yarn dependency to your project and, for iOS, that pod install is run in the...
Read more >
react-native-flipper - npm
Start using react-native-flipper in your project by running `npm ... There are 27 other projects in the npm registry using react-native-flipper.
Read more >
React Native App - Automatic Setup - Flipper
Your application will appear in Flipper. iOS - run pod install once in the ios directory of your project. After that, run yarn...
Read more >
Using Hermes - React Native
Hermes is an open-source JavaScript engine optimized for React Native. For many apps, using Hermes will result in improved start-up time, ...
Read more >
Upgrade to React Native 0.62 - Matt Oakes
Flipper was supported in React Native 0.61, however, it was a little tricky ... step is to upgrade the dependencies in your package.json...
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