React-native: React-native run-android in loop (Starting JS server ... )

Created on 18 Aug 2019  ·  31Comments  ·  Source: facebook/react-native

After starting a new project and trying to test it, it starts js serving. In this case I used the test app, but I have an app in the same situation

React Native version:
System:
OS: Linux 5.2 Arch Linux undefined
CPU: (4) x64 Intel(R) Core(TM) i3-5015U CPU @ 2.10GHz
Memory: 230.84 MB / 3.56 GB
Shell: 5.7.1 - /usr/bin/zsh
Binaries:
Node: 11.15.0 - /usr/bin/node
Yarn: 1.17.3 - /usr/bin/yarn
npm: 6.10.3 - /usr/bin/npm
SDKs:
Android SDK:
API Levels: 22, 25, 27, 28, 29
Build Tools: 28.0.3, 29.0.1
IDEs:
Android Studio: 3.4 AI-183.6156.11.34.5692245
npmPackages:
react: 16.8.6 => 16.8.6
react-native: 0.60.5 => 0.60.5
npmGlobalPackages:
react-native-cli: 2.0.1

Steps To Reproduce

1.type react-native init
2.type react-native run-android (with devices or emulator connected)

Screenshot from 2019-08-18 09-26-50

Bug Android Linux

Most helpful comment

All 31 comments

I'm also facing this issue.

same here

i'm with same problem, tried to reinstall nodejs and react-native but no success

image

Using Fedora 30

Same problem on Manjaro. :(

Thank you very much. That's works as a workaround. Waiting for final solution. And again, thank you!!

@ogiansouza Thanks a lot

It's links solved my problem: https://stackoverflow.com/questions/57313661/stuck-on-info-starting-js-server

Works perfectly, thanks!

I am also facing this issue.

React Native

react-native-cli: 2.0.1
react-native: 0.61.2

Kernel

Linux hello-pc 5.2.21-1-MANJARO #1 SMP PREEMPT Sat Oct 12 11:09:56 UTC 2019 x86_64 GNU/Linux

OS

Description:    Manjaro Linux
Release:        18.1.1
Codename:       Juhraya

It's links solved my problem: https://stackoverflow.com/questions/57313661/stuck-on-info-starting-js-server

Though this solved my issue. But many of the devs did not want to run two commands to run the project.

Any fix yet?

same issue in openSuSe tumbleweed

Same here.

Manjaro 18.1.4
Kernel: x86_64 Linux 5.4.2-1-MANJARO

Temporary fix:

REACT_TERMINAL=<your terminal> react-native run-android

in my case with archlinux + xfce4:

REACT_TERMINAL=xfce4-terminal react-native run-android

or puts in your .bashrc:

export REACT_TERMINAL=xfce4-terminal

note: it will use two instances of terminal

It's links solved my problem: https://stackoverflow.com/questions/57313661/stuck-on-info-starting-js-server

Wish this is officially resolved soon.

The issue is caused, because spawning the process to run the Metro Bundler does not return:
https://github.com/react-native-community/cli/blob/master/packages/platform-android/src/commands/runAndroid/index.ts#L348

This seems to be an issue in the execa library, which was introduced by this merge:
https://github.com/react-native-community/cli/pull/601/files

It can be fixed by replacing the call with the previous one:
spawn('sh', [launchPackagerScript], procConfig);

Possible workarounds, by setting the terminal

  • explicitly, using $ react-native run-android --terminal path/to/terminal
  • implicitly, by setting one of the environment variables TERM_PROGRAM or REACT_TERMINAL

I hope this issue get resolved quickly for all the linux guys.✌🏻

same.

Stuck in the same issue in manjaro 19.0 Kyria.

same.

manjaro 19 kde
same

How's this still not fixed? Sad

Fix for that is already merged in the cli - https://github.com/react-native-community/cli/issues/1066. I think we're safe to close this issue.

How this issue is still present in the latest version of RN -_- please fix it
I am using macos

@ShivamJoker First of all, please stop spamming various repos without giving any additional or helpful information.
Second of all, this issue is about terminal not launching on Linux machines, while your issue is connected to OSX (https://github.com/react-native-community/cli/issues/1066#issuecomment-610369254). This issue should be fixed in the latest version of @react-native-community/cli. Your problem seems to be connected to your local env setup.
@cpojer Can we close this issue as it was already fixed and released in the CLI (https://github.com/react-native-community/cli/pull/1099)

Linux:
Go to the terminal and type:
react-native start

and then in OTHER terminal, inside your project folder:
yarn android
or
npm run android

@Esemesek this issues is still occurring, using the latest cli version 2.0.1.

Still not fixed :(
System: Linux 5.8.3-arch1-1

@ShivamJoker First of all, please stop spamming various repos without giving any additional or helpful information.
Second of all, this issue is about terminal not launching on Linux machines, while your issue is connected to OSX (react-native-community/cli#1066 (comment)). This issue should be fixed in the latest version of @react-native-community/cli. Your problem seems to be connected to your local env setup.
@cpojer Can we close this issue as it was already fixed and released in the CLI (react-native-community/cli#1099)

Closing, for future CLI issues please file issues at https://github.com/react-native-community/cli

Linux:
Go to the terminal and type:
react-native start

and then in OTHER terminal, inside your project folder:
yarn android
or
npm run android

thanks this got the issue fixed for me in arch-linux

Reinstalling android studio with a new emulator or changing the app name in app.json , build.gradle and android manifest.xml solved the issue.

Was this page helpful?
0 / 5 - 0 ratings