Knelis
Knelis

Reputation: 7139

VS2015 RTM can't build Cordova app on iOS with remotebuild

I built an Apache Cordova app using Visual Studio 2015 RC. On a Mac, I had vs-mda-remote installed to build an iOS app. All worked great, until I upgraded to the official release today.

vs-mda-remote doesn't work anymore and from the documenation I understand they now call it remotebuild. So I cleaned up NPM and installed the tools according to the documentation, but I run into these errors.

When I try to build my project from Visual Studio, I get this error message:

0:error:0B07C065:x509 certificate routines:X509_STORE_add_cert:cert already in hash table:openssl\crypto\x509\x509_lu.c:346:

If I copy the source code to the Mac and just build it from there, it works fine.

Any ideas?

Upvotes: 3

Views: 1681

Answers (1)

Bjoerg
Bjoerg

Reputation: 1331

First I disable the security by executing "remotebuild --secure false" on OS X and in Visual Studio under Tools->Options->Tools for Apache Cordova->Remote Agent Configuration, switch "Secure mode" to false. I have done this to be sure there is no addidtional error and then I ran into another problem:

Windows 10; Visual Studio 2015 Community:

cannot POST //build/tasks?command=build&vcordova

OS X Terminal:

comnmand: remotebuild --secure false

remotebuild Copyright (C) 2014 Microsoft Corporation. All rights reserved. 1.0.0

Warning: No server modules selected. Defaulting to configuration "modules": {"taco-remote": { "mountPath": "cordova"} } Build Retention initialized with baseBuildDir /Users/butti/.taco_home/remote-builds/taco-remote/builds, maxBuildsToKeep 20 Initialized BuildManager with baseBuildDir /Users/butti/.taco_home/remote-builds/taco-remote/builds; maxBuildsInQueue 10; deleteBuildsOnShutdown true; allowsEmulate true; nextBuildNumber 1751 Remote build server listening on [http] port 3000 POST //build/tasks?command=build&vcordova=4.3.1&cfg=debug&loglevel=warn 404 5975.363 ms - 91

I found help on the following website which helped in my case:

...

iOS Simulator does not work when using the remotebuild agent and VS 2015 RTM: You need to install version 3.1.1 of the ios-sim node module. Run "npm install -g [email protected]" from the Terminal app in OSX to install.

...

Existing vs-mda-remote settings in Visual Studio do not work with the remotebuild agent: You will need to generate and use a new PIN when setting up Visual Studio to connect to the remotebuild agent for the first time. If you are not using secure mode, turn secure mode on and then off again to cause VS to reinitalize.

...

Especially the part "... turn secure mode on and then off again ..." does the trick!

Maybe you have to create a new certificate after that on OS X terminal:

remotebuild resetServerCerts --hostname=my.external.hostname.com
remotebuild generateClientCert --hostname=my.external.hostname.com

From the Microsoft Website (Install Visual Studio Tools for Apache Cordova):

...regenerate certificates that will work with the given hostname. If you intend to configure the remote agent in Visual Studio using the host name, ping the Mac using the host name to verify that it is reachable. Otherwise, you may need to use the IP address instead.

Hope that helps in your case!

Upvotes: 0

Related Questions