macOS Server - Unable to run Xcode bots, because user is not logged in - server

Disclaimer: I understand that stackoverflow is development oriented and this might be more a server question, but I think that many developers use CI and this is the right place to reach these developers.
I am using macOS Server app to run a continuous integration.
Since a recent update, which allows you to run tests as a different user, the server is often unable to sign in as the testing user to run the tests.
Expected behaviour would be, that by clicking Switch user button, it would sign in and start running Xcode bots. What happens is that it makes me sign in as the user, but it stays disconnected.
Restarting the machine doesn't solve the issue.
Please see the image for clarification.

I am going to answer my own question as I spend quite a few time trying to solve it.
The only resolution that I found and works every-time is to setup the Xcode app again.
Click Choose Xcode.. and select xcode app that you want to use to run the builds
Select the user that you want to use to run the builds
Wait for configuration
The issue is resolved
Hope this will help somebody!

Related

XCode 5 hangs with a timeout error when validating/uploading a "ready to be uploaded" app

I've been developing and uploading apps for some months. Whenever they needed being uploaded to the app store, I could do it without problem, but now, I'm stuck with one that doesn't want to be validated/uploaded. XCode says "the request timed out" after MANY minutes with a spinwheel on screen.
The differences between my old updates to the app store and the one I'm trying right now are:
-Xcode 4.X before, Xcode 5 now.
-I had to recreate the app store certificate/provisioning profiles, because they just expired.
-I inherited this project from other coworker (not here anymore) and maybe my "developer profile" is somewhat conflicting with some certificates, etc... (Still many dark areas for me).
I've kind of tried "everything". Erasing provisioning/profiles, closing Xcode, resetting, cleaning my project. But no luck. My current Xcode 5 is able to compile my app perfectly, I'm even able to select the distribute option before uploading (the app is ready to be uploaded onto itunes connect), I even login with my client credentials onto itunes connect, I can even select the correct provisioning profile (app store profile, not a developer one), but no luck:
If I choose to upload or validate, Xcode just complains with some kind of "dull" timeout error.
Any hints? Any way to debug what happens behind the curtains?
Greetings, I'm at a loss.
EDIT: Apparently, the timeout failing event appears in the validation process. If I try to upload, the status log says "Failed Validation". If I try to validate, obviously there's also a "Failed validation" error. Where can I find some log to see what part of the validating process is failing?
Well, apparently: "Problem solved".
After 2 boring days trying to upload my app (via Xcode 5, and via Application Loader), I've discovered that Apple upload servers seem to be overloaded (unless a better explanation arises).
I'm in Europe, and from 9 to 14 h my app was ALWAYS rejected. But once I tried it after 16h, the upload and validation processes worked like a charm (both with Xcode 5 and with Application Loader).
Why this? No idea, but I didn't change anything in my upload process, so it's sad, but the solution is:
"Have patience, and wait to upload your app on a time slot where Apple upload servers are not overloaded". The sad part is: No one knows WHEN is that time :)
I solved it by switching Internet provider.
I simply connected my laptop to my iPhone via Personal Hotspot and used LTE network to upload the app.
It worked for me twice.
for Xcode 13 and Mac OS Big Sure
Install the "Transporter" app from the MacOS app store.
From Xcode's organizer, select your archive and press "Distribute App"
Instead of "Upload", select "Export" and proceed as usual.
Drop the exported .ipa into the transporter and press "Deliver".
In my case I changed the dns server from my provider to the google dns server (8.8.8. and 8.8.4.4).
I think you can try any other, if your providers dns or what ever doesn't work
Faced the error many times, not sure why.
Try this
Export the ipa after the archive
Add and upload in Transporter
I get 100% success in uploading and feel a little quicker than Xcode's upload.
I actually called Apple Developer Support about this and they solved the problem!
It turned out that my recovery email address in my Apple ID (not the main email address but the recovery one) was not verified. They had me go to http://appleid.apple.com, login with my Apple ID, and then go to the 'Password and Security' section (on the left).
After answering my security questions I was able to resend the verification email, and once verified I was able to log in on Xcode straight away!
I have the observation that with Mavericks and App Nap enabled, a hidden Organizer window within XCODE will cause the network connection to be dropped.
Even if the window is occulated (hidden) for just a second).
Make sure the window is always visible and the problem does NOT occur.

