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

Android detectArchitecture timeout is too short #963

Closed
3 tasks done
GimpArm opened this issue Apr 29, 2020 · 2 comments
Closed
3 tasks done

Android detectArchitecture timeout is too short #963

GimpArm opened this issue Apr 29, 2020 · 2 comments

Comments

@GimpArm
Copy link
Contributor

GimpArm commented Apr 29, 2020

Bug Report

Problem

What is expected to happen?

Android debugging to connect

What does actually happen?

Android debugging fails to connect

Information

The timeout for detechArchitecture() is sometimes too low when devices are on wifi network connections and even sometimes over USB. The command can take up to 3 seconds to execute and return. Currently the timeout is set to 1000 ms and setting it to 5000 ms seems to be a good compromise.

/bin/templates/cordova/lib/build.js line213

`Command finished with error code 0: adb devices
Running adb shell command "cat /proc/cpuinfo" on target ce071827f219c13701...

Command finished with error code ENOENT: killall adb
Device communication timed out. Try unplugging & replugging the device.
CordovaError: Device communication timed out. Try unplugging & replugging the device.
at Object.module.exports.detectArchitecture (D:\workspace\Git\store-logistics-app\build-tmp\cordova\cordova\platforms\android\cordova\lib\build.js:209:35)
at D:\workspace\Git\store-logistics-app\build-tmp\cordova\cordova\platforms\android\cordova\lib\device.js:64:22
at _fulfilled (D:\workspace\Git\store-logistics-app\node_modules\q\q.js:854:54)
at D:\workspace\Git\store-logistics-app\node_modules\q\q.js:883:30
at Promise.promise.promiseDispatch (D:\workspace\Git\store-logistics-app\node_modules\q\q.js:816:13)
at D:\workspace\Git\store-logistics-app\node_modules\q\q.js:624:44
at runSingle (D:\workspace\Git\store-logistics-app\node_modules\q\q.js:137:13)
at flush (D:\workspace\Git\store-logistics-app\node_modules\q\q.js:125:13)
at processTicksAndRejections (internal/process/task_queues.js:79:11)
Command finished with error code 0: adb -s,ce071827f219c13701,shell,cat,/proc/cpuinfo
'cordova.cmd run android --device --verbose --no-update-notifier' failed with exit code 1`

Command or Code

cordova.cmd run android --device --verbose --no-update-notifier

Environment, Platform, Device

Windows 10 building Android

Version information

VS Code: 1.44.2
Cordova: 9.0.0
Cordova-Android: 8.1.0

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above
@tbl0605
Copy link

tbl0605 commented May 13, 2020

I have exactly same problem, patch #965 solves it, thank you! :)
Hopefully it will be merged...

@breautek
Copy link
Contributor

breautek commented Jun 1, 2020

Closing as the PR for this issue has been merged.

@breautek breautek closed this as completed Jun 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants