Cannot connect to dev server and Always detect more than one device
See original GitHub issueIs this a bug report?
yes
Have you read the Contributing Guidelines?
yes
Environment
OS: Windows 10 Node: 8.9.3 Yarn: 1.3.2 npm: 5.5.1 Watchman: Not Found Xcode: N/A Android Studio: Not Found
Packages: (wanted => installed) react: 16.0.0 => 16.0.0 react-native: 0.51.0 => 0.51.0
Target Platform: Android (5.0)
Steps to Reproduce
- Run adb connect (ADB Over Network)
adb connect 192.168.137.116:8081
connected to 192.168.137.116:8081
- Run adb devices
adb devices
List of devices attached
192.168.137.116:8081 device
- Run project
react-native run-android
Scanning folders for symlinks in c:\404\TuneApp\node_modules (172ms)
Starting JS server...
Building and installing the app on the device (cd android && gradlew.bat installDebug)...
Incremental java compilation is an incubating feature.
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72301Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42301Library UP-TO-DATE
:app:prepareComFacebookFbuiTextlayoutbuilderTextlayoutbuilder100Library UP-TO-DATE
:app:prepareComFacebookFrescoDrawee130Library UP-TO-DATE
:app:prepareComFacebookFrescoFbcore130Library UP-TO-DATE
:app:prepareComFacebookFrescoFresco130Library UP-TO-DATE
:app:prepareComFacebookFrescoImagepipeline130Library UP-TO-DATE
:app:prepareComFacebookFrescoImagepipelineBase130Library UP-TO-DATE
:app:prepareComFacebookFrescoImagepipelineOkhttp3130Library UP-TO-DATE
:app:prepareComFacebookReactReactNative0510Library UP-TO-DATE
:app:prepareComFacebookSoloaderSoloader010Library UP-TO-DATE
:app:prepareOrgWebkitAndroidJscR174650Library UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:mergeDebugShaders UP-TO-DATE
:app:compileDebugShaders UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources UP-TO-DATE
:app:bundleDebugJsAndAssets SKIPPED
:app:processDebugManifest UP-TO-DATE
:app:processDebugResources UP-TO-DATE
:app:generateDebugSources UP-TO-DATE
:app:incrementalDebugJavaCompilationSafeguard UP-TO-DATE
:app:compileDebugJavaWithJavac UP-TO-DATE
:app:compileDebugNdk UP-TO-DATE
:app:compileDebugSources UP-TO-DATE
:app:transformClassesWithDexForDebug UP-TO-DATE
:app:mergeDebugJniLibFolders UP-TO-DATE
:app:transformNative_libsWithMergeJniLibsForDebug UP-TO-DATE
:app:processDebugJavaRes UP-TO-DATE
:app:transformResourcesWithMergeJavaResForDebug UP-TO-DATE
:app:validateSigningDebug
:app:packageDebug UP-TO-DATE
:app:assembleDebug UP-TO-DATE
:app:installDebug
Installing APK 'app-debug.apk' on 'G36C1H - 5.0.2' for app:debug
Installed on 1 device.
BUILD SUCCESSFUL
Total time: 1 mins 37.678 secs
Running C:\APPS\Android\SDK/platform-tools/adb -s 192.168.137.116:8081 reverse tcp:8081 tcp:8081
error: more than one device and emulator
Could not run adb reverse: Command failed: C:\APPS\Android\SDK/platform-tools/adb -s 192.168.137.116:8081 reverse tcp:8081 tcp:8081
Starting the app on 192.168.137.116:8081 (C:\APPS\Android\SDK/platform-tools/adb -s 192.168.137.116:8081 shell am start -n com.tuneapp/com.tuneapp.MainActivity)...
Starting: Intent { cmp=com.tuneapp/.MainActivity }
- Run adb reverse
adb reverse tcp:8081 tcp:8081
error: more than one device and emulator
if i check adb devices again still show like no. 2
- Check ipconfig
Windows IP Configuration
Ethernet adapter Ethernet:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Wireless LAN adapter Local Area Connection* 2:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Wireless LAN adapter Wi-Fi:
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::7dfb:1473:2b83:20b3%13
IPv4 Address. . . . . . . . . . . : 192.168.1.111
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.254
Wireless LAN adapter Local Area Connection* 13:
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::953f:e8d:2621:fb78%5
IPv4 Address. . . . . . . . . . . : 192.168.137.1
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
Ethernet adapter Bluetooth Network Connection:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Tunnel adapter Teredo Tunneling Pseudo-Interface:
Connection-specific DNS Suffix . :
IPv6 Address. . . . . . . . . . . : 2001:0:9d38:90d7:148c:1edc:825e:7cb0
Link-local IPv6 Address . . . . . : fe80::148c:1edc:825e:7cb0%3
Default Gateway . . . . . . . . . : ::
- Shake phone and go to dev settings
Debug server host & port for device
192.168.1.111:8081
- Shake my phone and reload js
Could not connect to development server
Note: after creating new project i not change anything of code.
Expected Behavior
I think after run react-native run-android my project is running to my device, but i get error like adb reverse detect more than one device and emulator and cannot connect to development server.
Actual Behavior
- Error : cloud not connect to development server
- Error : always detect more than one device and emulator
Reproducible Demo
I don’t change anything in the code, after creating new project i run that project with react-native start and react-native run-android. but, if you want to see the original source code please follow this repository tuneapp
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (1 by maintainers)
Top GitHub Comments
@sgnd solved MY problem by this comment
I didn’t knew where the
Developer menu
was, took me some time to figure out that i should violently shake my phone with the app open to find this menu.Once i had configured the debug server+port, closed my app, restarted the
react-native run-android
everything started to work again.BTW: ADB error still persists (tested in two windows machines), it could be related to android custom ROMs (?)
@Grohden yes, i think because custom rom. But i try that still not working.
Now, i use expo for development and testing. Easy settings for beginner like me. 😄