Weird behavior after changing the debug server host on android
Once I change the debug server host I can't exit the developer menu anymore. I don't get any feedback whether the host was wrong or something. My emulator stays on the debug menu and I have to force kill the emulator to recover. Clearing the host doesn't fix the issue.
Some more information that we'll need:
- Version number of React Native
- The exact code that you changed
cc @foghina
React native 0.12 no code changed, just the standard code after a react-native init. I am using Linux though.
Op zo 18 okt. 2015 21:04 schreef Brent Vatne [email protected]:
Some more information that we'll need:
- Version number of React Native
- The exact code that you changed
cc @foghina https://github.com/foghina
— Reply to this email directly or view it on GitHub https://github.com/facebook/react-native/issues/3489#issuecomment-149039296 .
same to https://github.com/facebook/react-native/issues/3353
No, it doesn't look the same. I can't exit the developer menu and therefore I don't see a "loading js" dialog.
Op ma 19 okt. 2015 om 04:35 schreef laomu [email protected]:
same to #3353 https://github.com/facebook/react-native/issues/3353
— Reply to this email directly or view it on GitHub https://github.com/facebook/react-native/issues/3489#issuecomment-149080261 .
This sounds super weird. What does selecting "Reload JS" do? What does pressing the hardware back button do, nothing? I can't repro this locally. I am on OSX, but this shouldn't make a difference... maybe I need to get a Linux laptop.
Steps to reproduce:
react-native init TestApp
cd TestApp
react-native run-android
In AVD: F2 -> Dev settings -> change Debug server host for device to: localhost:8080.
Back button doesn't working anymore. I kill the AVD to recover.
It seems to be related to the fact that I want to change the port as well as the host. Restarting the app results in a red screen saying: Unexpected url: http://localhost:1234:8081/flow/.
So I guess the host field needs better validation. Also I need to be able to change the port number, but that's another issue (I want to run webpack to get HMR).
Changing the port is already fixed on master. BTW, localhost will not work (unless you also do adb reverse tcp:8081 tcp:8081), check out the constants in DevServerHelper for the correct IP to use to reach your host OS, depending on the emulator you are using.
...still weird that it blocks your back button.
Changing the port fixed, does that mean I can change the port? Or that it removes it automatically?
It means you can change the port. So putting e.g. 10.0.3.2:1234 in the host setting will work in the next release.
This seems to be fixed. Let's reopen if still an issue.