Apple rejects our latest App

Our latest app was rejected by giving following reason
"when the user launches the app, a blank black screen is produced"
We had tested this many times and did not notice this issue. We tested again now, but it is working properly for us.
Can someone help us to find out the issue?
I don't think anyone can help you find this issue, My suggestion would be to follow up with the Review Team and try to obtain as much information as you can from them. Such as, what device was it tested on, what OS version and so forth.
Ah, the many woes of the app store process.
Make sure that you have tested your app not only on the simulator but also on a physical device.
Secondly the issue might be that you have made some (false) assumptions about the data on the device, that you might have put there manually, but isn't handled when installing anew.
Therefore a plan of attack might be to remove the application complete from both device and simulator and try running them from a fresh install rather than on top of an already installed installation.
Best of luck!
Try to build and install your app from a clean state. You may not be seeing the same as the reviewer, because if you only "build&run" all the time, old files, which are not part of the final build, are still present on your device or in the simulator.
So clean the build folder, remove the app from your device, and try again. Also, check if you app can live without an internet connection.
Your best bet is to discuss this directly with the Apple guys (Resolution Center).

iPhone Project Not Running (more than once)

I have an iPhone app that I'm trying to run on my phone via Xcode.
It installs and runs without an issue
I make a change in the source code (negligible, like an NSLog())
It installs without an issue
Running causes the error:
Error Starting Executable 'myApp'
Don't know how to run. Try "help target".
I uninstall the app, and reboot the phone
It installs and runs without an issue (until I make another change; then I have to repeat this dance)
Needless to say, having to uninstall the app, reboot the phone, and reinitialize the environment (i.e. set prefs) takes an unreasonable amount of time, and is probably indicative of a serious problem. The issue is, the only vague error message I receive gets me nowhere on Google. Where on earth could this issue be coming from?
With some help from #iphonedev, I figured it out. Turns out it's a glitch in iOS 5 beta. The way to fix it is to remove the device from Development Devices, then re-add it.
Yeah just restarting the iPhone with the lock and home buttons fixes this. Had it happen a few times to me

Registering Mobilink with Mobile Device Center on Vista has errors

I have a bat file that I am using to try and register Mobilink with the Mobile Device Center on Vista. (I am using version 11 of Mobilink)
Script:
mlasinst -k ./ -v ./
I have copied mlasinst as well as mlasdev.dll and mlasdesk.dll to the same folder and am running the above command to get the sychronization process to run.(I have tested the above script on Windows XP and it works). When I try to copy the same files to a Windows Vista machine, I run the script and restart the computer. I then follow the directions from Sybase's website namely I
"From the Windows Mobile Device Center window, click Mobile Device Settings and then click Change Content Settings.
Select MobiLink Clients and click Save to activate the provider.
To see a list of registered applications, click Change Content Settings, click MobiLink Clients, and then click Sync Settings. "
Everything works on Vista except for when I click on "Sync Settings" when I click on it I get an error saying that there are no settings to administer.
My question is how do you get Mobilink to work with Vista and its Mobile Device Center? I have read all of the documentation I can find but to no avail.
Juen 23rd Comment
For those following at home, as a result of this post, our QA Department was able to reproduce this problem with the Windows Mobile Device Center on Vista when using a Windows Mobile 6 device, and we're looking into it. Everything seems to work fine with a Windows Mobile 5 device, which we used for our initial testing.
June 19th Comment
I really wanted to leave a comment, since this isn't really an answer, but my repuation wasn't high enough to do so. Oh well, I'll post a poor answer and watch my reputation go down. It's the price I'm willing to pay. :)
Our QA group tests mlasinst with Windows Mobile Device Center, but you're obviously doing something different, or more likely your machine setup is slightly different. To get to the bottom of this, we'd likely need to look into what registry settings are changed as a result of mlasinst running, but before I spend too much time figuring out what's going on here (including figuring out what the proper questions to ask are), I should point out that I would recommend synchronizing using TCPIP or HTTP instead of using ActiveSync, if only to simplify the instalation process and to cut out an additional layer or communication between the ML Client and Server. I also see from a post that you made at news://forums.sybase.com/sybase.public.sqlanywhere.mobilink that you've been playing with synchronization using the .NET version of the dbmlsync API and synchronizing using TCPIP. I did respond to your posting on the newsgroup to explain what I believe is happening in your application.
Are you still interested in figuring out the issues with ActiveSync and WMDC, or are you happy with the solution you've implemented using the dbmlsync API and using TCPIP?

