XCode server build log location on disk - xcode

We use bots to build our iOS apps using the X server.
A few days ago, after the release of iOS 8, there were updates for Xcode, OSX and server and after installing the updates I am unable to find the log. It seems like Apple moved it to a different location?
Before these updates the log file was located at;
/Library/Server/Xcode/Data/BotRuns/Latest/output/build.log
I had a look but there is no /Library/Server/Xcode folder anymore?
The reason I would like to view these logs is because a python script is monitoring them and if there is a problem building notifying me of the problem by coloring a Philips hue light.
Any help would be greatly appreciated.
Thanks,
Robert

I totally forgot to post the result of my search.
I did find a solution to the problem.
Apple has a JSON service which you can contact to get the build logs.
You can find it here;
https://1.2.3.4/xcode/api/integrations/ (1.2.3.4 is the ip of your xcode server)
You can either view it with your browser or write a script to poll the JSON feed and process it.
You might get a SSL security warning in your browser if your SSL connection has no certificate.
Regards,
Robert

Related

Stuck at “Authenticating with the App Store...” when publishing my app [duplicate]

We have been trying to submit an app to the iTunes store using Application Loader for three days and keep getting stuck at the "Authenticating with the iTunes store" step.
We have read many forums (including stackoverflow) and tried what was suggested:
making a new provisioning profile
using different or multiple versions of Application Loader
changing proxy settings
rebooting the Mac
uploading at a different time of the day, etc.
We have even left it running overnight and have not had success with getting past this step. Unfortunately, no feedback is given about what the issue may be, and we have not gotten any error messages. We have submitted multiple apps without any difficulty in the past but are completely stuck this time!
How were you able to solve it?
This only started happening to me today (May 2017) and no answers in this thread solved my issue. The resolution for me was from here;
https://forums.developer.apple.com/thread/76803
Open Terminal. Change to home directory,
cd ~
Move the current transporter directory,
mv .itmstransporter/ .old_itmstransporter/
Invoke the following file to let Transporter update itself.
"/Applications/Xcode.app/Contents/Applications/Application Loader.app/Contents/itms/bin/iTMSTransporter"
Wait till it updates, then open Xcode and attempt upload.
You have to agree to a new sign up in Application Loader. Select "Application Loader" under the "Xcode -> Open Developer Tool" menu (the first menu to the right of the Apple in the menu bar). Once you open Application Loader there will be a prompt to agree to new terms and then to login again into your iTunes account. After this any upload method will work.
Just wait. In a few minutes all will be ok.
Dec 10th 2019, Xcode Version 11.2.1, MacOS X 10.15.1
I was facing exactly same issue yesterday and I thought it might be network issues, at least it looks like so. But this morning I had tried couple different networks and several VPN connections, none of them is working!
The highest voted answer here asks me to reset a cache folder named .itmstransporter under my home dir, the run a program iTMSTransporter under a specific folder, but I can't find both of them.
But soon I figured that it is the cache folder for the people who uses the legacy uploader program: Application Loader, which is deprecated by Apple and can be no longer found in Xcode 11. Then I found that the latest Xcode has located iTMSTransporter here:
/Applications/Xcode.app/Contents/SharedFrameworks/ContentDeliveryServices.framework/itms/bin/iTMSTransporter
And its cache folder is here:
/Users/your_user_name/Library/Caches/com.apple.amp.itmstransporter/
I removed my existed cache folder, and run iTMSTransporter without any parameter, it soon started to output logs and download a bunch of files, and finished in 2 or 3 minutes. Then I tried again to upload my ipa file, it works!!!
CONCLUTION:
Either the old Application Loader, or the latest Xcode, uses a Java program iTMSTransporter to process the ipa file uploading.
To function correctly, iTMSTransporter requires a set of jar files downloaded from Internet and cached in your local folder.
If your cache is somehow broken, or doesn't exist at all, directly invoking iTMSTransporter with functional parameters such as --upload-app in our case, iTMSTransporter DOES NOT WARN YOU, NOR FIX CACHE BY ITSELF, it just gets stuck there, SAYS NOTHING AT ALL! (Whoever wrote this iTMSTransporter, you seriously need to improve your programming sense).
Invoking iTMSTransporter without any parameter fixes the cache.
A functional cache is about 65MB, at Dec 10th 2019 with Xcode Version 11.2.1 (11B500)
I was stuck at "Authenticating with the iTunes Store" today. I had used the same version and build number as a previous submission. After I updated the build number, the upload went fine. I don't know if it's related, or if it was a coincidence.
I had the same issue for months, I just removed hotspot shield and private tunnel applications from my computer and tried to upload my app and everything worked just fine. so I suggest if you have installed any VPN application on your computer, remove the application and then try uploading your app from either application loader or xcode's organizer.
Try answer mentioned in this Reference Link, it really worked for me and for others as well.
Mentioning answer here as well.
Open Terminal and run:
cd ~
mv .itmstransporter/ .old_itmstransporter/
"/Applications/Xcode.app/Contents/Applications/Application Loader.app/Contents/itms/bin/iTMSTransporter"
iTMSTransporter will then update itself, then you can try uploading in XCode again or via application loader.
There is no magic fix. Itunes is just working bad. Lately is having more and more issues and it takes more and more to update and send an ipa to the store.
I had this issue with AppLoader and Xcode organiser too and after trying multiple times it just went through.
Changing network connection helped.
Turned off wifi on my phone
Enabled 3G
Created HotSpot
Connected my mac to the hotspot and got through the authetication issue
In my case, I hadn't agreed to the newest Developer Agreement. Just run Application Loader once, click on [Accept] to agree, then quit the Application Loader and the Upload to App Store should work fine.
Following worked for me.
Open another instance of Application Loader.
( Select "Application Loader" under the "Xcode -> Open Developer Tool" menu)
"Agree" to the terms.
After completing Step 2. First instance of Application Loader proceeded to the next step and build got submitted.
I have also encounter the same issue. One possible solution is to go to Xcode -> Preferences -> Accounts and from the left menu select on App ID then click on the View Details and tap on the refresh button. while reloading you will get following error
The selected team's agent, 'ADMIN NAME' must agree to the latest
Program License Agreement.
If you will not get above error, Following solution will not work.
It means that you need to login into the developer account using Admin login and accept that latest agreement.
Then you will be able to upload binary on the app store.
The updated answer for Xcode 11.x.x and Transporter application, open terminal:
rm -rf ~/.itmstransporter/
"/Applications/Transporter.app/Contents/itms/bin/iTMSTransporter"
Wait a while
Problem solved!
I'm running MacOS Mojave 10.14.6, Xcode 11.3.1 and Transporter 1.1.1, and always got stuck at the Authentication with App Store stage, no matter how long I wait, I tried uploading using Xcode, using xcrun altool, Transporter, nada.
Finally I got it working by exporting the ipa file to a new Macbook (10.15.3, Xcode 11.3.1, Transporter 1.1.1), and used the Transporter app to upload it there.
The key difference is the Transporter tool on my new Macbook asked for a 6-digit code as authentication while the old Macbook did not, I suspect the authentication token on my old device expired but the system didn't ask for a new one when trying to upload the app. I had 2-FA enabled.
So I think forcing a manual re-authentication when you upload the app is the answer, the only other difference is the MacOS version, but I didn't test if it'll make a difference.
I solved the problem by removing ~/Library/Caches/com.apple.amp.itmstransporter.
For safety, renaming will be better,
cd ~/Library/Caches
mv com.apple.amp.itmstransporter com.apple.amp.itmstransporter.old
Then, xcrun altool uploaded my ipa successfully.
By the way, I'm using Xcode 11.x & 12.2, macOS Catalina.
In 2020 Dec, the fix did finally worked for me was restarting my mac.
Today I ran into this issue, on Xcode 11.2.1 I solved it by going to Xcode -> Preferences -> Accounts -> Tapped on the '-' next to my Apple ID, then signed in again. This fixed it for me!
In April 21, 2021, I followed #DawnSong's answer, outlined in the image below but I also restarted my Mac and voila it worked.
Spec
Xcode 12.4
macOS Big Sur 11.2.3
You may try to relogin your ITC account via Application Loader.
Just try a different Internet connection. I tried all the solutions above but none worked. However, when I tried using my cellular connection (instead of my DSL connection that stands behind a firewall), it worked immediately.
It might be a network issue. If you are running inside a virtual machine (e.g. VMWare or VirtualBox), try setting the network adapter mode from the default NAT to Bridged.
All i did was duplicate my Application Loader.app in /Applications and
ran both Application loaders at the same time.
this solution is out there, it used to work for me, but today not even that! what I did and worked is that (2 instances) + uploading with XCode (organizer). Had to try a couple of times and it worked.
hope this helps someone, this bug has been there for quite a lot of time now() an apple doesn't seem to care too much
Another reason could be that you have changed the machine from which you're submitting the app. Or the user account on the machine. The new machine may lack the private key and/or certificate for the App Store. Although a certificate with the correct name is displayed in Xcode.
In this case, go to https://developer.apple.com -> certificates, use the plus sign (+) to add a new certificate (distribution), and follow the steps to request a certificate for the private key on your current machine. After installing the certificate, authentication may work.
For me I tried almost all the suggestions given above but the problem still reoccurred after the first success in uploading to App store. Until I found this website. In summary, do the following
Open terminal
Run this command:
rm -rf ~/.itmstransporter/
“/Applications/Xcode.app/Contents/Applications/Application
Loader.app/Contents/itms/bin/iTMSTransporter”
Note: this command(which is different from others above) will delete your ITMSTansporter folder and create a new one and ensure that xcode is quitted before running this command.
3. Start Xcode and all should be well.
Using Xcode 12.3 Distribute App and xcodebuild both got stuck today at this point.
I finally was able to solve this. Peeking around my system I found 3 versions of iTMSTransporter.
Printing the version of each using ./iTMSTransporter -version gives the following results:
/Applications/Transporter.app/Contents/itms/bin/ has version 2.0.0
/Applications/Xcode.app/Contents/SharedFrameworks/ContentDeliveryServices.framework/Versions/A/itms/bin/ has version 2.1.0
/usr/local/itms/bin/ has version version 1.9.3
So it looks that old version in /usr/local/itms was used by Xcode. After deleting /usr/local/itms I was able to upload my binary within Xcode 12.2 and using the xcodebuild command line tool.
Check your firewall
Network settings - (Check with network admin, usually they have blocked apple services unknowingly)
Check your system data/time.
I had same sort of issue, I resolved it by getting direct access to internet.
Also check Application Loader logs to see at which point it gets stuck.
I think I followed all the approaches given, but none worked for me.
My own approach that seems to work for me is to go thru the initial steps to upload a binary, then, after selecting the binary, do NOT click Send; instead close the window, and in the new window that will appear, start anew: hopefully it will go thru.
Found the solution:
I was uploading the build, Every activity went well except “Authenticating with the iTunes store”.
I disconnected my LAN cable and Connected my MAC with my mobile hotspot. and authentication problem was solved. If you have a limited internet plan then as soon as you pass authentication stage, again connect your LAN so that it will upload the app from you LAN cable's internet connection.
my upload failed each time when I uncheck the "include bitcode" option when uploading. So I checked the "include bitcode" option and upload went well.
Check your Firewall, If it is "On" then just Off it, then try

