-
Notifications
You must be signed in to change notification settings - Fork 8
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
Hermes debugger is unavailable on all of our devices and machines #19
Comments
Yeah 😅 I haven't found a great way to keep the table up to date w/ expo releases. The latest release 46.0.0 should work with SDK 46, and if not let's work on debugging it. You mentioned this is happening on Android as well, ruling out the usual Podfile shenanigans. The number one thing I'd do is make sure the flipper app's version matches your package.json version. Unfortunately, lots of flipper minor semver releases are backwards incompatible (pre 1.0) and it's easy to get bitten by this. |
Thanks so much for your reply @jakobo!
I'm sure it does work. I can't get SDK 45 to work either, but only for Hermes, so I can't imagine it's this plugin - which always worked great for us! Unfortunately the |
Yeah it does seem strange. Is your host a Windows or a Mac? There's some networking annoyances when it comes to Windows + Hermes. There's also a PR at #20 if you want to try this changeset. There were some changes in 0.69.2 that we didn't catch; though they're mostly iOS related. |
Unfortunately it's affecting both Linux (connecting to Android) and macOS (connecting to iOS.) I never got Hermes debugger working on Windows as seems to be standard experience. But the issue affects SDK 45 also, so I really doubt it's related to anything on the Expo-Community-Flipper side. I just don't know where else to ask or what else to try besides accepting that debugging is going to have to take place via log statements only from now on, which I really can't accept =/
Can you point me to some further reading, or possibly provide a very brief overview if you don't know of any further reading? I'm really grasping at straws here and wondering if perhaps there could be some networking issue causing this even though none of my affected machines are using Windows. Other possibly related issues (but probably not actually related - I'm grasping at straws): |
Totally. Here's the kinda short version of the horror in windows networking as a baseline, and then I'll follow up on some non-networking stuff. Under WSLThe fundamental problem with WSL is that the Windows Subsystem for Linux is set up as a NAT, not as a Bridge. This means that your Ubuntu under windows is given an IP with its gateway being the host system. For example, when I run
The 172.x is a Class B private address, similar to how most home networks have a To my knowledge, things with Hermes + Android + WSL2 are working for users, as well as on-device builds against WSL using the expo dev client. Under Windows NativeWindows Native is currently hell (see #4). There's several upstream issues, and the majority of them are related to use the Hermes runtime which is either (A) choking on a websocket over IPv6, (B) can't find the The Windows Native one has me absolutely stumped; my bet is that it's something in the Flipper Windows app related to networking & localhost. It's only a partially educated guess though given the sheer number of things that go wrong with Windows Networking. I don't know if Windows Flipper uses Electron, but using electon's windows networking woes as a baseline definitely feels like it's because Windows networking doesn't act like anyone else's networking. I'm not sure it's Windows fault either. We have:
It's just a lot of moving parts. The RN's work of moving Flipper into React-Native & Metro will reduce some of this pain, but we're probably a few releases off before we see those benefits. Trying to Fix Hermes and Get Debugging BackMoving on to the Hermes debugger up-and-leaving I'd clear the Metro cache first. Going nuclear on the caches will make for a slow start, but this is kind of the power it off/on approach. There's a set of commands in the Expo docs that will get rid of the caches. The next thing that I would try is checking the metro endpoint for Hermes. You should be able to load Finally, and this will hurt, try turning of Hermes. Hermes and JSC use completely different code pathways, and it could legitimately be something about Hermes that simply doesn't exist in JSC land. I'm not a fan of JSC in development in Hermes in production, but gosh-darn debugging via log statements is awful. So much for kinda short. That's everything I've got on the pain of Hermes and Networking to date. |
@jakobo wow thank you so much for your detailed reply! That was too much to absorb in one reading, but I'll probably read over this a few more times as I continue the insane troubleshooting saga.
It does indeed use Electron. I wonder if disabling IPv6 might resolve my issue. That will be the next thing I try.
Unfortunately the outcome is the same.
Is the default port 8081? We don't seem to have anything running on there. I did find the JSON on port 19000 though. I wonder if you see anything obviously wrong here?
Limited section of Flipper's startup logs
And
I would happily move to JSC at this point, but unfortunately we can't, because React Navigation now uses React Reanimated 2 which requires Hermes if you want to debug it. It's the reason we moved to Hermes to begin with - which means that truly we are out of luck unless Facebook staff decides to care - basically a complete halt to our mobile development work. |
Finally got Hermes Debugger to stop saying not supported! Because it mysteriously began needing I mean, out of nowhere this happened, on all machines, on all Flipper versions. Wtf? Top 5 strangest issues I've seen in all my years. And it seems to affect no one else? But, of course that only got us to a new error:
But at least I have hope again! |
https://fbflipper.com/docs/custom-ports/ As I was reading, I was about to share that link until I saw the metro port issue got resolved. The good news is, we're moving into purely Flipper related issues now. It's building, the port's being found, it's progress! 🎉 Now we just need to figure out how to tell Hermes where to look.
|
Got Hermes working! My final challenge now seems to be getting it to work in a way that allows me to run it from a desktop icon, but that's small potatoes! Seriously I'd have spent at least another full day on this without your help, I am so grateful! Basically the fix:
I can't imagine why running the same command from a desktop shortcut (KDE) would get Hermes to stop saying unsupported, but not to actually connect. Flipper is f***ing weird! |
Fully functional shortcut for KDE users. Note the "work path" must be set for Hermes to actually connect! Also note that the app must be reloaded once from in-app using Ctrl+M (for Android) and then choosing "Reload." After that, you should have Hermes connected and all of the source files should be accessible in the debugger. |
Awesome. Would you mind if I pinned this? I'm sure others will run into the same issues trying to get Hermes working |
Sure thing; spread the wealth! And once more, thank you! |
Update: Don't disable IPv6. Android Emulator fails to start if it can't connect to Android Studio via IPv6, and it turns out not to be important anyway. |
For macOS you can run the following, once
If anyone knows how to create a shortcut, or even better to add this to dock, I'd be eager to learn! |
I'll start by saying I don't believe this is related to
expo-community-flipper
as it began affecting builds that previously worked, on Flipper versions that previously worked - but it affects all of our machines, (iOS and Android, Linux and macOS,) and previous git commits, previous builds, Expo 45, Expo 46, previous Flipper versions - nothing fixes the issue - so I really don't know what to guess at as far as causes.I've commented on a relevant issue on the Flipper repo, but it seems like we're out of luck if it comes to hoping on Facebook for a solution. Is anyone else experiencing this?
facebook/flipper#3983
Edit: I noticed the ReadMe doesn't include SDK 46 on the list of verified versions. I'm guessing that's just an oversight though?
The text was updated successfully, but these errors were encountered: