launching app fails in instruments - ios-ui-automation

I am using OS 10.10.3 and tried to run instruments 6.1/6.2/6.3 and launch different debug apps.
All launched and crashed after 2 seconds.
I tried restarting my computer and the device and it didn't help.

I fixed it by deleting all versions of Xcode from my computer and another thing, if you are using Xcode-beta then you need to change the path from /Applications/Xcode.app to /Applications/Xcode-beta.app
using sudo xcode-select --switch /Applications/Xcode-beta.app

Related

x2go issue with XFCE and Ubuntu 20.04

When I connect x2go with XFCE Ubuntu 20.04 (KVM VM) after ~10 minutes of idle time, x2go will lose its mouse focus and keyboard focus and there is no way to grab control of the session. Even restarting x2go will not bring the focus back.
The XFCE VM is still running because I can see the top output in the console.
I tried several key combinations to bring the focus back but it does not. I tried LXDE and it does not have this issue. I tried XFCE desktop 20.04 on its running in a KVM VM. I also tried installing Ubuntu server 20.04 and load Xubuntu-desktop (KVM VM) - the same issue. After ~10 minutes the x2go session-focus is lost.
What brings the session focus back is if I reboot the VM and then connect to the VM again using x2go. as I mentioned just restarting x2go will not bring the session focus back.
I tried uninstalling the screensaver and the power management features in XFCE but that did not fix this issue.
Update: this x2go bug report log suggests its screensaver related. Using the applications/settings/screensaver allowed me to turn off anything related to the screensaver, solving the problem for me. Issue appears to be solved here similarly: askubuntu forum
I've been having the same issue w/ XFCE and LXDE both after an idle period (10-15 minutes), and only on Ubuntu 20.04, not on 18.04 or earlier. In either desktop env, the session was not recoverable and required termination of the session either from the client side or via a separate terminal ssh session to kill <PID> the x2gocleansessio process on the server side (after seeing it was running using top). For a short period, I regained control in the new session until the cycle recurred.
Seems like a major problem for x2go in Ubuntu 20.04.
Just to save everyone the time of digging through the AskUbuntu forum... run this + restart and you should be good to go on Ubuntu 20.04 -
sudo apt-get remove xfce4-screensaver
If your are login via x2go and don't want to uninstall xfce4-screensaver, it's hard to solve the problem because there are intern script of xfce who launch xfce4-screensaver whatever you told him to do. I found my own workaround WITHOUT root privilege:
First activate screensaver on start-up :settings-manager -> Session and Startup->check screensaver(that sound weird but by this way you are sure to launch your xfce4-screensaver localy otherwise it's the root user who launch it which this own startup file which you can't edit without root)
Second : in ~/.config/autostart/xfce4-screensaver.desktop (if it doesn't exist uncheck then check screensaver in first step). Add to the end of this file:
Exec=sh -c "kill $(pgrep -u <YOUR-USERNAME> screen)"
This will launch it but auto-kill it after OnLogin
Edit: it's better than uninstall it because in my case that was the administrator that install for every user xfce4-screensaver so I can't uninstall it because the computer need a screensaver on the real sessions (I mean not in ssh on the physique machine). Maybe switch to Xscreensaver or other screensaver will solve this problem

Gitk Yields Blank Unresponsive Gui on OSX Mojave

I recently upgraded to Mojave and now gitk no longer works. When I try to launch gitk I get a blank, unresponsive Wish gui. I suspect it has to do with Mojave's new security requirements on Apple Events but I didn't receive a prompt to grant permissions and I'm not sure how to grant those permissions. Any ideas how to get gitk working again?
I am running macOS 10.14.4. I have git installed via brew and is version 2.21.0
When I launch gitk I don't get any error messages, just a blank gui that is not responsive.

Ubuntu on WSL doesn't launch

I have installed Ubuntu 18.04 for windows subsystem for linux on windows 10, after enabling WSL in Powershell (instructions here: https://learn.microsoft.com/en-us/windows/wsl/install-win10).
I've done this before on a desktop but now I'm doing it on a laptop. I had no issues with the previous installation but this time around ubuntu will not launch. I get the ubuntu console popping up briefly before disappearing.
Also trying to run bash.exe from the command line fails silently (doesn't hang, just exits with no message), which may be related.
I'm struggling to figure this out as I have no idea where any error messages might be logged. Does anyone know how I can investigate further why this is happening?
Setup is a windows 10 Pro, os build 17134.376, everything up to date.
I'm struggling to figure this out as I have no idea where any error messages might be logged. Does anyone know how I can investigate further why this is happening?
Check with wslconfig.exe /l all registered distros, try to deregister the one you have problem with ( e.g. wslconfig.exe /u Ubuntu [^1]) and run the ubuntu.exe in your distro once again. Just a wild guess, it might be also a problem, if you have more than one copy of the linux distribution in you home directory.
[^1]: Warning: deregistering will delete all the associated files!

Timeout when running xcodebuild tests under Xcode 6 via SSH

I seem to be having issues with integrating Xcode6 with jenkins, I currently have this setup and working with Xcode 5.
With xcode 6 running remotely via SSH the simulator time-out, when I run locally it succeeds.
Command
xcodebuild -workspace PROJECTNAME.xcworkspace -scheme BGO_Tests -destination 'platform=iOS Simulator,name=iPhone 5s' -derivedDataPath ./Build clean test
2014-08-19 10:46:36.591 xcodebuild[33966:381f] iPhoneSimulator: Timed out waiting 120 seconds for >simulator to boot, current state is 1.
Testing failed:
Test target BGO_Tests encountered an error (Timed out waiting 120 seconds for simulator to boot, current state is 1
Tested with recent Xcode 6 beta 6
Note: the device names changed in Xcode 7, so you no longer specify them using iPhone 5 (9.1 Simulator) but rather iPhone 5 (9.1).
Use xcrun instruments -s to get the current list of devices and then you can pre-launch it using:
xcrun instruments -w "iPhone 5 (9.1)" || echo "(Pre)Launched the simulator."
Prelaunching
I got to a point where what I proposed down there wasn't working anymore. In addition to making the changes mentioned here, you need to launch the simulator xcodebuild is expecting BEFORE xcodebuild is ran:
# First get the UDID you need
xcrun instruments -s
# Then launch it
open -a "iOS Simulator" --args -CurrentDeviceUDID <sim device UDID>
# and wait some time....
sleep 5
# Then launch your unit tests
xcodebuild [...] -destination 'platform=iOS Simulator,name=<device name matching the UDID>'
Old post
This bug is fixed in Xcode 6.3 and above. If you are experiencing similar problems in newer Xcode, it's likely another bug.
Apple follow up regarding Bug ID# 18001199:
The context provided by LaunchDaemons is not supported for running GUI
applications. The SSH service, and the default setup for Jenkins, are
both implemented as LaunchDaemons. In earlier versions of Xcode 5
xcodebuild could run tests on the iOS simulator in this context, but
that was never a supported configuration, and as you have noted that
is no longer working as of Xcode 6.
Unlike LaunchDaemons, LaunchAgents provide a context where you can run
GUI applications - if the user is logged in at the time, with a window
server / Aqua session. Converting your Jenkins configuration from
being a LaunchDaemon to being a LaunchAgent would avoid the reported
issue. You can also use launchd for running tests on the iOS simulator
from a SSH session, either by crafting a LaunchAgent and manually
loading / starting that, or by using "launchctl submit”.
Ok, after some more digging around the comments around here (many thanks to Opal), I found out that launching the slave via JNLP instead works.
As many people mentioned, it is not currently possible to run the unit test over SSH, so you might want to turn towards the JNLP agent for now until Apple fixes it.
If connecting with JNLP still does not solve it, try the solution mentioned in this comment.
i.e.: Run these on command line:
DevToolsSecurity -enable
sudo dscl . -append /Groups/_developer GroupMembership "user-that-runs-the-sim"
security authorizationdb write system.privilege.taskport is-developer
See References here and here.
I've recently found out that if you install a new version of Xcode and do not launch it. The simulator might start timing out again. To solve this, I've had to manually launch Xcode, and install the additional tools it requested.
I ended up solving this on Xcode 5 by doing the steps here, essentially running:
sudo security authorizationdb write system.privilege.taskport allow
This will eliminate one class of these authentication popups. You’ll also need to run:
sudo DevToolsSecurity -enable
However, once I upgraded to Xcode 6, I now get an infinite hang when trying to run xcodebuild tests over SSH. They continue to run just fine as long as I'm logged into the console, and running them from the keyboard.
I ran into the same issue. My working theory is that SSH on OSX is started as a LaunchDaemon, and LaunchDaemons are not allowed to present a UI; Reference.
I was able to work around the issue by using Java Web Start to launch the Jenkins slave. I then installed the Jenkins slave as a launchd service.
Unfortunately the Jenkins slave then installs itself as a -you've guessed it- LaunchDaemon, leading to the exact same problem of not being able to launch the tests; Reference.
I worked around that issue by moving the Jenkins Slave LaunchDaemon plist and jar files in /System/Library/LaunchDaemons into ~/Library/LaunchAgents, and updated the paths inside the plist file.
That finally allowed me to run XCode6 (Beta6) tests on an OSX jenkins slave.
I finally managed to find a good simple solution. JNLP was causing numerous issues with our jenkins server.
Workaround for SSH timeout via https://corner.squareup.com/2015/07/ios-build-infrastructure.html
"Mavericks (10.9) and Yosemite (10.10) determine if a process can access accessibility hooks via the parentage of the accessing process. By putting launchd in the list of allowed processes, processes launched via SSH or Jenkins have access to the accessibility hooks across the system. To do this you can modify the TCC database, per this gist. A reboot is required to make the change take effect."
#!/bin/bash
# This will add lauchd to the list of allowed processes for accessibility access
sudo sqlite3 /Library/Application\ Support/com.apple.TCC/TCC.db "INSERT or REPLACE INTO access VALUES('kTCCServiceAccessibility','/sbin/launchd',1,1,1,NULL)"
# This outputs the rows in the TCC database
sudo sqlite3 /Library/Application\ Support/com.apple.TCC/TCC.db 'select * from access'
echo "Restart is required for these changes to take effect"
Update 8/02/2016
This is now fixed in Xcode 7.2.1 ("Command line tool ‘xcodebuild test’ will no longer time out waiting for Simulator.app to launch")
I've seen this error before, one possibility is that since you probably downloaded the Xcode6 Beta from the internet (not the appstore as its not available yet), the machine you are trying to run it on will show a pop up asking you if you really want to open this app as its from the internet.
The same will happen when xcodebuild tries to launch the iPhone simulator app.
One thing you might want to try is to share screen with the machine and click "Open" in that pop up.
If that still doesn't work, I would try to:
Reset the Content & Settings of the simulator
Reboot the machine and make sure no simulator is running on start up (you can just choose not to re-open any app when restarting)

Xcode 4.0.2 not launching after install

I installed the Xcode Snow Leopard beta in my Developer folder, but I decided to re-intall Xcode 4.0.2. So I deleted the Developer folder, and ran the installer.
Now when I try to open Xcode it just bounces a few times in the Dock, but doesn't launch.
Do I need to delete some other files to get it working?
Go to terminal and run this:
$ sudo /Developer/Library/uninstall-devtools --mode=all
After that finishes running, delete the /Developer directory again and reboot your computer (you must reboot your computer). When it comes back, re-install Xcode and you should be fine.