Skip to content
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

No connected devices found #42

Closed
osben opened this issue Jun 8, 2019 · 14 comments
Closed

No connected devices found #42

osben opened this issue Jun 8, 2019 · 14 comments
Labels

Comments

@osben
Copy link

osben commented Jun 8, 2019

λ native-run --list
iOS

Connected Devices:
No connected devices found
Virtual Devices:
No virtual devices found
Android

Connected Devices:
No connected devices found
Virtual Devices:
Pixel 2 API 28 (API 28) Pixel_2_API_28

λ adb devices
List of devices attached
abfe908d0504 device

@osben
Copy link
Author

osben commented Jun 8, 2019

λ adb devices -l
List of devices attached
abfe908d0504 device product:tissot model:Mi_A1 device:tissot_sprout transport_id:1

@osben
Copy link
Author

osben commented Jun 8, 2019

2019-06-08T21:49:17.277Z native-run Caught fatal error: Error: Command failed: C:\Users\osben\AppData\Local\Android\Sdk\platform-tools/adb -s abfe908d0504 shell getprop
[native-run]
[native-run] at ChildProcess.exithandler (child_process.js:304:12)
[native-run] at ChildProcess.emit (events.js:196:13)
[native-run] at maybeClose (internal/child_process.js:1011:16)
[native-run] at Process.ChildProcess._handle.onexit (internal/child_process.js:268:5) {

@borisjotic

This comment has been minimized.

@imhoffd
Copy link
Contributor

imhoffd commented Jun 10, 2019

@osben I'm guessing this is related to #36

@Juarrow
Copy link

Juarrow commented Jun 14, 2019

Same Problem.

native-run --device --list does not find a dime.
adb devices lists all devices like a charm.

@imhoffd
Copy link
Contributor

imhoffd commented Jun 15, 2019

@Incubbus Can you post the output of native-run --list --verbose ?

@Juarrow
Copy link

Juarrow commented Jun 15, 2019

  client:usbmuxd connectUsbmuxdSocket +0ms
  client:usbmuxd getDevices +33ms
  protocol:usbmux socket write: {"messageType":"ListDevices"} +0ms
  native-run:android:utils:sdk:resolveSDKRoot Looking for $ANDROID_HOME +0ms
  native-run:android:utils:sdk:resolveSDKRoot Looking for $ANDROID_SDK_ROOT +1ms
  native-run:android:utils:sdk:resolveSDKRoot Looking at following directories: [ 'C:\\Users\\\\AppData\\Local\\Android\\Sdk' ] +2ms
  native-run:ios:list There was an error getting the iOS simulator list: { Error: spawnSync xcodebuild ENOENT
  native-run:ios:list     at Object.spawnSync (internal/child_process.js:982:20)
  native-run:ios:list     at Object.spawnSync (child_process.js:601:24)
  native-run:ios:list     at Object.getXcodeVersionInfo (C:\Users\\AppData\Roaming\npm\node_modules\native-run\dist\ios\utils\xcode.js:8:46)
  native-run:ios:list     at Object.getSimulators (C:\Users\\AppData\Roaming\npm\node_modules\native-run\dist\ios\utils\simulator.js:14:36)
  native-run:ios:list     at Object.list (C:\Users\\AppData\Roaming\npm\node_modules\native-run\dist\ios\list.js:19:43)
  native-run:ios:list     at Promise.all.Promise.resolve.then.then.iosList (C:\Users\\AppData\Roaming\npm\node_modules\native-run\dist\list.js:5:85)
  native-run:ios:list     at process._tickCallback (internal/process/next_tick.js:68:7)
  native-run:ios:list     at Function.Module.runMain (internal/modules/cjs/loader.js:745:11)
  native-run:ios:list     at startup (internal/bootstrap/node.js:283:19)
  native-run:ios:list     at bootstrapNodeJSCore (internal/bootstrap/node.js:743:3)
  native-run:ios:list   errno: 'ENOENT',
  native-run:ios:list   code: 'ENOENT',
  native-run:ios:list   syscall: 'spawnSync xcodebuild',
  native-run:ios:list   path: 'xcodebuild',
  native-run:ios:list   spawnargs: [ '-version' ] } +0ms
  native-run:android:utils:sdk:resolveSDKRoot Using C:\Users\\AppData\Local\Android\Sdk +34ms
  native-run:android:utils:sdk:resolveEmulatorHome Looking for $ANDROID_EMULATOR_HOME +0ms
  native-run:android:utils:sdk:resolveEmulatorHome Using $HOME/.android/ at C:\Users\\.android +2ms
  native-run:android:utils:sdk:resolveAVDHome Looking for $ANDROID_AVD_HOME +0ms
  native-run Caught fatal error: { Error: No valid Android AVD home found.
  native-run     at resolveAVDHome (C:\Users\\AppData\Roaming\npm\node_modules\native-run\dist\android\utils\sdk\index.js:159:11) code: 'ERR_AVD_HOME_NOT_FOUND', exitCode: 1, data: undefined } +0ms
ERR_AVD_HOME_NOT_FOUND: No valid Android AVD home found.
events.js:167
      throw er; // Unhandled 'error' event
      ^

Error: connect ECONNREFUSED 127.0.0.1:27015
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1117:14)
Emitted 'error' event at:
    at emitErrorNT (internal/streams/destroy.js:82:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
    at process._tickCallback (internal/process/next_tick.js:63:19)

@imhoffd
Copy link
Contributor

imhoffd commented Jun 15, 2019

@Incubbus I assume you took out your user directory in that output? or was this the actual path it tried? C:\Users\\.android?

Usually the AVD home is in your home folder at ~/.android/avd. Does that directory exist? Have you opened Android Studio? If it doesn't, perhaps native-run should create it, or move on. This may be a premature error.

@Juarrow
Copy link

Juarrow commented Jun 15, 2019

@dwieeb yes, i removed my user directory name.

There is no avd-folder because i am not using virtual devices for testing (thus i never started the AVD Manager UI, which on first run - even without creating an AVD - would create the avd folder, as i just tested by launching the AVD Manager UI).

@imhoffd
Copy link
Contributor

imhoffd commented Jun 15, 2019

@Incubbus Thanks, I created #49 for that issue.

@Juarrow
Copy link

Juarrow commented Jun 15, 2019

@dwieeb Creating the AVD folder may resolve one exception thrown, but does make the command finish without throwing another error...

native-run:android:utils:adb:getDeviceProperties Invoking adb: 'C:\\Users\\...\\AppData\\Local\\Android\\Sdk\\platform-tools\\adb' [ '-s', '...', 'shell', 'getprop' ] +0ms
  native-run:android:utils:adb:getDevices Found adb devices: [ { serial: '...',
  native-run:android:utils:adb:getDevices     state: 'device',
  native-run:android:utils:adb:getDevices     type: 'emulator',
  native-run:android:utils:adb:getDevices     connection: null,
  native-run:android:utils:adb:getDevices     properties:
  native-run:android:utils:adb:getDevices      { product: '...',
  native-run:android:utils:adb:getDevices        model: '...',
  native-run:android:utils:adb:getDevices        device: '...',
  native-run:android:utils:adb:getDevices        transport_id: '3' },
  native-run:android:utils:adb:getDevices     manufacturer: '... ...',
  native-run:android:utils:adb:getDevices     model: '...',
  native-run:android:utils:adb:getDevices     product: '...',
  native-run:android:utils:adb:getDevices     sdkVersion: '28' } ] +362ms
events.js:167
      throw er; // Unhandled 'error' event
      ^

Error: connect ECONNREFUSED 127.0.0.1:27015
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1117:14)
Emitted 'error' event at:
    at emitErrorNT (internal/streams/destroy.js:82:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
    at process._tickCallback (internal/process/next_tick.js:63:19)

(Redacted with ... again)

@pranaydutta89
Copy link

+1 same issue

@imhoffd
Copy link
Contributor

imhoffd commented Jun 25, 2019

Hey all, I just released native-run 0.2.7 which addresses @osben's original issue! 🎉

Update: npm i -g native-run@latest

If there are more issues with device recognition on Android after 0.2.7, please create new issues. Thanks 😄

@imhoffd imhoffd closed this as completed Jun 25, 2019
@ghost

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants