microsoft / remotebuild

Server for building Cordova projects on a remote Mac
Other
59 stars 23 forks source link

iOS10/XCode8 requires you to set a development team #5

Closed jdschuitemaker closed 8 years ago

jdschuitemaker commented 8 years ago

Building for iOS or deploying to remote or local iOS device results in this error:

Error: Remote build error from the build server Build failed with error Error code 65 for command:

When you build your Cordova project in Xcode directly, it states that you have to set a development team in the project settings. From within Visual Studio you can do that with changing your build.json as below:

{
  "ios": {
    "debug": {
      "developmentTeam": "ABCD12345Z"
    },

    "release": {
      "developmentTeam": "ABCD12345Z",
      "codeSignIdentity": "iPhone Developer"
    }
  }
}

It seems that remotebuild does not handle this.

toddtsic commented 7 years ago

OK, where do I send the six-pack?

Todd

Done building 31930 ------ Downloading completed build files from https://Todds-Mac-mini.local:3000/cordova/build/31930/download to E:\IonicProjects2\TSICMobileApi2\bld\iOS\Release ------ Done downloading the build outputs to E:\IonicProjects2\TSICMobileApi2\bld\iOS\Release ------ Extracting the build outputs to E:\IonicProjects2\TSICMobileApi2\bin\iOS\Release ------ Done extracting the build outputs to E:\IonicProjects2\TSICMobileApi2\bin\iOS\Release ------ Copying back to project: ios 1>Done building project "TSICMobileApi2.jsproj". ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

On Wed, Mar 15, 2017 at 9:41 AM, Jimmy Thomson notifications@github.com wrote:

I believe that the error is because you are using backslashes and not forward slashes in the path. If you open up your config.xml, you should see an entry in there referring to the icon-40.png: try replacing the backslashes in the path with forward slashes.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Microsoft/remotebuild/issues/5#issuecomment-286802434, or mute the thread https://github.com/notifications/unsubscribe-auth/AJeir6gN0fxJCBgmu2xHY3IePKERP0GPks5rmBSqgaJpZM4KHa8n .

-- Todd Greenwald President, TeamSportsInfo.com tgreenwald@teamsportsinfo.com 410-703-3450

toddtsic commented 7 years ago

Jimmy,

Can you coach me on how to get app on PC attached iOS device (has been working for months, provisioning profiles created and on device).

Until today, I could debug/iOS/Remote Device (only rarely would it debug, most often timed out, but when it timed out, would put code down on device and I could test).

My Ctrl+Shit+B of Release/iOS/Remote device DOES work, and yields:

Done building 61951 ------ Downloading completed build files from https://Todds-Mac-mini.local:3000/cordova/build/61951/download to E:\IonicProjects2\TSICMobileApi2\bld\iOS\Release ------ Done downloading the build outputs to E:\IonicProjects2\TSICMobileApi2\bld\iOS\Release ------ Extracting the build outputs to E:\IonicProjects2\TSICMobileApi2\bin\iOS\Release ------ Done extracting the build outputs to E:\IonicProjects2\TSICMobileApi2\bin\iOS\Release ------ Copying back to project: ios 1>Done building project "TSICMobileApi2.jsproj". ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

