Skip to content

Commit

Permalink
Increased detectArchitecture() timeout (#965)
Browse files Browse the repository at this point in the history
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.

Co-authored-by: Scott Downing <Scott.Downing@marc-cain.de>
  • Loading branch information
GimpArm and MarcCain-Scott authored May 22, 2020
1 parent e86b211 commit 08dc1dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/templates/cordova/lib/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ module.exports.detectArchitecture = function (target) {
// To fix it, either unplug & replug device, or restart adb server.
return Promise.race([
helper(),
timeout(1000, new CordovaError(
timeout(5000, new CordovaError(
'Device communication timed out. Try unplugging & replugging the device.'
))
]).catch(err => {
Expand Down

0 comments on commit 08dc1dd

Please sign in to comment.