flipper: [Android] Device plugin 'Hermes Debugger (RN)' is not supported by the selected device

šŸ› Bug Report

I can’t get Hermes debugger working - it is unavailable. Got "Device plugin ā€˜Hermes Debugger (RN)’ is not supported by the selected device". Created multiple emulators - nothing.

Other plugins like Databases and Layout work.

How can device not support the plugin?

To Reproduce

custom metro port: 8082 enableHermes: true FLIPPER_VERSION=0.156.0

Initialization:

public class ReactNativeFlipper {
    public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
        if (!FlipperUtils.shouldEnableFlipper(context)) return;

        final FlipperClient client = AndroidFlipperClient.getInstance(context);

        client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults()));
        client.addPlugin(new ReactFlipperPlugin());
        client.addPlugin(new DatabasesFlipperPlugin(context));
        client.addPlugin(new SharedPreferencesFlipperPlugin(context));
        client.addPlugin(CrashReporterPlugin.getInstance());

        NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin();
        NetworkingModule.setCustomClientBuilder(
                new NetworkingModule.CustomClientBuilder() {
                    @Override
                    public void apply(OkHttpClient.Builder builder) {
                        builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin));
                    }
                });
        client.addPlugin(networkFlipperPlugin);

        client.start();
    }
}

app/build.gradle

    // INIT https://github.com/react-native-community/react-native-template-typescript/blob/main/template/android/app/build.gradle
    debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
        exclude group:'com.facebook.fbjni'
    }
    debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
        exclude group:'com.facebook.flipper'
        exclude group:'com.squareup.okhttp3', module:'okhttp'
    }

Environment

  1. Emulators with api 31 and 33, arm64-v8a
  2. Flipper 0.157.0
  3. deps:
"react-native": "0.67.2",

devDeps:

"react-native-flipper": "0.157.0",
"react-native-performance": "3.1.1",
"react-native-performance-flipper-reporter": "3.0.0",

Using custom port for metro 8082.

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Reactions: 6
  • Comments: 23

Most upvoted comments

And also there should be a proper message why plugin is not available, but not device not supported !!!

Flipper is a pure pain šŸ’©

Hermes Debugger Plugin is only available when I select a device called ā€œReact Nativeā€

image

Flipper 0.235 works fine for me. Here’s all old releases https://github.com/facebook/flipper/releases

Same here. I just want to start the sample project of Reanimted and debug it. But Flipper tell me: "Device plugin ā€˜Hermes Debugger (RN)’ is not supported by the selected device ā€˜sdk_gphone_x86_64_arm64’ (Android)." image

The strange thing is that Flipper’s log outputs. 4 plugin(s) were loaded in legacy mode. Hermes Debugger (RN) (id: Hermesdebuggerrn)

It looks like Flipper has loaded Hermes Debugger plugin correctly. image

Faced that issue on my 3rd project.

The fix was to use 0.235.0 version (for 0.239.0 it doesn’t work).

Here any version <= 0.237.0 works.

Faced that issue on my 3rd project.

The fix was to use 0.235.0 version (for 0.239.0 it doesn’t work).

This blog post is a godsend and fixed the problem for me: https://hsiang.dev/debugging-flipper-desktop-app-clfkttntg000609kyd3kd1mz4

Long story short Flipper reaches to the Metro URL and then checks that the document returned contains one of the two strings:

  • ā€˜React Native packager is running’
  • ā€˜Metro is running’

And then the solution is to find your index.html file and just add one of those as a comment. For example:

  <!-- React Native packager is running. -->

PS: This is an awful way to check whether Metro is running. index.html is modifiable, obviously.

Exact same issue on my end, everything is on latest version

Expo Ejected

"react-native": "^0.69.6",
"expo": "^46.0.16",
"react-native-flipper": "^0.172.0",
"redux-flipper": "^2.0.2",

Android

FLIPPER_VERSION=0.172.0
newArchEnabled=false
enableHermes=true

Opening the debugger menu open Chrome Dev Tool, then crashes with OOM.

I tried:

METRO_SERVER_PORT=19000 open -a Flipper
#!/bin/sh

adb reverse tcp:8081 tcp:8081

# flipper
adb reverse tcp:5037 tcp:5037
adb reverse tcp:8088 tcp:8088
adb reverse tcp:8089 tcp:8089
adb reverse tcp:9088 tcp:9088
adb reverse tcp:9089 tcp:9089

adb reverse --list
console.log(!!global.HermesInternal);
// true

With little luck

No firewall enabled and !!global.HermesInternal resolves to true. I’ll keep updating as I keep ruling things out, but I don’t know that there’s anything else for us to try.

Really tough to do anything with React Native when you can’t debug it and you spend twice as long trying to fix debugging issues as you do coding…

The issue for me was custom port, and special env parameter for custom port didn’t work. There definitely should be port number somewhere in settings and it should work.

Tried API 31 and 33 now also, in new emulator devices. I’ve tried all the steps on the Flipper troubleshooting page, I’ve tried rebooting the machine, upgrading Android Studio, upgrading react-native-flipper - downgrading all the same things, bisecting our code.

Always always this problem I never had before a few weeks ago:

Device plugin ā€˜CPU’ is not supported by the selected device ā€˜Pixel_4_API_31’ (Android).

@mweststrate @passy I’m really sorry to ping you, but do you have any ideas? I’m out of theories to even try and we’re dead in the water without the ability to debug. Is there anything we should look for in our Device Logs to indicate what the issue may be?

Regarding the troubleshooting step: ā€œMake sure the mobile SDK you are using is relatively recent (<1 month old).ā€ – this refers to the package version for react-native-flipper, right?

Edit: Spent at least another two hours onthis, but no progress at all 😦