question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ERR_NO_DEVICE: No hardware devices found.

See original GitHub issue

Description:

The command ionic cordova run android --device fails with

ERR_NO_DEVICE: No hardware devices found. Not attempting emulator because --device was specified. [ERROR] An error occurred while running subprocess native-run

Steps to Reproduce:

Just use the command above to test an app on an android device.

Output:

native-run Caught fatal error: { Error: No hardware devices found. Not attempting emulator because --device was specified.
    at selectDevice (C:\Users\\AppData\Roaming\npm\node_modules\native-run\dist\android\run.js:82:19) code: 'ERR_NO_DEVICE', exitCode: 1, data: undefined }
ERR_NO_DEVICE: No hardware devices found. Not attempting emulator because --device was specified.
[ERROR] An error occurred while running subprocess native-run.

        native-run.cmd android --app platforms\android\app\build\outputs\apk\debug\app-d... exited with exit code 1.

My ionic info:

Ionic:

   Ionic CLI          : 5.0.2 (C:\Users\jp\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework    : ionic-angular 3.9.6
   @ionic/app-scripts : 3.2.3

Cordova:

   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : android 8.0.0, ios 4.5.5
   Cordova Plugins   : cordova-plugin-ionic-webview 1.2.1, (and 17 other plugins)

Utility:

   cordova-res : not installed
   native-run  : 0.2.5

System:

   Android SDK Tools : 26.1.1 (C:\Users\\AppData\Local\Android\Sdk)
   NodeJS            : v10.15.3 (C:\Program Files\nodejs\node.exe)
   npm               : 6.9.0
   OS                : Windows 10

Other Information:

Seems related to https://github.com/ionic-team/native-run/issues/42.

Temporarily downgrading back to ionic 4.x.x helps.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
developbatcommented, Sep 8, 2020

I still cant find my connected android device using native-run --list

checkdebug mod is on android device

0reactions
harunme3commented, Feb 12, 2021

may be your debug option is off

Read more comments on GitHub >

github_iconTop Results From Across the Web

no devices/emulators found when trying to use ionic cordova ...
1 Answer 1 · Enable Debug mode on your Android device. Also enable USB debug that is in the same configuration view. ·...
Read more >
SOLVED: Can't run app on android: device not found
What I did: enable usb debugging on the android devices (tapping the build number 7 times); run the command ionic run android --device;...
Read more >
IONIC – ERR_NO_DEVICE: No hardware devices found
IONIC - ERR_NO_DEVICE: No hardware devices found. Nhận dạng lỗi. Khi gọi chạy debug app trên virtual android thì gặp lỗi này. ionic...
Read more >
initial configuration Dell Force10 S50 - Spiceworks Community
Open Device Manager on my computer and get the port number of the USB-2-Serial dongle; Open Putty; Set Putty to connect over Serial...
Read more >
No Devices/Emulators Found When Trying To Use Ionic ...
ERRNODEVICE : No hardware devices found. Not attempting emulator because device was specified. Just use the command above to test an app on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found