Franva
Franva

Reputation: 7077

Visual Studio Cordova iOS build server setup failed at Setting up Remote Agent for Building

I have installed all required software by following this document http://go.microsoft.com/fwlink/?LinkID=397716

And successfully installed the vs-mda-remote on my Mac.

When trying to run this command: vs-mda-remote --buildDir .

The system prompts: -bash: vs-mda-remote : command not found

I tried to close the Terminal, and even rebooted the Mac, the problem persists.

Update

cd into the vs-mda-remote and run: bin/vs-mda-remote --buildDir xxx works for me.

However, when I was trying to verify the Agent, using vs-mda-remote test, I got an error

BP13s-MacBook-Pro-3:vs-mda-remote mbp13$ bin/vs-mda-remote test Server: http://localhost:3000 buildUrl: http://localhost:3000/build/tasks?vcordova=3.4.1-0.1.0&cfg=release&command=build&options=--emulator

TypeError: Cannot read property 'statusCode' of undefined
    at Request._callback (/usr/local/share/npm/lib/node_modules/vs-mda-remote/test/selftest.js:64:56)
    at self.callback (/usr/local/share/npm/lib/node_modules/vs-mda-remote/node_modules/request/request.js:121:22)
    at Request.EventEmitter.emit (events.js:117:20)
    at ClientRequest.self.clientErrorHandler (/usr/local/share/npm/lib/node_modules/vs-mda-remote/node_modules/request/request.js:230:10)
    at ClientRequest.EventEmitter.emit (events.js:95:17)
    at Socket.socketErrorListener (http.js:1547:9)
    at Socket.EventEmitter.emit (events.js:95:17)
    at net.js:440:14
    at process._tickCallback (node.js:419:13)

Upvotes: 1

Views: 2330

Answers (2)

OneMuppet
OneMuppet

Reputation: 132

I had the same problem, not sure if it's related to me updating to cordova 4.0.0, using CTP3 of apache cordova tools?

What I had to do to make the vs-mda-remote -test work, was to start with secure set to false:

vs-mda-remote --secure false

and then I had to modify the selftest.js file since this by default tries to access via https. To do this go to: /usr/local/share/npm/lib/node_modules/vs-mda-remote/test/selftest.js then at line 27 change it so it says:

default('server', 'http://' + os.hostname() + ':3000').

And then re-run: vs-mda-remote -test in a separate terminal window and it should work.

Upvotes: 0

Brad Dean
Brad Dean

Reputation: 396

I've seen this error:

TypeError: Cannot read property 'statusCode' of undefined

Make sure you are running the build agent in another Terminal window.

Upvotes: 1

Related Questions