2

I am building a mobile app using VS-TACO and I am trying to run my build on iOS.

When I try to build this app for iOS on a Windows host which is connected to a Mac with remotebuild agent, then I get following Error Message in Visual Studio 2017 on Windows Machine

"Remote build error from the build server https://macIpAddress:3000/cordova - Error: Failed to acquire Cordova version 6.3.1. TACO0204: Error installing cordova via npm. Exit Code: 1. See output for details. EShopper"

When i do "npm cordova -v" on my Mac, i see "5.4.2"

Windows OS: Windows 10 Mac OS Sierra I have given all required user permissions as suggested in taco.visualstudio

Darzen
  • 1,105
  • 3
  • 13
  • 29
Siva
  • 41
  • 4

1 Answers1

0

Making npm cordova -v equals npm -v. It returns the npm's version, not the cordova version.

Cordova has to be installed on your PC(WINDOWS).

Could you do on your PC: cordova -v? If nothing is return : npm install -g cordova@6.3.1 or npm install -g cordova@latest if you want the LATEST version of cordova.

Then you have to tell Visual studio to use the global version of cordova, for that: choose Global Cordova option in Config.xml editor UI. enter image description here

Tell me if it's better, otherwise i'll guide you.

Aldwen
  • 338
  • 4
  • 14
  • Aldwen, Thank you for reply. I am off and will return to office on 8th. I got my Windows 10 machine checked and in that machine: cordova -v gave "'cordova' is not recognized as an internal or external command, operable program or batch file." npm -v gave "'npm' is not recognized as an internal or external command,operable program or batch file." Will install and let you know soon.Thanks again. – Siva Nov 07 '17 at 04:37
  • thank you for the link. Little confused. Link shared is for node installation on mac. Should node and Cordova be installed both Windows 10 and Mac 10.12? – Siva Nov 09 '17 at 12:51
  • Only on Windows! But it doesn't matter if it's installed on MAC – Aldwen Nov 09 '17 at 13:20
  • Hi Aldwen, thanks i came out of that step. Post installing node and cordova on my Windows machine, i was getting following error. "Build failed with error Remotebuild requires your projects to use cordova-ios 4.3.0 or greater with XCode 8.3. Please update your cordova-ios version." – Siva Nov 10 '17 at 02:23
  • So, i told Visual studio to use the global version of cordova as suggested above. I could see VS-RemoteBuild communicating. I was trying to run my application which is just a plain blank application with some prints in JS. Now, VS Complains of following error. Error MSB4018 The "VsTac" task failed unexpectedly. System.IO.FileNotFoundException: Could not find file 'C:\Users\Siva\AppData\Local\Temp\appAsTgz.tgz'. – Siva Nov 10 '17 at 02:32
  • Ok, normal, follow this steps on your windws computer: https://stackoverflow.com/questions/46202885/install-specific-version-of-cordova-cli-in-visual-studio-2017/47100179#47100179 – Aldwen Nov 10 '17 at 10:03
  • Thanks Aldwen, i tried steps you suggested in shared link. Step-6 "taco emulate ios" is giving error. Error is "------ Incremental Build: false C:\Users\Siva\AppData\Roaming\npm\node_modules\taco-cli\node_modules\applicationinsights\AutoCollection\Exceptions.js:25 throw error; Error: EBUSY: resource busy or locked, open 'C:\Users\Siva\AppData\Local\Comms\UnistoreDB\USS.jtx'.I made sure the user permissions are proper in mac for /usr//local/bin.Though application has got nothing to do,I tried cleaning the solution, removing platforms folder, using global cordova in config. Please help – Siva Nov 12 '17 at 06:25
  • Fix for the above one is: I had to run the powershell as administrator. Once after issuing "taco emulate ios", there is a long wait. After wait, the issue i see now is ------ Incremental Build: false TACO5629: Remote build failed Inner Error: Failed to parse changed files needed to prepare a build patch – Siva Nov 12 '17 at 08:23
  • Could you now try to build using visual studio? – Aldwen Nov 13 '17 at 08:00
  • Building from VS gave "Build failed with error Remotebuild requires your projects to use cordova-ios 4.3.0 or greater with XCode 8.3. Please update your cordova-ios version" Followed steps in shared link and did follwing: C:\Users\Siva\source\repos\EShopper\EShopper>npm install -g cordova-ios + cordova-ios@4.5.3 added 50 packages in 18.091s – Siva Nov 13 '17 at 21:30
  • Post that, did C:\Users\Siva\source\repos\EShopper\EShopper>cordova platform rm ios C:\Users\Siva\source\repos\EShopper\EShopper>cordova platform add ios WARNING: Applications for platform ios can not be built on this OS - win32. Adding ios project... Creating Cordova project for the iOS platform: Path: platforms\ios Package: io.cordova.myapp7a6666 Name: EShopper iOS project created with cordova-ios@4.2.1 Installing "cordova-plugin-whitelist" for ios – Siva Nov 13 '17 at 21:30
  • Running from VS is again giving this same error: Build failed with error Remotebuild requires your projects to use cordova-ios 4.3.0 or greater with XCode 8.3. Please update your cordova-ios version – Siva Nov 13 '17 at 21:32
  • In config.xml, i did . when i do "npm install -g cordova-ios" it shows "+ cordova-ios@4.5.3". I dont understand why "cordova platform add ios" is creating project with cordova-ios@4.2.1. – Siva Nov 13 '17 at 21:41
  • Same issue for me. – Valerio Gentile Nov 14 '17 at 13:09
  • Here is a piece of my config.xml: – Aldwen Nov 15 '17 at 13:00
  • In cmd go in your projet folder and type this commands: cordova platforms rm ios Then cordova platforms add ios@4.5.1 – Aldwen Nov 15 '17 at 13:32
  • 4.5.2 version of ios platform has a bug with image. Use 4.5.1 instead! – Aldwen Nov 15 '17 at 13:34
  • and cordova platforms add ios@4.5.1 is giving error "Error: cordovaProject.projectConfig.getFileResources is not a function". Deleting "platforms" folder and redoing did not help. Online surf for this error and suggestion in "https://www.youtube.com/watch?v=0n4N92sE8Zo" did not help. May i know what is deployment-target value in – Siva Nov 18 '17 at 03:37
  • 7.1.2 is the minumum version of ios your app will support. Wich version of cordova do you use? And Wich version of node? – Aldwen Nov 20 '17 at 10:49
  • iOS : macOS Sierra Version 10.12.6, Cordova : 6.3.1, Node: v8.9.1 – Siva Nov 21 '17 at 00:41
  • cordovaProject.projectConfig.getFileResources is due to your version of cordova. Upgrade your cordova. npm uninstall -g cordova then npm install -g cordova@7.1.0 – Aldwen Nov 21 '17 at 13:33
  • @Aldwen i see this issue in "taco emulate ios". I am running remotebuild in secure mode in my mac. Could you please tell me what is that i am missing here: C:\WINDOWS\system32>taco emulate ios ------ Incremental Build: false TACO5629: Remote build failed Inner Error: Failed to parse changed files needed to prepare a build patch – Siva Nov 29 '17 at 02:54
  • You are in system32 folder! Go in your project folder and try again – Aldwen Nov 29 '17 at 08:28
  • "taco remote add ios" had to be run from system32 in order to succeed. "taco emulate ios" gave warning "developmentTeam is missing from your build.json". To address this i included ` "ios": { "debug": { "developmentTeam": "XXXXXXXXXX" }, "release": { "developmentTeam": "XXXXXXXXXX", "codeSignIdentity": "iPhone Developer" }` Build Succeeded – Siva Dec 02 '17 at 09:37
  • But, now the problem is **TACO5616: Http 404: Error from attempting to emulate: Command failed: ios-sim launch /Users/siva.nernur/.taco_home/remote-builds/taco-remote/builds/36981/cordovaApp/platforms/ios/build/emulator/io.cordova.myapp7a6666.app --devicetypeid 'iPhone-5' --exit No available runtimes could be found for "iPhone 5".** remotebuild is showing log **GET /cordova/build/36981/emulate?target= 404 803.051 ms - 1286** @Aldwen thanks for constant help. hope i am close to see the app on ios emulator in mac. – Siva Dec 02 '17 at 09:40
  • Can someone please suggest how can i fix the above issue and bring up my app on simulator – Siva Dec 08 '17 at 04:59
  • Siva, did you try to build from Visual studio recently? – Aldwen Dec 08 '17 at 07:47
  • I had the same issue than you, yousing command line, but it works on Visual studio. – Aldwen Dec 08 '17 at 07:48
  • yeah, tried from Visual Studio. Did not work!! hey @Aldwen, as i cannot ask your mail id here, i am sharing mine. "siva.nernur@gmail.com". Please let me know if you are open to get in touch and give sometime to help me fixing this on Teamviewer. Thank you! – Siva Dec 16 '17 at 05:51