Cordova Remotebuild (taco-remote) Test --Device Error : getaddrinfo ENOTFOUND

1.1k views Asked by At

Macbook Globally Installed

  1. xcode -v8.2
  2. cordova -v6.4.0
  3. npm -v3.10.10
  4. node -v7.2.1
  5. remotebuild -v2.1.2

Macbook

I was able to build fine until after updating npm/node/cordova/xcode.I am not sure which versions were working previously and now am having the below error when attempting to $remotebuild test --device

The following error message happens when attempting to run remotebuild test --device on the Macbook :

users-MacBook-Pro-2:piapp userUser$ remotebuild test --device
Warning: No server modules selected. Defaulting to configuration "modules": {"taco-remote": { "mountPath": "cordova"} }
Remote build server listening on [https] port 3000
Please view/edit server configuration at /Users/userUser/.taco_home/RemoteBuild.config. You many need to run 'remotebuild saveconfig' to generate it. You will have to restart the server if you update the server configurations.
New build request submitted:
/build/tasks/?vcordova=5.4.0&vcli=1.3.5&cfg=debug&command=build&options=--device
{"host":"users-macbook-pro-2.local:3000","connection":"close","transfer-encoding":"chunked"}
Build will be executed under: /Users/userUser/.taco_home/remote-builds/taco-remote/builds/41042
Saving build request payload to : /Users/userUser/.taco_home/remote-builds/taco-remote/builds/41042
Saved uploaded build to /Users/userUser/.taco_home/remote-builds/taco-remote/builds/41042/upload_41042.tgz
POST /cordova/build/tasks/?vcordova=5.4.0&vcli=1.3.5&cfg=debug&command=build&options=--device 202 255.720 ms - 671
Extracted app contents from uploaded build request to /Users/userUser/.taco_home/remote-builds/taco-remote/builds/41042/cordovaApp. Requesting build.
Taking 41042 as current build
Done with current build. Checking for next build in queue.
1...
GET /cordova/build/tasks/41042 200 4.459 ms - 999
Error: taco-remote test failed.
Build Failed: {"vcordova":"5.4.0","vcli":"1.3.5","cfg":"debug","command":"build","options":"--device","status":"Error","buildCommand":"build","buildPlatform":"ios","configuration":"debug","buildDir":"/Users/userUser/.taco_home/remote-builds/taco-remote/builds/41042","buildNumber":41042,"logLevel":0,"submissionTime":"2016-12-20T14:37:46.155Z","changeList":null,"buildSuccessful":false,"messageId":"BuildFailedWithError","messageArgs":["/Users/userUser/.taco_home/remote-builds/taco-remote/builds/41042/cordovaApp/platforms/ios/cordova/build: Command failed with exit code 2"],"message":"Build failed with error /Users/userUser/.taco_home/remote-builds/taco-remote/builds/41042/cordovaApp/platforms/ios/cordova/build: Command failed with exit code 2","tgzFilePath":"/Users/userUser/.taco_home/remote-builds/taco-remote/builds/41042/upload_41042.tgz","appDir":"/Users/userUser/.taco_home/remote-builds/taco-remote/builds/41042/cordovaApp","statusTime":"2016-12-20T14:37:50.036Z","appName":"HelloCordova"}
/usr/local/lib/node_modules/remotebuild/node_modules/taco-utils/node_modules/applicationinsights/AutoCollection/Exceptions.js:25
                    throw error;
                    ^

Error: Build Failed: {"vcordova":"5.4.0","vcli":"1.3.5","cfg":"debug","command":"build","options":"--device","status":"Error","buildCommand":"build","buildPlatform":"ios","configuration":"debug","buildDir":"/Users/userUser/.taco_home/remote-builds/taco-remote/builds/41042","buildNumber":41042,"logLevel":0,"submissionTime":"2016-12-20T14:37:46.155Z","changeList":null,"buildSuccessful":false,"messageId":"BuildFailedWithError","messageArgs":["/Users/userUser/.taco_home/remote-builds/taco-remote/builds/41042/cordovaApp/platforms/ios/cordova/build: Command failed with exit code 2"],"message":"Build failed with error /Users/userUser/.taco_home/remote-builds/taco-remote/builds/41042/cordovaApp/platforms/ios/cordova/build: Command failed with exit code 2","tgzFilePath":"/Users/userUser/.taco_home/remote-builds/taco-remote/builds/41042/upload_41042.tgz","appDir":"/Users/userUser/.taco_home/remote-builds/taco-remote/builds/41042/cordovaApp","statusTime":"2016-12-20T14:37:50.036Z","appName":"HelloCordova"}
    at Request._callback (/usr/local/lib/node_modules/remotebuild/node_modules/taco-remote/lib/selftest.js:104:46)
    at Request.self.callback (/usr/local/lib/node_modules/remotebuild/node_modules/taco-remote/node_modules/request/request.js:121:22)
    at emitTwo (events.js:106:13)
    at Request.emit (events.js:191:7)
    at Request.<anonymous> (/usr/local/lib/node_modules/remotebuild/node_modules/taco-remote/node_modules/request/request.js:985:14)
    at emitOne (events.js:101:20)
    at Request.emit (events.js:188:7)
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/remotebuild/node_modules/taco-remote/node_modules/request/request.js:936:12)
    at emitNone (events.js:91:20)
    at IncomingMessage.emit (events.js:185:7)
users-MacBook-Pro-2:piapp userUser$ 

Things I have tried :

  1. New provisioning profiles
  2. New Certs
  3. Removed & Regenerated Keys in Keychain / Profiles in Xcode
  4. Removed cached files in .taco-home/node_modules
  5. remotebuild reset cert
  6. remotebuild generate cert
  7. platform uninstall & reinstall
  8. remotebuild uninstall & reinstall
  9. going backwards & forwards multiple versions

Windows Machine

I am also getting the error 65 from the windows machine when attempting to run remote build... ( Code signing is required for product type 'Application' in SDK 'iOS 10.0' ) -- code signing was working correctly until attempting to update node/npm/cordova

2

There are 2 answers

0
megazoor On

I found the answer here:

  1. Removed a hook i had added as a fix which was failing...
  2. Ran repair on cordova tools & visual studio
  3. Finally the fix: Removed the first 3 bytes from build.json mentioned in the below URL.
  4. BUILDS LIKE A CHARM <3

Cannot build signed android package through visual studio cordova if your build.json file has a byte order marker at the start.

-- I should mention that while the above post title mentioned android i am specifically building for IOS which could cause confusion for anyone also dealing with this issue... Build.json refers to both android & ios platforms.

0
MacDaemon On

Using remotebuild, when you see:

"/usr/local/lib/node_modules/remotebuild/node_modules/taco-utils/node_modules/applicationinsights/AutoCollection/Exceptions.js:25 throw error;"

You could simply delete "~/.taco_home/RemoteBuild.config" by:

rm ~/.taco_home/RemoteBuild.config

And run remotebuild again and you should see the issue goes away. I can confirm this works on local Macs and also on cordova remotebuild cloud service Macincloud.com