Error Installing iPhone App on Device

I set up all my certificates and keys today and am trying to run my project on my iPhone.
I'm encountering this strange error:
Your mobile device has encountered an unexpected error (0xE800003A) during the install phase: Verifying application
Poking around the Apple Developer forums, I've attempted to set new certificates and provisioning profiles as well as editing Info.plist, but no matter what I do I can't seem to run the app on my device.
The only think I can currently think of is that my project name in Xcode differs slightly from my development provisioning profile (it uses a question mark), but I've named it according to Apple's conventions: com.mycompany.myapp, so I'm unsure if that's the problem.
Any ideas?
Edit: I've hard restarted the phone, rebooted Xcode, cleaed my targets, set up a new wildcard App ID and respective provisioning profile and still nothing. Any other ideas?
It turned out that I had 2 certs in keychain that were simultaneously overwriting each other! I hope this helps people in the future.
You should create a wildcard app ID; com.mycompany.*. That may help.
I've encountered this on many occasions. What i do is clean all targets, shut down xcode, and hard reboot my phone.
This is a different error than the more common problem of getting the cert wrong...
Restore the phone (using the XCode Organizer to reload the latest OS), to be safe do not restore from backup when you sync with iTunes the first time (it'll still keep your number when you sync even if you don't use the backup). I've had to do this a very few times, the last one was when it was in the middle of deployment when I unhooked the phone from the cable (had to answer a call).
Try the reboot (of the phone) first, hooking it up with XCode off. But if that does not solve things, restore is the way.
The console tab in the XCode Organizer sometimes gives helpful hints as to what happens during the install phase. In one case my problem was my app already existing on the phone. I deleted my app and the install succeeded.
Regardless, it looks like a lot of error messages are bundled into this one cryptic message and to really diagnose what is going on, I found the Console tab very useful...
One other thing to try is reinstalling the iPhone SDK. I ran into an error like this when I first got my developer key and this was the only way around.
Just want to say to everyone, when you go to edit Targets-> be sure to set "configuration" in the top left corner to "All Configurations" or the correct config you are building for (Debug or Release). You might think you have things set correctly but it will be for the wrong configuration.
I've seen that error on a correctly provisioned device that has had success installing apps from XCode before, and I've had luck restarting the device and trying again. Maybe that will help.
Try running in Release mode instead of Debug. I have a working project with this problem. No idea what the issue was, but running it in Release mode works, but Debug mode produces the error code.
I have a support ticket open with Apple dev support for the same problem, and (FWIW) I'll post their recommendations if and when they can get my toolchain working.
Try this: (source: http://ephemera.lifewithalacrity.com/iphone_development/)
Even though this is supposedly only for Distribution builds, it helped me to be able to install my Debug version on my iPhone again, after it mysteriously broke yesterday.
"just triple check that all the code signing in your project properties are clear or default"
Note, this is the PROJECT properties as opposed to the TARGET properties. I set my Code Signing Provisioning Profile back to the default and removed the Code Signing Identity string.