Previews won't load and/or black background screen

Hi

I am experiencing many issues with the previews. Either i get this message in the previews

MessageSendFailure: Message send failure for <ServiceMessage 0: capabilities>

Or, I get a black background screen in the previews and in the simulator.

So Doctor, what's your verdict?

Thank you for your help.

Kind regards,

Michael

Forgot to mention, I deleted the Derived Data file, I rebooted Xcode, I rebooted my Macbook Pro. I haven't made it test gravity yet with a nearby window...!

Which version of Xcode are you using?

There was an issue with black previews and black windows in Storyboards, but they were later fixed.

If I were you, I'd delete Xcode and install the latest version.

If that doesn't work, there is a fix at the bottom of this thread.

Hey,

Thank you for your reply I'm using the latest version Xcode 14.0.1 I downloaded it this morning with the AppStore but it didn't work. I ended up using the Apple Developer Download section.

Hi,

Sorry to hear you are having problems getting previews working. This error can often indicate a crash in your application when it launches, or a problem with the simulator. If you look into the folder ~/Library/Logs/DiagnosticReports, do you see any crash reports for your app?

If not, the best next step will be to file a feedback with diagnostics so we can take a look. We will need the diagnostics Xcode Previews generates in order to make sure we understand the error the previews system is encountering.

If you are having issues with macOS, catalyst or on-device iOS previews then download and install the logging profile for your device. Instructions and profiles are available here: https://developer.apple.com/bug-reporting/profiles-and-logs/?name=swift

Attach the sysdiagnose to the bug report as well as the diagnostics using the instructions below.

Then when you get an error in Xcode Previews, an error banner appears in the canvas

  1. Click the “Diagnostics” button in that banner (or if the banner is missing you can use the menu: Editor > Canvas > Diagnostics)
  2. In the sheet that appears, click “Generate Report” in the bottom left of the sheet
  3. Attach (or make from the folder) the resulting zip file to the bug (will be named something like previews-diagnostics-0123456789.zip)

Hi,

Thank you for your feedback. I came to a point where, for now the preview works at 50% (the autorun, most of the time shows a black screen) but not the simulator, the black screen syndrome is dominant. I have been on many forums and discovered that there are a lot of users encountering this issue. Any feedback on that from upstairs?

Thank you so your time.

Looking forward to hearing from you.

Kind regards

Michael

Previews won't load and/or black background screen
 
 
Q