Visual studio apache cordova remote ios connection hostanme/ip does not match issue

308 views Asked by At

I use Visual Studio Apache Cordova for a hybrid application. I try to connect a Mac computer using remote connection. I made settings correctly. A few days ago, ip address of Mac computer has changed. And ı can not connect Mac computer with remote connection. It gives below error:

Error: An error occurred uploading to the build server https://192.168.95.26:3000/cordova: Error: Hostname/IP doesn't match certificate's altnames: "IP: 192.168.95.12 is not in the cert's list , 192.168.95.87"

2

There are 2 answers

0
Elvis Xia - MSFT On

Error: An error occurred uploading to the build server https://192.168.95.26:3000/cordova: Error: Hostname/IP doesn't match certificate's altnames: "IP: 192.168.95.12 is not in the cert's list , 192.168.95.87"

It is a known issue. When the IP address changed, the previously generated certificate become invalid. You can fix this by following steps:

  1. Stop the remote agent on your Mac.
  2. In terminal run remotebuild certificates reset.
  3. In terminal run remotebuild certificates generate.
  4. Change the VS remote build configurations in VS.

For details, you can refer to Possible issue 2: The host name or IP address of your Mac has changed.

0
coder On

Try to do following steps.

  • First on Mac terminal give this command

    remotebuild --secure false

  • Then find the IP address of the Mac.

  • Go to the Tools->Options of visual studio

    In the Options dialog box, open Tools for Apache Cordova, and then choose iOS Configuration.

  • Give the IP of Mac in Host and Port as 3000. Then put secure mode to false

More details could be found from this link https://taco.visualstudio.com/en-us/docs/ios-guide/