react-native icon indicating copy to clipboard operation
react-native copied to clipboard

Weird behavior after changing the debug server host on android

Open 0xR opened this issue 11 years ago • 11 comments

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.

0xR avatar Oct 18 '15 12:10 0xR

Some more information that we'll need:

  • Version number of React Native
  • The exact code that you changed

cc @foghina

brentvatne avatar Oct 18 '15 19:10 brentvatne

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 .

0xR avatar Oct 18 '15 22:10 0xR

same to https://github.com/facebook/react-native/issues/3353

yipengmu avatar Oct 19 '15 02:10 yipengmu

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 .

0xR avatar Oct 19 '15 06:10 0xR

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.

foghina avatar Oct 19 '15 12:10 foghina

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).

0xR avatar Oct 19 '15 13:10 0xR

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.

foghina avatar Oct 19 '15 13:10 foghina

...still weird that it blocks your back button.

foghina avatar Oct 19 '15 13:10 foghina

Changing the port fixed, does that mean I can change the port? Or that it removes it automatically?

0xR avatar Oct 19 '15 13:10 0xR

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.

foghina avatar Oct 19 '15 13:10 foghina

This seems to be fixed. Let's reopen if still an issue.

satya164 avatar Dec 24 '15 20:12 satya164