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
- Emulators with api 31 and 33, arm64-v8a
- Flipper 0.157.0
- 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
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ā
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)."
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.
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:
And then the solution is to find your
index.htmlfile and just add one of those as a comment. For example:PS: This is an awful way to check whether Metro is running.
index.htmlis modifiable, obviously.Exact same issue on my end, everything is on latest version
Expo Ejected
Android
Opening the debugger menu open Chrome Dev Tool, then crashes with OOM.
I tried:
With little luck
No firewall enabled and
!!global.HermesInternalresolves totrue. 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:
@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 š¦