Where integration bots are stored?

Where does OSX Server store integration bots? Or is it my local Xcode who stores them? Server screwed my setup again, but this time I'm no longer able to see my bots.
Just want to express my deep frustration with Xcode CI:
OSX Server (or whatever it's called) is one of a kind piece of software, giving me incredible headaches lately with its' laginness, bugginess and poor performance. I think over the past week I experienced all possible errors Server has to offer:
"internal error updating bot" (please try again later);
"error reading service configuration" (or similar wording) - requires Xcode reset; continue to occur randomly again and again with no reasons;
"Xcode version is not supported" - only reboot seems to convince server to use Xcode which was already used previously
Randomly, fail integrations because "device is not connected", given that I test desktop application for OSX...
Finally, after yet another episode of screwing my setup, I no longer can see my bots on the server - they vanished. well done Server.
The bots and integrations are stored on the server.
The directory should look something like /Users/<xcode_server_tester_user_name>/Library/Caches/XCSBuilder/Bots
(OSX-Server 5.3 (16S4123), XCode 8.3.2 (8E2002))
I hate to say this but I found restarting the machine is a good way to resolve frustration No. 1 and 2.
device is not connected error often happens right after OS, OSX-Server or XCode is upgraded.
Usually reselecting devices from the XCode UI works for me.
Although sometimes it may require repeating multiple times and waiting for a long time for the device list to load.
On your OSX Server machine, deleting the simulator and re-adding it via Xcode->Devices sometimes helps too.
Another way is to delete all simulators from the linked Xcode on OSX Server machine and only keep the ones you want to test your project on. Config the bot to use All iOS Devices and Simulators.
Even though Xcode Server now runs as a specific user, the configuration files are kept in /Library/Developer/XcodeServer. You can also hit the Xcode Server API to get information about your bots.
In a Couchbase db.
I don't know how to access the contents though.
Enter this in Safari on your server
http://localhost:10355/_utils/

Xcode 8 AppStore upload (error 434)

When I tried to validate an App Store build using Xcode 8 I'm getting the following error:
ITunesSoftwareServiceAuthenticationErrorDomain 434.
What does this mean?
I received the same error on multiple attempts. I made some changes (to provisioning profiles etc.) and then validation worked fine a couple of times. But then the error message came back for no apparent reason. Seems like a bug on Apple's side.
Since then I switched to use Application Loader, and with that workflow I have not encountered any problems. Here's how.
In the Xcode Organizer, I do not use "Validate...", but instead "Export..." to save the my_product.ipa file.
Then open Apple's Application Loader (Xcode menu > Open Developer Tool > Application Loader), and with that I upload the my_product.ipa to iTunes Connect.
This process has seemed reliable to me.
Firstly, I received the same error on multiple times. Change some codes, finally release that :
Solution:
unchecked "include bitcode" , then validate (in my case it was successful)
After
Validate with checked "include bitcode"
P.S : Next time, I used XCODE Application Loader. It will be ok for deploy your application.
For what it's worth, this appears to be intermittent. I just received the error and literally did a retry without doing anything else and it worked.
I have seen more reports of this, and some seemingly unrelated but very similar messages from other services. I finally submitted a Code-Level Support Technical Support Incident (TSI). After two days I was told this is not a "code" issue and was credited the TSI i burned when submitting the questions. They got everything they needed to see the problem, but since they called me "John" in their answer, and they clearly saw my name was "Harry", hmm...
the reply, exactly:
Blockquote
Please include the line below in follow-up emails for this request.
Follow-up: 651327438
Hello John,
Thank you for contacting Apple Developer Technical Support (DTS). We provide support for code-level questions on hardware & software development, and are unable to help you with your question. For questions regarding iTunes Connect, we recommend that you first check the iTunes Connect Developer guide.
http://developer.apple.com/library/ios/iTunesConnectGuide
If you are not able to find the information you need in the iTunes Connect Developer Guide and you are still not able to resolve your issue, please direct your inquiry through the iTunes Connect Contact Us system When contacting the iTunes Connect Team, be sure to mention that you were referred by DTS.
Note that some issues with iTunes Connect are transient, and may resolved by waiting a few hours and trying again later.
Bottom Line: I gave up and uploaded the archive. It was accepted. I will update when the app is live.
Quit Xcode and re-login as suggested by members does not work for me. I solved it by using Application Loader.
Steps:
Change the version and build in your app.
Archive again for new file submission and export file to desktop.
Goto top menu: Open Developer Tool > Application Loader (if you don't have this, search, download and install this plug init)
Upload the new version archived file. Done
You will find them in iTunes Connect. From here process to My Apps > Choose the rejected app > Change the version and click on the new uploaded archive file, file will be processing.
Time to resubmit.

Cannot submit Xcode Archive to Itunes Connect. "Uploading Archive: Sending API Usage to Itunes Connect"

Hello Ive sent a version of my app one week ago through Xcode 6 and it didn't have any problem. Today Ive tried to upload a new version of my App via Xcode and when uploading, the progress bar stays in "Sending API usage to Itunes Connect". It doesn't give me any errors, nor warnings, it just stays like that forever.
Ive been looking in google and also in here, and found a lot of solutions (ones more logical than others). Well, Ive tried ALL those solutions, I've created new provision profiles, restarted my computer, restart Xcode, changed "netinfo", connect to new wifi, among others.
Its really driving me crazy since I didn't do anything, it just stopped working.
There are a lot of question with this same topic on the internet (including StackOverflow) and I think there is no one ultimate answer that really explain why this happen. Ive seen very detailed answers but none of them worked for me.
Some of this questions are:
1) Can't Submit App to App Store: “Sending API Usage to iTunes Connect” either times out or loses connection.
2) Application Loader (Apple) stuck on “Sending API usage to iTunes Connect”.
3) Stuck on “Sending API usage to iTunes Connect”.
If I export the archive into an .ipa I can upload it with application loader. I don't know why I can't do it with Xcode. Ive always used Xcode for this.
The reason I want to know how to do it with Xcode is that I don't know if uploading only the .ipa and configuring in app purchases only directly via itunes connect's webpage without doing it in application loader(the button that says "New In-app Purchases" template) , will also work.
I hope someone could help me.
Thank you.
minimise the organiser window
reopen it from mac floating menubar
This seems to be refreshing the connection while online. Works for me.
I had this same problem a few minutes ago, let me explain what I did:
Restart your router/modem
Restart your Mac
Set the active scheme in Xcode for iOS Device
Make a new archive
Validate before submit
These steps work perfectly for me, hope that helps.
I also faced similar problem. I can't upload from my office, but can upload from my home. I assumed that my office's internet connection has problem with Apple server. If you get problem with Xcode to upload, you can download Application Loader separately from iTunes connect and try with that and wait for passing sending api usage state.
Try doing this:
cd ~
mv .itmstransporter/ .old_itmstransporter/
"/Applications/Xcode.app/Contents/Applications/Application Loader.app/Contents/itms/bin/iTMSTransporter"
Seems to be working for a lot of others - https://forums.developer.apple.com/thread/76803
I couldn't make this work on XCode 7.1.
I had to upgrade to 7.1.1, which allowed me to export the binary for App Store Deployment, and then use the Application Loader to upload the app for review.
Absolutely crazy, Apple.
I've found that instead of restarting your router and machine etc, simply clicking 'Renew DHCP Lease' in the TCP/IP settings of your internet device (under Network in System Preferences) solves the issue much quicker and easier, for me anyway.
Just another error that makes working in Apples eco-system all the more fun and exciting...
There was no one particular procedure that seemed to do it in my case: restarted router, restarted Mac, restarted Xcode, recreated profiles on developer website, viewed them in Xcode, recreated archives, attempted just validating for App Store. All of these things over and over again.
My experience has been that you should just kept trying until suddenly it works. Which is sadly not the magic button to click that I was looking for.
Possibly the fact that I managed only twice in the last dozen or so upload attempts in the morning from here in the UK (making it approx 02:30 over there in the US), indicates it's perhaps an iTunes overloaded problem.
I had the same problem, though none of the suggested steps solved my problem, other than using the Application Loader.
However, one thing that bothered me was a warning message saying that:
The resulting API analysis file is too large. We were unable to validate your API usage prior to delivery. This is just an informational message.
It came to me that it might be the reason why Xcode's uploading might be messed up, since it locks at the Sending API usage to iTunes Connect.
Some people mention it in some posts here in stackoverflow.
For me Network is not allowing to upload the build as office wireless is having firewall so I had to move to other wi-fi to upload the build.
Just adding another possible answer here that fixed it for me.
I was on a VPN at work. Disabling this and trying again worked.