The debug/iOS/Remote device FAILS, and yields: (looks path related, but that's why I included the paths above

Done building 61950 ------ Downloading completed build files from https://Todds-Mac-mini.local:3000/cordova/build/61950/download to E:\IonicProjects2\TSICMobileApi2\bld\iOS\Debug ------ Copying back to project: ios 1>MSBUILD : cordova-build error : Error from downloading build outputs to E:\IonicProjects2\TSICMobileApi2\bld\iOS\Debug: The decryption operation failed, see inner exception. 1>Done building project "TSICMobileApi2.jsproj". 2>------ Deploy started: Project: TSICMobileApi2, Configuration: Debug iOS

2>Requesting deploy on remote iOS device for buildNumber 61950 on server https://Todds-Mac-mini.local:3000/cordova... 2>https://Todds-Mac-mini.local:3000/cordova/build/61950/deploy The remote server returned an error: (404) Not Found.

On Wed, Mar 15, 2017 at 9:50 AM, Todd Greenwald < tgreenwald@teamsportsinfo.com> wrote:

OK, where do I send the six-pack?

Todd

Done building 31930 ------ Downloading completed build files from https://Todds-Mac-mini.local:3000/cordova/build/31930/download to E:\IonicProjects2\TSICMobileApi2\bld\iOS\Release ------ Done downloading the build outputs to E:\IonicProjects2\ TSICMobileApi2\bld\iOS\Release ------ Extracting the build outputs to E:\IonicProjects2\ TSICMobileApi2\bin\iOS\Release ------ Done extracting the build outputs to E:\IonicProjects2\ TSICMobileApi2\bin\iOS\Release ------ Copying back to project: ios 1>Done building project "TSICMobileApi2.jsproj". ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

On Wed, Mar 15, 2017 at 9:41 AM, Jimmy Thomson notifications@github.com wrote:

I believe that the error is because you are using backslashes and not forward slashes in the path. If you open up your config.xml, you should see an entry in there referring to the icon-40.png: try replacing the backslashes in the path with forward slashes.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Microsoft/remotebuild/issues/5#issuecomment-286802434, or mute the thread https://github.com/notifications/unsubscribe-auth/AJeir6gN0fxJCBgmu2xHY3IePKERP0GPks5rmBSqgaJpZM4KHa8n .

-- Todd Greenwald President, TeamSportsInfo.com tgreenwald@teamsportsinfo.com 410-703-3450

-- Todd Greenwald President, TeamSportsInfo.com tgreenwald@teamsportsinfo.com 410-703-3450

drewgillies commented 7 years ago

@toddtsic, could you try a debug build rather than release? I believe running a release build on a device is disabled by (Apple's) design. If that isn't the answer, let's dig further.

toddtsic commented 7 years ago

Thanks for responding Drew,

If you look at the end of my post, there are two builds, one release/iOS/Remote run as (Ctrl+Shift+B) which runs successfully. The other debug/iOS/Remote which fails with path errors.

Since raising the question, I did the following, which allows me to work, but very much would like to be able to stay at my windows machine, attach my iOS device and work, so I'd like to see this issue through and will test whatever you need me to.

Workaround to problem of how to view ionic app on iOS device in a Windows Visual Studio 2017 environment with remote mac running remotebuild.

  1. Visual Studio 2017 debug/iOS/Remote Device => run
  2. GOTO mac (I use Team Viewer) location of build
    1. from terminal ran: xcode-select --install (thanks to Maximilian Schwarzmuller's excellent Udemy course: Ionic2: The Practical Guice...")
    2. from terminal ran: npm install -g ios-deploy (curious that I did not need to sudo...)
    3. plug in iOS device
    4. project location: /Users/{username}/.taco_home/remote-builds/taco-remote/builds/{build#}/cordovaApp/platforms/ios
    5. at this location open the {projectname}.xcodeproj in xCode (I'm using Version 8.2.1 (8C1002))
    6. in xCode, open project folder, click project file name
    7. view all Settings, scroll to signing section:
      1. Code Signing Identity: iPhone Developer: Todd Greenwald(xxxxx)
      2. Development Team: Todd Greenwald
    8. run the xCode project (right triangle icon top left, the device it is to run on is in dropdown to the right of run icon)

Works quickly...

After succeeding at this I repeated a Visual Studio 2017 debug/iOS/Remote Device thinking that the xcode command line tools or ios-deploy may have been the issue and got the same:

ARCHIVE SUCCEEDED

2017-03-24 09:50:11.825 xcodebuild[93738:3682260] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/_b/9pr9fhmd1yg_c4dqdpq2vzw40000gn/T/TSICMobile_2017-03-24_09-50-11.789.xcdistributionlogs'. 1.2.840.113635.100.1.61 Exported TSICMobile.xcarchive to: /Users/Todd/.taco_home/remote-builds/taco-remote/builds/61950/cordovaApp/platforms/ios/build/device EXPORT SUCCEEDED

No scripts found for hook "after_compile". No scripts found for hook "after_build". xcrun.stdout:

warning: PackageApplication is deprecated, use xcodebuild -exportArchive instead.

xcrun.stderr: xcrun: note: PATH = '/Users/Todd/.taco_home/node_modules/taco-remote-lib/2.3.0/node_modules/ios-sim/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin' xcrun: note: SDKROOT = '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.2.sdk' xcrun: note: TOOLCHAINS = '' xcrun: note: DEVELOPER_DIR = '/Applications/Xcode.app/Contents/Developer' xcrun: note: XCODE_DEVELOPER_USR_PATH = '' xcrun: note: xcrun_db = '/var/folders/_b/9pr9fhmd1yg_c4dqdpq2vzw40000gn/T/xcrun_db' xcrun: note: xcrun via PackageApplication (xcrun) xcrun: note: database key is: PackageApplication|/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.2.sdk||/Applications/Xcode.app/Contents/Developer| xcrun: note: lookup resolved in '/var/folders/_b/9pr9fhmd1yg_c4dqdpq2vzw40000gn/T/xcrun_db' : '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/PackageApplication'

Done building 61950 ------ Downloading completed build files from https://Todds-Mac-mini.local:3000/cordova/build/61950/download to E:\IonicProjects2\TSICMobileApi2\bld\iOS\Debug ------ Done downloading the build outputs to E:\IonicProjects2\TSICMobileApi2\bld\iOS\Debug ------ Extracting the build outputs to E:\IonicProjects2\TSICMobileApi2\bin\iOS\Debug ------ Done extracting the build outputs to E:\IonicProjects2\TSICMobileApi2\bin\iOS\Debug ------ Copying back to project: ios 1>Done building project "TSICMobileApi2.jsproj". 2>------ Deploy started: Project: TSICMobileApi2, Configuration: Debug iOS

2>Requesting deploy on remote iOS device for buildNumber 61950 on server https://Todds-Mac-mini.local:3000/cordova... 2>https://Todds-Mac-mini.local:3000/cordova/build/61950/deploy The remote server returned an error: (404) Not Found.

Todd

On Fri, Mar 24, 2017 at 9:54 AM, Drew Gillies notifications@github.com wrote:

@toddtsic https://github.com/toddtsic, could you try a debug build rather than release? I believe running a release build on a device is disabled by (Apple's) design. If that isn't the answer, let's dig further.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Microsoft/remotebuild/issues/5#issuecomment-289079642, or mute the thread https://github.com/notifications/unsubscribe-auth/AJeirxXcEbBY88QFAOCNWKczzIrEeWUyks5ro_UvgaJpZM4KHa8n .

-- Todd Greenwald President, TeamSportsInfo.com tgreenwald@teamsportsinfo.com 410-703-3450

drewgillies commented 7 years ago

@toddtsic, apologies for the delay--we're working through quite a backlog. I'm going to track this conversation internally so we don't lose it, but it may take some more time for us to investigate this thoroughly. Watch this space. Also, if you have any more developments/discoveries, please add a note here.

toddtsic commented 7 years ago

absolutely, totally understand...

T

On Wed, Apr 5, 2017 at 10:25 AM, Drew Gillies notifications@github.com wrote:

@toddtsic https://github.com/toddtsic, apologies for the delay--we're working through quite a backlog. I'm going to track this conversation internally so we don't lose it, but it may take some more time for us to investigate this thoroughly. Watch this space. Also, if you have any more developments/discoveries, please add a note here.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Microsoft/remotebuild/issues/5#issuecomment-291934823, or mute the thread https://github.com/notifications/unsubscribe-auth/AJeir2X9OzNZmxOAHTaTErTcd52IW1_5ks5rs86FgaJpZM4KHa8n .

-- Todd Greenwald President, TeamSportsInfo.com tgreenwald@teamsportsinfo.com 410-703-3450

toddtsic commented 7 years ago

Anyone with any updates on debugging iOS from windows environment (either with iOS local to widows machine or remotely attached to iOS machine)?

Have hit the point in development that I'm experiencing iOS differences in behavior I can only get a handle on if I can debug.

Any tips, pointers, greatly appreciated.

T

On Wed, Apr 5, 2017 at 10:26 AM, Todd Greenwald < tgreenwald@teamsportsinfo.com> wrote:

absolutely, totally understand...

T

On Wed, Apr 5, 2017 at 10:25 AM, Drew Gillies notifications@github.com wrote:

@toddtsic https://github.com/toddtsic, apologies for the delay--we're working through quite a backlog. I'm going to track this conversation internally so we don't lose it, but it may take some more time for us to investigate this thoroughly. Watch this space. Also, if you have any more developments/discoveries, please add a note here.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Microsoft/remotebuild/issues/5#issuecomment-291934823, or mute the thread https://github.com/notifications/unsubscribe-auth/AJeir2X9OzNZmxOAHTaTErTcd52IW1_5ks5rs86FgaJpZM4KHa8n .

-- Todd Greenwald President, TeamSportsInfo.com tgreenwald@teamsportsinfo.com 410-703-3450

-- Todd Greenwald President, TeamSportsInfo.com tgreenwald@teamsportsinfo.com 410-703-3450

ekambarrao commented 7 years ago

Hi, I am using Visual Studio 2017 Apache Cordova 6.3.1 and trying to build for iOS. I have been facing this issue.

Failed to build app for buildNumber 5472: /Users/user127867/.taco_home/remote-builds/taco-remote/builds/5472/cordovaApp/build.json: Unexpected token / in JSON at position 157

I could not figure out the reason.

Can some body throw some light here!!

AnBucyk commented 7 years ago

Looks like your build.json is invalid. Could you look for a typo at that position? Or share the portion of it containing that line?

ekambarrao commented 7 years ago

Hi, I am using Visual Studio 2017 Apache Cordova 6.3.1 and trying to build for iOS. I have been facing this issue.

I am getting this error

BUILD SUCCEEDED xcrun: error: unable to find utility "PackageApplication", not a developer tool or in PATH Error: Error code 72

How to fix this!!!!

Everywhere written as 8.3 is problem and xcodebuild should be there. But where, when using Visual studio, which is complete automated one remotebuild, where to do this?

thx

iamisti commented 6 years ago

everybody is talking about build.json file, but there is no fcking build.json file in ionic ios app :D :D Can somebody help me with that?

immortalt commented 6 years ago

everybody is talking about build.json file, but there is no fcking build.json file in ionic ios app :D :D Can somebody help me with that?

iamisti commented 6 years ago

everybody is talking about build.json file, but there is no fcking build.json file in ionic ios app :D :D Can somebody help me with that?

ghost commented 6 years ago

@iamisti - hopefully you've figured out by now that you had a build.json file into the root of your app and then set the contents as explained here: https://cordova.apache.org/docs/en/latest/guide/platforms/ios/#using-buildjson

If you go into XCode and create a new project set your Signing > Team, you'll find your team code in parenthesis where the Signing Certificate is displayed below your Team selection.

The easiest way to get past all of these errors is to open the XCode project under your "platforms" folder in your Ionic project and set the signing properties there. Then you can use the TACO cli to run "taco build ios" - if you're using Visual Studio instead of VSCode, then god help you: it's a mess.

MemeDeveloper commented 6 years ago

@unboxedsolutions - you are 100% right, running from VS is a pain / plagued with issues. (N.B. seems this is mainly Apple's fault for forcing us to use a mac in the first place, and MS do their best to fix up the situation so we don't all have to buy overpriced Mac's - apple's obvious goal here). I followed your solution and ran the Xcode project from the platforms folder. BANG all working. Thanks.