skip to Main Content

Playground shows the error below and even after restart it is still not working. Any idea how to solve this?

Error: Failed to prepare for communication with playground for an unknown reason.

Xcode screenshot

7

Answers


  1. I had this exact same problem and couldn’t find an answer anywhere. I was using Xcode on my 2015 macbook pro and was on Big Sur. All I did was update my system to Monterey and updated xcode and now it doesn’t display that error message and I’m able to see the console output on the side panel. Hope it helps everyone with the same issue. Naughty problem to have when you’re just starting out with xcode dev.

    Login or Signup to reply.
  2. I fetched the file from the playground app and ran it.

    Login or Signup to reply.
  3. I solved it for myself by restarting Xcode. Opening the file again didn’t help, but restarting Xcode did…

    Login or Signup to reply.
  4. I did the following for it to work for me (XCode 13.2.1, Monterey):

    1. Went to Finder location for the playground
    2. Right clicked on the .playground and clicked "Show Package Contents"
    3. Selected the .workspace item in the package
    4. Ran the playground

    Worked fine thereafter!

    Login or Signup to reply.
  5. I did a combination of the two answers above and it to work for me (XCode 13.2.1, Monterey):

    1. Went to Finder location for the playground
    2. Right clicked on the .playground and clicked "Show Package Contents"
    3. Selected the .workspace item in the package
    4. Ran the playground

    I had the same error message.

    So I closed Xcode completely and reopened it. Then I repeated the same 4 steps above and it worked for me.

    Login or Signup to reply.
  6. Quit Xcode and then reopen it. Worked for me.

    Login or Signup to reply.
  7. By restarting Xcode 13.4, this question is fixed.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search