Since I started working Xcode 8.2 (and 8.3 lately), playgrounds are completely broken for me.
When opening a playground I see the message "Failed to launch process. Error returned in reply: Connection Interrupted"
Complete re-installation of Xcode or removing / re-creating /private/tmp folder (as suggested by some other posts) did not help.
Did someone encounter a similar problem? Are there other known work-arounds?
(http://www.openradar.me/31296836)
Here is some sample output from CoreSimulator.log
Mar 28 16:19:30 sergey-macbook com.apple.dt.Xcode[6955] <Error>: Error Domain=NSPOSIXErrorDomain Code=53 "Software caused connection abort" UserInfo={NSLocalizedDescription=Error returned in reply: Connection interrupted}
Mar 28 16:19:30 sergey-macbook com.apple.dt.Xcode[6955] <Error>: Error looking up host support port: Error Domain=NSPOSIXErrorDomain Code=53 "Software caused connection abort" UserInfo={NSLocalizedDescription=Error returned in reply: Connection interrupted}
Mar 28 16:19:30 sergey-macbook com.apple.dt.Xcode[6955] <Error>: Error Domain=NSPOSIXErrorDomain Code=53 "Software caused connection abort" UserInfo={NSLocalizedDescription=Error returned in reply: Connection interrupted}
Mar 28 16:19:30 sergey-macbook com.apple.dt.Xcode[6955] <Error>: Error looking up host support port: Error Domain=NSPOSIXErrorDomain Code=53 "Software caused connection abort" UserInfo={NSLocalizedDescription=Error returned in reply: Connection interrupted}
Mar 28 16:19:30 sergey-macbook com.apple.dt.Xcode[6955] <Error>: Error Domain=NSPOSIXErrorDomain Code=53 "Software caused connection abort" UserInfo={NSLocalizedDescription=Error returned in reply: Connection interrupted}
Mar 28 16:19:30 sergey-macbook com.apple.dt.Xcode[6955] <Error>: Error looking up host support port: Error Domain=NSPOSIXErrorDomain Code=53 "Software caused connection abort" UserInfo={NSLocalizedDescription=Error returned in reply: Connection interrupted}
Mar 28 16:19:40 sergey-macbook CoreSimulatorService[5859] <Error>: Error Domain=com.apple.CoreSimulator.SimError Code=163 "Unable to lookup in current state: Shutting Down" UserInfo={NSLocalizedDescription=Unable to lookup in current state: Shutting Down}
Mar 28 16:19:40 sergey-macbook CoreSimulatorService[5859] <Error>: Error from finding pasteboard support port, Error Domain=com.apple.CoreSimulator.SimError Code=163 "Unable to lookup in current state: Shutting Down" UserInfo={NSLocalizedDescription=Unable to lookup in current state: Shutting Down}
Mar 28 16:19:40 sergey-macbook CoreSimulatorService[5859] <Error>: Error Domain=com.apple.CoreSimulator.SimError Code=163 "Unable to lookup in current state: Shutting Down" UserInfo={NSLocalizedDescription=Unable to lookup in current state: Shutting Down}
Mar 28 16:19:40 sergey-macbook CoreSimulatorService[5859] <Error>: Error Domain=com.apple.CoreSimulator.SimError Code=163 "Unable to lookup in current state: Shutting Down" UserInfo={NSLocalizedDescription=Unable to lookup in current state: Shutting Down}
Mar 28 16:19:40 sergey-macbook com.apple.dt.Xcode[6955] <Error>: Error Domain=NSPOSIXErrorDomain Code=53 "Software caused connection abort" UserInfo={NSLocalizedDescription=Error returned in reply: Connection interrupted}
Mar 28 16:19:40 sergey-macbook com.apple.dt.Xcode[6955] <Error>: Error from finding pasteboard support port, Error Domain=NSPOSIXErrorDomain Code=53 "Software caused connection abort" UserInfo={NSLocalizedDescription=Error returned in reply: Connection interrupted}
Note by the creator of Timing: this issue no longer occurs as of Timing 1.8.1 and Timing 2.0.
iOS playgrounds work ok in Xcode 8.3.x on my MacBook, but I got the launching simulator errors on my MBP. The MacBook is for travelling, so has a minimal set of apps. In particular, it has fewer app icons in the status menu bar.
So on my MBP, I quit all of those that aren't on the MB, and hey presto, playgrounds ran! I started the apps one by one, and it was Timing that brought back the launching simulator error — closing the menu bar icon fixed it again, even though Timing app itself was still running.
Not picking on Timing especially; could be any quick-access app in your menu bar.
Before this, I had reinstalled Sierra, but not a clean install. That would've been the next step.
workaround provided by an engineer at apple
run below command in terminal after quitting Xcode
defaults write com.apple.dt.xcode IDEPlaygroundDisableSimulatorAlternateFramebuffer -bool YES
Have you tried deleting your derived data via XCode?
Shift+Alt+Command+K
OR the fastest way is open terminal and past the following:
rm -rf ~/Library/Developer/Xcode/DerivedData
Also ensure that there are no simulators or other versions of a playground running in the background.
(Unfortunately) I solved the problem by clean installing macOS (which is not the proper way of solving it, of course, but I needed to get playgrounds to work ASAP).
tl;dr My problems went away after checking if all simulators were installed (in Xcode Settings > Components), closing all projects which were heavily using IBDesignable and restarting the playground.
I don't know if this helps in any way but might as well post it;
The first thing I checked was if I had all iOS simulators installed in Xcode. Surprisingly updating to Xcode 8.3 also removed my iOS 10.0 simulator; reinstalled the simulator and reopened Xcode.
Afterwards did a search on google and found a similar question.
After reading the question I remembered I had an other project open in which I was heavily using IBDesignable for testing purposes. Closing this project and restarting the playground solved my problems.
This might have had nothing to do with the playgrounds, but it did fixed my problems.
Related
In order to save some of the precious 256GB of disk space on the internal drive of my (M1, 2020) MacBook Pro (MYD82LL/A) I ran the following commands in my macOS Terminal after installing Xcode in order to move all the space-hogging components to a 2TB external drive that I named "Developer" when I formatted it:
sudo mv /Applications/Xcode.app /Volumes/Developer/Applications/Xcode.app && sudo ln -s /Volumes/Developer/Applications/Xcode.app /Applications/Xcode.app
sudo mv ~/Library/Developer/CoreSimulator /Volumes/Developer/CoreSimulator && ln -s /Volumes/Developer/CoreSimulator ~/Library/Developer/CoreSimulator && sudo chown -R $USER:staff /Volumes/Developer/CoreSimulator
Despite making absolutely certain to ensure that the CoreSimulator folder has the correct ownership and permissions (hence sudo chown -R $USER:staff /Volumes/Developer/CoreSimulator above), I'm still getting this error on attempt to simulate a device (image downscaled because the 2880x1800 Retina resolution pushes the file size of the screenshot past 2MB):
Making this even more strange, I attempted this from Xcode while also running tail -f ~/Library/Logs/CoreSimulator/CoreSimulator.log in a separate terminal window. The resulting real-time log information seems to defy logic in light of the fact that I made sure (via chown) that I already had write access to the moved directory:
May 3 13:27:12 realkstrawn93-m1mbp CoreSimulatorService[2890] <Warning>: Device BC4197AA-A5E9-4611-98B3-4C96B2CCD460 encountered in creation state at launch. The device will be re-created.
May 3 13:27:12 realkstrawn93-m1mbp CoreSimulatorService[2890] <Error>: Error copying sample content to path /Volumes/Developer/CoreSimulator/Devices/BC4197AA-A5E9-4611-98B3-4C96B2CCD460/data : Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “BC4197AA-A5E9-4611-98B3-4C96B2CCD460” in the folder “Devices”." UserInfo={NSFilePath=/Volumes/Developer/CoreSimulator/Devices/BC4197AA-A5E9-4611-98B3-4C96B2CCD460, NSUnderlyingError=0x6000000000c0 {Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted"}}
May 3 13:27:12 realkstrawn93-m1mbp CoreSimulatorService[2890] <Error>: Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “BC4197AA-A5E9-4611-98B3-4C96B2CCD460” in the folder “Devices”." UserInfo={NSFilePath=/Volumes/Developer/CoreSimulator/Devices/BC4197AA-A5E9-4611-98B3-4C96B2CCD460, NSUnderlyingError=0x6000000000c0 {Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted"}}
May 3 13:27:12 realkstrawn93-m1mbp CoreSimulatorService[2890] <Error>: Failed to re-create device that was encountered in the creation state (realkstrawn93-ip13sim (BC4197AA-A5E9-4611-98B3-4C96B2CCD460, iOS 15.4, Creating)): Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “BC4197AA-A5E9-4611-98B3-4C96B2CCD460” in the folder “Devices”." UserInfo={NSFilePath=/Volumes/Developer/CoreSimulator/Devices/BC4197AA-A5E9-4611-98B3-4C96B2CCD460, NSUnderlyingError=0x6000000000c0 {Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted"}}
May 3 13:27:12 realkstrawn93-m1mbp CoreSimulatorService[2890] <Error>: New device is stuck in creation state, deleting: realkstrawn93-ip13sim (BC4197AA-A5E9-4611-98B3-4C96B2CCD460, iOS 15.4, Creating)
May 3 13:27:12 realkstrawn93-m1mbp CoreSimulatorService[2890] <Error>: Error Domain=NSPOSIXErrorDomain Code=22 "Invalid argument" UserInfo={NSLocalizedFailureReason=Device was allocated but was stuck in creation state. Check CoreSimulator.log for more information.}
May 3 13:27:12 realkstrawn93-m1mbp CoreSimulatorService[2890] <Error>: Error Domain=NSPOSIXErrorDomain Code=22 "Invalid argument" UserInfo={NSLocalizedFailureReason=Device was allocated but was stuck in creation state. Check CoreSimulator.log for more information.}
May 3 13:27:12 realkstrawn93-m1mbp com.apple.dt.Xcode[24690] <Error>: ERROR creating device: Error Domain=NSPOSIXErrorDomain Code=22 "Invalid argument" UserInfo={NSLocalizedFailureReason=Device was allocated but was stuck in creation state. Check CoreSimulator.log for more information.}
May 3 13:27:12 realkstrawn93-m1mbp com.apple.dt.Xcode[24690] <Error>: Error Domain=NSPOSIXErrorDomain Code=22 "Invalid argument" UserInfo={NSLocalizedFailureReason=Device was allocated but was stuck in creation state. Check CoreSimulator.log for more information.}
Note the various "You don't have permission to save the file" errors despite having already used chown -R after the directory move to attempt to rectify any permissions issues that may arise from such. So what else could possibly be wrong here?
I was able to find a workaround for this with the help of this answer
https://stackoverflow.com/a/58304540
The problem is that CoreSimulatorService needs full disk access to create files on a separate drive. To grant access you need to drag and drop com.apple.CoreSimulator.CoreSimulatorService.xpc into the apps area of Security & Privacy > Privacy > Full Disk Access in System Preferences. You can't use the + icon because .xpc files will be grayed out.
For me, this was the path to the xpc file:
/Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/A/XPCServices/com.apple.CoreSimulator.CoreSimulatorService.xpc
I met a similar issue, and I solved like below: About this Mac > Storage > Manage > Developer and Open the screen, delete all cache, then it should work well.
Ended up simply moving all the simulator stuff back onto my local drive anyway and the problem disappeared. Not sure why Xcode complains when the simulators aren’t on the system drive though.
I've begun testing my iOS app on my iPhone. Everything works great for a week or so and then my app starts to crash immediately when I try to open it. When I check the logs for my phone (Window-Devices-Select my iPhone), I see the following log messages.
<Notice>: Submitted job with label: UIKitApplication:com.app.App-Name[0x9fed][63]
<Notice>: /private/var/containers/Bundle/Application/64152E86-B292-47E5-A12D-27E5E23CACFF/App-Name.app/App-Name not valid: 0xe8008015: A valid provisioning profile for this executable was not found.
<Error>: Unable to obtain a task name port right for pid 14847: (os/kern) failure (0x5)
May 29 08:46:13 iPhone assertiond[63] <Notice>: Failed to start job
with error Error Domain=NSPOSIXErrorDomain Code=3 "No such process"
UserInfo={NSLocalizedRecoverySuggestion=Consult
/var/log/com.apple.xpc.launchd/launchd.log for more information,
NSLocalizedDescription=Unable to get valid task name port right for pid
14847, NSLocalizedFailureReason=The process failed to exec}
<Notice>: Deleted job with label: UIKitApplication:com.app.App-
Name[0x9fed][63]
<Notice>: [app.App-Name] Bootstrap failed with error: <NSError:
0x115657730; domain: BKSProcessErrorDomain; code: 1 (bootstrap-failed);
reason: "Failed to start job">
<Error>: Bootstrapping failed for <FBApplicationProcess: 0x11d2702a0;
com.app.App-Name; pid: -1> with error: Error
Domain=BKSProcessErrorDomain Code=1 "Unable to bootstrap process with
bundleID com.app.App-Name" UserInfo={BKSProcessExitReason=0,
NSLocalizedFailureReason=Failed to start job,
NSUnderlyingError=0x11fa53590 {Error Domain=NSPOSIXErrorDomain Code=3
"No such process" UserInfo={NSLocalizedFailureReason=The process failed
to exec, NSLocalizedRecoverySuggestion=Consult
/var/log/com.apple.xpc.launchd/launchd.log for more information,
NSLocalizedDescription=Unable to get valid task name port right for pid
14847}}, BSErrorCodeDescription=bootstrap-failed,
NSLocalizedDescription=Unable to bootstrap process with bundleID
com.app.App-Name}
<Notice>: <FBApplicationProcess: 0x11d2702a0; com.app.App-Name; pid: -1> exited.
<Notice>: SystemUI unknown identifier: 'com.app.App-Name'
<Notice>: Process exited: <FBApplicationProcess: 0x11d2702a0; com.app.App-Name; pid: -1> -> <FBApplicationProcessExitContext: 0x176235aa0; exitReason: (none); terminationReason: (none)>
I've googled for these error logs to try and find a solution, but no luck.
Any help would be much appreciated.
I had the same situation with an app which Bundle Identifier has been moved to another Apple Developer Team.
After Bundle Identifier was moved, a previous build was containing a provisioning profile which was no longer valid, and I got this error message in logs.
I guess the same happens if you delete the Provisioning Profile or if it is invalidated for whatever reason.
Almost every time I try to run my SiriKit Extension, I get "Sorry, you'll need to continue in the app" along with "Could not attach to pid : '####'" on Xcode. I have Siri capability enabled. Weirdly, 1 out of 10 times when I clean and rebuild, the extension works. Does anyone know how to deal with this?
Edit:
In console.app I'm getting this:
Aug 15 11:43:43 iPhone assistantd(PlugInKit)[12442] <Info>: preparing plug-in <private>(<private>)
Aug 15 11:43:43 iPhone assistantd(PlugInKit)[12442] <Notice>: connection to plug-in <private>(0DDA43D4-A588-4478-8405-C219EAA7F591) lost
Aug 15 11:43:43 iPhone assistantd(PlugInKit)[12442] <Error>: Hub connection error Error Domain=NSCocoaErrorDomain Code=4097 "connection to service named com.appID.SiriKitExtension" UserInfo={NSDebugDescription=connection to service named com.appID.SiriKitExtension}
Aug 15 11:43:43 iPhone assistantd(PlugInKit)[12442] <Info>: beginUsing of 0DDA43D4-A588-4478-8405-C219EAA7F591 concludes with error=Error Domain=NSCocoaErrorDomain Code=4097 "connection to service named com.appID.SiriKitExtension" UserInfo={NSDebugDescription=connection to service named com.appID.SiriKitExtension}
Aug 15 11:43:43 iPhone assistantd(Foundation)[12442] <Notice>: PlugInKit error in beginUsing:
Aug 15 11:43:43 iPhone assistantd[12442] <Error>: __52-[ADExtensionService handleCommand:forDomain:reply:]_block_invoke_2.154 Error with extension request Error Domain=NSCocoaErrorDomain Code=4097 "connection to service named com.appID.SiriKitExtension" UserInfo={NSDebugDescription=connection to service named com.appID.SiriKitExtension}
Aug 15 11:43:43 iPhone assistantd(Foundation)[12442] <Notice>: killing invalid plugIn
Aug 15 11:43:43 iPhone assistantd[12442] <Error>: -[ADCommandCenter _handleServiceReply:error:forCommand:] Handling service error Error Domain=kAFAssistantErrorDomain Code=1301 "(null)" UserInfo={NSUnderlyingError=0x1005d1eb0 {Error Domain=NSCocoaErrorDomain Code=4097 "connection to service named com.appID.SiriKitExtension" UserInfo={NSDebugDescription=connection to service named com.appID.SiriKitExtension}}} for command <private>
Fixed the problem after weeks of debugging.
My problem was that SiriKit was running on armv7 architecture. Changing it to arm64 or the default setting of armv7 + arm64 will fix this problem.
I hope this helps someone!
I've dug into several threads (here, here, and here to name a few) but I just cannot figure this out. I've cleared cache, reset the simulator, tripled checked .plist files, cloned my repo again, and even reinstalled Xcode.
And here's the rub - the same repo works on my other machine. Here is log error:
Oct 8 09:51:09 CoreSimulatorService[1941] <Error>: Could not register service com.apple.coreservices.lsuseractivity.simulatorsupport: Failed to lookup com.apple.coreservices.lsuseractivity.simulatorsupport: 0x44e
Oct 8 09:51:11 com.apple.dt.Xcode[1927] <Error>: Error Domain=LaunchServicesError Code=0 "(null)" UserInfo={Error=ExecutableTwiddleFailed, ErrorDescription=Failed to chmod file:///Users/Jason/Library/Developer/CoreSimulator/Devices/0593D533-2974-4464-937C-B77EC0299078/data/Library/Caches/com.apple.containermanagerd/Temp/Bundle/Application/FA2B923A-1015-43E5-BA59-716BBD114A3D/Test.app/PlugIns/TestActionExtension.appex/TestActionExtension : No such file or directory}
I also tried clearing the cache where it's looking for the extension that's giving me issues.
I am trying to use Xcode 6.2 to install a development build of an iOS app onto my iPod touch (running iOS 8.2).
The installation keeps failing with the message
App instalation failed
The packet is unknown.
The console reports the following details:
Mar 27 12:53:52 iPod-touch com.apple.StreamingUnzipService[164] <Warning>: -[StreamingUnzipState finishStream]:476: Finishing an incomplete stream! This stream will not be resumable.
Mar 27 12:53:52 iPod-touch streaming_zip_conduit[163] <Warning>: __dispatch_source_read_socket_block_invoke_2:171: Failed to finish extraction: Error Domain=SZExtractorErrorDomain Code=3 "Finishing an incomplete stream! This stream will not be resumable." UserInfo=0x17e33b50 {SZExtractorFunctionNameErrorKey=-[StreamingUnzipState finishStream], SZExtractorSourceFileLineErrorKey=476, NSLocalizedDescription=Finishing an incomplete stream! This stream will not be resumable.}
Mar 27 12:53:52 iPod-touch streaming_zip_conduit[163] <Warning>: secure_send_message:105: Got error 1 from lockdown_send_message
Mar 27 12:53:52 iPod-touch streaming_zip_conduit[163] <Warning>: secure_send_error:137: Could not send error response to host
These messages seem to imply that the IPA file is somehow corrupted, and can't be extracted, but I had no problem unziping the IPA with Archive Utility on my Mac.
I also already ran codesign -dvvv on Payload/<my-app-name>.app and don't see any obvious problems with the certificate used to sign the app.
What does this error message indicate, and how can the issue be resolved?
note:
I already found this similar question but the only current answer does not help me. Since I have some, possibly relevant, details that may not apply to the previous question, I am asking a new question.
So I was getting this exact error and I tried switching USB ports (from the device plugged into the USB port on my keyboard to the USB port on my laptop) and now it works.