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

Native-run failed #236

Open
yosr-maker opened this issue May 27, 2022 · 10 comments
Open

Native-run failed #236

yosr-maker opened this issue May 27, 2022 · 10 comments
Labels

Comments

@yosr-maker
Copy link

When i run the command
#npx cap run on ios ,
it shows this error :
[error] native-run failed with error
[object Object]: undefined

image

@yosr-maker yosr-maker added the ios label May 27, 2022
@jcesarmobile
Copy link
Member

Are you running from Windows?

@ajaychandran
Copy link

ajaychandran commented Jun 11, 2022

I am seeing a similar error on Android.

$ npx cap run android
✔ Copying web assets from build to android/app/src/main/assets/public in 8.48ms
✔ Creating capacitor.config.json in android/app/src/main/assets in 966.60μs
✔ copy android in 14.58ms
✔ Updating Android plugins in 714.92μs
✔ update android in 25.03ms
[error] native-run failed with error
        
        [object Object]: undefined
        
        More details for this error may be available online:
        https://github.com/ionic-team/native-run/wiki/Android-Errors

EDIT: I am running this on Ubuntu 20.04.

@felp23
Copy link

felp23 commented Jul 19, 2022

I am the same problem. I use linux PopOS 22.04.
image

@markemer markemer added android and removed ios labels Mar 6, 2023
@sanastasiou
Copy link

Same here under linux. Worked yesterday, now this and no idea what caused it or how to fix it.

(base) stefanos@SKYNET-MKIV-Linux:~/Work/killswitch/app$ npx capacitor doctor
[warn] The bundledWebRuntime configuration option has been deprecated. Can be safely deleted.
💊   Capacitor Doctor  💊 

Latest Dependencies:

  @capacitor/cli: 5.7.0
  @capacitor/core: 5.7.0
  @capacitor/android: 5.7.0
  @capacitor/ios: 5.7.0

Installed Dependencies:

  @capacitor/ios: not installed
  @capacitor/cli: 5.7.0
  @capacitor/android: 5.7.0
  @capacitor/core: 5.7.0
(base) stefanos@SKYNET-MKIV-Linux:~/Work/killswitch/app$ npx capacitor run android --external --verbose
✔ Copying web assets from www to android/app/src/main/assets/public in 584.30ms
✔ Creating capacitor.config.json in android/app/src/main/assets in 2.20ms
[info] Inlining sourcemaps
✔ copy android in 905.10ms
✔ Updating Android plugins in 12.91ms
[info] Found 7 Capacitor plugins for android:
       @capacitor-community/[email protected]
       @capacitor/[email protected]
       @capacitor/[email protected]
       @capacitor/[email protected]
       @capacitor/[email protected]
       @capacitor/[email protected]
       @capacitor/[email protected]
✔ update android in 63.17ms
[error] native-run failed with error
        
        1: undefined
        
        More details for this error may be available online:
        https://github.com/ionic-team/native-run/wiki/Android-Errors

@marcus-sa
Copy link

Same here under linux. Worked yesterday, now this and no idea what caused it or how to fix it.

(base) stefanos@SKYNET-MKIV-Linux:~/Work/killswitch/app$ npx capacitor doctor
[warn] The bundledWebRuntime configuration option has been deprecated. Can be safely deleted.
💊   Capacitor Doctor  💊 

Latest Dependencies:

  @capacitor/cli: 5.7.0
  @capacitor/core: 5.7.0
  @capacitor/android: 5.7.0
  @capacitor/ios: 5.7.0

Installed Dependencies:

  @capacitor/ios: not installed
  @capacitor/cli: 5.7.0
  @capacitor/android: 5.7.0
  @capacitor/core: 5.7.0
(base) stefanos@SKYNET-MKIV-Linux:~/Work/killswitch/app$ npx capacitor run android --external --verbose
✔ Copying web assets from www to android/app/src/main/assets/public in 584.30ms
✔ Creating capacitor.config.json in android/app/src/main/assets in 2.20ms
[info] Inlining sourcemaps
✔ copy android in 905.10ms
✔ Updating Android plugins in 12.91ms
[info] Found 7 Capacitor plugins for android:
       @capacitor-community/[email protected]
       @capacitor/[email protected]
       @capacitor/[email protected]
       @capacitor/[email protected]
       @capacitor/[email protected]
       @capacitor/[email protected]
       @capacitor/[email protected]
✔ update android in 63.17ms
[error] native-run failed with error
        
        1: undefined
        
        More details for this error may be available online:
        https://github.com/ionic-team/native-run/wiki/Android-Errors

Seeing the same issue ...

@marcus-sa
Copy link

marcus-sa commented Mar 21, 2024

This is the actual error:

{
  code: 1,
  killed: false,
  signal: null,
  cmd: '/Users/marcus-sa/Library/Android/sdk/platform-tools/adb -s ZY22HSDLRD shell getprop',
  stdout: '',
  stderr: 'adb: device unauthorized.\n' +
    "This adb server's $ADB_VENDOR_KEYS is not set\n" +
    "Try 'adb kill-server' if that seems wrong.\n" +
    'Otherwise check for a confirmation dialog on your device.\n'
}

@Arcanorum
Copy link

Same :/
Latest Capacitor, Ubuntu 20.04

@ftama0
Copy link

ftama0 commented May 27, 2024

when run android get this error,

ionic error

I'm confused about what to do.
targetSdkVersion has been changed to 33

@marcus-sa
Copy link

when run android get this error,

ionic error I'm confused about what to do. targetSdkVersion has been changed to 33

when run android get this error,

ionic error I'm confused about what to do. targetSdkVersion has been changed to 33

What does the error say? "Unable to find any devices"

@nmobregon
Copy link

This is the actual error:

{
  code: 1,
  killed: false,
  signal: null,
  cmd: '/Users/marcus-sa/Library/Android/sdk/platform-tools/adb -s ZY22HSDLRD shell getprop',
  stdout: '',
  stderr: 'adb: device unauthorized.\n' +
    "This adb server's $ADB_VENDOR_KEYS is not set\n" +
    "Try 'adb kill-server' if that seems wrong.\n" +
    'Otherwise check for a confirmation dialog on your device.\n'
}

Well that's the actual issue, your computed has lost permission to debug on the device.. the solution is to reset the usb debugging permissions from the device and then reconnect for the permissions prompr to popup on the device...
that was the solution for me!

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

10 participants