iOS Remote Debugging on external Devices

I am not sure if I can remote debug an application running on an Iphone which is not next to me? We test your app. well but some users have issues sometimes we can not replicate and dont know where to start digging in this cases. So it would be very easy for us when we can just connect the remote debugger via the internet to an device. Is is possible somehow?
Most of the guys using the app we could remote to there PCs (but the majority dont uses macs...) and run tools there, is this maybe an easier solution?
For Mac Os I found this http://developer.apple.com/library/mac/#documentation/DeveloperTools/Conceptual/XcodeDebugging/300-Debugging_Programs_Remotely/remote_debugging.html
But this is not for iOS...
Thx very very much already
Our company just released a service exactly for that purpose: http://apphance.com . It allows you to very easily (5 minutes) integrate your application - add framework project basically and you get all the remote debugging capability included (you can access everything from very nice web panel):
You can see logs of running application (in near-real-time)
You can see how device conditions change over time (rotation, wifi/gprs, battery, others)
You get crashes reported to you automatically with all relevant information
Even out-of-memory errors are reported
Your testers can even report problems by shaking the device - including automated screenshots
and more.....
It's currently, closed beta stage but you can request access and for sure you get it.
All you need to do is get the crash log(you can get this at any time through the Xcode Organizer or iTunes Connect in released Applications) symbolicate it and ask the tester what they did to cause the error. This will give you every piece of info you could of gotten from GDB.
Check out https://testflightapp.com/sdk/, you can get crash reports, remote logs, see how is the teststing going and much more, see link for further details.

Resources