1

I have a big problem. Since two days Xcode only shows the Storyboards in black like shown below. As you can imagine it is terrible for me as i can not work with the background blacked out.

The error that is shown is "An internal error occurred. Editing functionality may be limited."

Below you can see the Log.txt with the error

    DATE:
=================================

Monday, 1. February 2021 at 21:43:26 Central European Standard Time
2021-02-01 20:43:26 +0000



=================================
    XCODE VERSION INFO:
=================================

Version = 12.4 (12D4e)
Plugin Version = 17701
Beta Version = 1
OS Version = 11.2 (20D64)



=================================
    ERROR:
=================================

Encountered an error communicating with IBAgent-iOS. (Failure reason: IBAgent-iOS (-1) failed to launch): Failed to launch IBAgent-iOS via CoreSimulator spawn (Failure reason: Failed to spawn IBAgent-iOS on iPhone Xʀ (0670D6F0-16E0-43A4-9E6E-D2B37DCD777D, iOS 14.4, Booted)): Invalid device state

Error Domain=com.apple.InterfaceBuilder Code=-1 "Encountered an error communicating with IBAgent-iOS." UserInfo={NSLocalizedFailureReason=IBAgent-iOS (-1) failed to launch, NSUnderlyingError=0x7f94b9b4a510 {Error Domain=com.apple.CoreSimulator.SimError Code=405 "Failed to launch IBAgent-iOS via CoreSimulator spawn" UserInfo={NSLocalizedFailureReason=Failed to spawn IBAgent-iOS on iPhone Xʀ (0670D6F0-16E0-43A4-9E6E-D2B37DCD777D, iOS 14.4, Booted), NSLocalizedDescription=Failed to launch IBAgent-iOS via CoreSimulator spawn, NSUnderlyingError=0x7f94b9b6f6f0 {Error Domain=com.apple.CoreSimulator.SimError Code=405 "Invalid device state" UserInfo={NSLocalizedDescription=Invalid device state}}}}, NSLocalizedRecoverySuggestion=Please check Console.app for crash reports for "IBAgent-iOS" for further information., NSLocalizedDescription=Encountered an error communicating with IBAgent-iOS.}



=================================
    TOOL DESCRIPTION:
=================================

<IBCocoaTouchPlatformToolDescription: 0x7f94af942a40> {
| targetRuntime.identifier: IBCocoaTouchFramework-fourteenAndLater
| _roleString: System content
| deviceTypeDescription: <IBSimulatorDeviceTypeDescription: 0x7f94aef53f60> deviceType=com.apple.CoreSimulator.SimDeviceType.iPhone-XR
}



=================================
    LAUNCH CONTEXT:
=================================

<IBCocoaTouchToolLaunchContext: 0x7f9519cb45c0> {
| toolDescription.ib_verboseDescription: <IBCocoaTouchPlatformToolDescription: 0x7f94af942a40> {
| | targetRuntime.identifier: IBCocoaTouchFramework-fourteenAndLater
| | _roleString: System content
| | deviceTypeDescription: <IBSimulatorDeviceTypeDescription: 0x7f94aef53f60> deviceType=com.apple.CoreSimulator.SimDeviceType.iPhone-XR
| }
| launchPath: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Overlays/IBAgent-iOS
| frameworkSearchPaths: (
    "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks"
)
| toolName: IBAgent-iOS
| platformName: iphonesimulator
| applicationTool: 0
| processIdentifier: -1
| exitStatus: (null)
| signalStatus: (null)
}



=================================
    EXECUTION CONTEXT:
=================================

<IBSimulatorToolCoreSimulatorBootedCLIExecutionContext: 0x7f94aafaa880 busyCount=0, Idle for 0.0 secs> {
| device: iPhone Xʀ (0670D6F0-16E0-43A4-9E6E-D2B37DCD777D, iOS 14.4, Booted)
}



=================================
    DEVICE:
=================================

iPhone Xʀ (0670D6F0-16E0-43A4-9E6E-D2B37DCD777D, iOS 14.4, Booted)



=================================
    TOOL MANAGER:
=================================

<IBCocoaTouchToolManager: 0x7f94aef33af0>



=================================
    REASON FOR REQUESTING TOOL:
=================================

Preflighting tools for opening document <IBStoryboardDocument: 0x7f94bb9ffa00>: <IBCocoaTouchTargetRuntime: 0x7f94aef42bd0>



=================================
    XCODE BACKTRACE:
=================================

  0   +[IBPlatformToolFailureHandler failureHandlerWithContext:failure:diagnosticsHandlerBlock:] (in IDEInterfaceBuilderKit)
  1   +[IBAbstractInterfaceBuilderPlatformToolManager _THREADSAFE_injectDiagnosticsHandlerWithFailureContext:intoError:forLaunchingToolWithError:] (in IDEInterfaceBuilderKit)
  2   +[IBAbstractInterfaceBuilderPlatformToolManager _THREADSAFE_launchNewToolWithLaunchContext:executionContext:toolProxyClass:proxyDelegate:failureContext:requestingMethod:error:forReason:] (in IDEInterfaceBuilderKit)
  3   __117-[IBAbstractInterfaceBuilderPlatformToolManager asyncLaunchNewToolWithDescription:queue:completionHandler:forReason:]_block_invoke.429 (in IDEInterfaceBuilderKit)
  4   _dispatch_call_block_and_release (in libdispatch.dylib)
  5   _dispatch_client_callout (in libdispatch.dylib)
  6   _dispatch_lane_serial_drain (in libdispatch.dylib)
  7   _dispatch_lane_invoke (in libdispatch.dylib)
  8   _dispatch_workloop_worker_thread (in libdispatch.dylib)
  9   _pthread_wqthread (in libsystem_pthread.dylib)
 10   start_wqthread (in libsystem_pthread.dylib)




=================================
    SDKS:
=================================

iOS 14.4 (iphoneos14.4):
version = 14.4
platform = com.apple.platform.iphoneos
versionInfo = {
    BuildID = "34AA5D88-518E-11EB-91C4-72143A615026";
    ProductBuildVersion = 18D46;
    ProductCopyright = "1983-2021 Apple Inc.";
    ProductName = "iPhone OS";
    ProductVersion = "14.4";
}

macOS 11.1 (macosx11.1):
version = 11.1
platform = com.apple.platform.macosx
versionInfo = {
    ProductBuildVersion = 20C63;
    ProductCopyright = "1983-2020 Apple Inc.";
    ProductName = macOS;
    ProductUserVisibleVersion = "11.1";
    ProductVersion = "11.1";
    iOSSupportVersion = "14.3";
}

Simulator - iOS 14.4 (iphonesimulator14.4):
version = 14.4
platform = com.apple.platform.iphonesimulator
versionInfo = {
    BuildID = "34AA5D88-518E-11EB-91C4-72143A615026";
    ProductBuildVersion = 18D46;
    ProductCopyright = "1983-2021 Apple Inc.";
    ProductName = "iPhone OS";
    ProductVersion = "14.4";
}

Simulator - watchOS 7.2 (watchsimulator7.2):
version = 7.2
platform = com.apple.platform.watchsimulator
versionInfo = {
    BuildID = "8D9D1CD2-32F3-11EB-B18E-209C67F7BDAB";
    ProductBuildVersion = 18S561;
    ProductCopyright = "1983-2020 Apple Inc.";
    ProductName = "Watch OS";
    ProductVersion = "7.2";
}

watchOS 7.2 (watchos7.2):
version = 7.2
platform = com.apple.platform.watchos
versionInfo = {
    BuildID = "8D9D1CD2-32F3-11EB-B18E-209C67F7BDAB";
    ProductBuildVersion = 18S561;
    ProductCopyright = "1983-2020 Apple Inc.";
    ProductName = "Watch OS";
    ProductVersion = "7.2";
}

Simulator - iOS 14.4 (iphonesimulator14.4):
version = 14.4
platform = com.apple.platform.iphonesimulator
versionInfo = {
    BuildID = "34AA5D88-518E-11EB-91C4-72143A615026";
    ProductBuildVersion = 18D46;
    ProductCopyright = "1983-2021 Apple Inc.";
    ProductName = "iPhone OS";
    ProductVersion = "14.4";
}

tvOS 14.3 (appletvos14.3):
version = 14.3
platform = com.apple.platform.appletvos
versionInfo = {
    BuildID = "E3F85AF8-32C4-11EB-9F1B-1F54C5D7F887";
    ProductBuildVersion = 18K559;
    ProductCopyright = "1983-2020 Apple Inc.";
    ProductName = "Apple TVOS";
    ProductVersion = "14.3";
}

tvOS 14.3 (appletvos14.3):
version = 14.3
platform = com.apple.platform.appletvos
versionInfo = {
    BuildID = "E3F85AF8-32C4-11EB-9F1B-1F54C5D7F887";
    ProductBuildVersion = 18K559;
    ProductCopyright = "1983-2020 Apple Inc.";
    ProductName = "Apple TVOS";
    ProductVersion = "14.3";
}

Simulator - watchOS 7.2 (watchsimulator7.2):
version = 7.2
platform = com.apple.platform.watchsimulator
versionInfo = {
    BuildID = "8D9D1CD2-32F3-11EB-B18E-209C67F7BDAB";
    ProductBuildVersion = 18S561;
    ProductCopyright = "1983-2020 Apple Inc.";
    ProductName = "Watch OS";
    ProductVersion = "7.2";
}

iOS 14.4 (iphoneos14.4):
version = 14.4
platform = com.apple.platform.iphoneos
versionInfo = {
    BuildID = "34AA5D88-518E-11EB-91C4-72143A615026";
    ProductBuildVersion = 18D46;
    ProductCopyright = "1983-2021 Apple Inc.";
    ProductName = "iPhone OS";
    ProductVersion = "14.4";
}

watchOS 7.2 (watchos7.2):
version = 7.2
platform = com.apple.platform.watchos
versionInfo = {
    BuildID = "8D9D1CD2-32F3-11EB-B18E-209C67F7BDAB";
    ProductBuildVersion = 18S561;
    ProductCopyright = "1983-2020 Apple Inc.";
    ProductName = "Watch OS";
    ProductVersion = "7.2";
}

Simulator - tvOS 14.3 (appletvsimulator14.3):
version = 14.3
platform = com.apple.platform.appletvsimulator
versionInfo = {
    BuildID = "E3F85AF8-32C4-11EB-9F1B-1F54C5D7F887";
    ProductBuildVersion = 18K559;
    ProductCopyright = "1983-2020 Apple Inc.";
    ProductName = "Apple TVOS";
    ProductVersion = "14.3";
}

macOS 11.1 (macosx11.1):
version = 11.1
platform = com.apple.platform.macosx
versionInfo = {
    ProductBuildVersion = 20C63;
    ProductCopyright = "1983-2020 Apple Inc.";
    ProductName = macOS;
    ProductUserVisibleVersion = "11.1";
    ProductVersion = "11.1";
    iOSSupportVersion = "14.3";
}

DriverKit 20.2 (driverkit.macosx20.2):
version = 20.2
platform = com.apple.platform.macosx
versionInfo = {
}

Simulator - tvOS 14.3 (appletvsimulator14.3):
version = 14.3
platform = com.apple.platform.appletvsimulator
versionInfo = {
    BuildID = "E3F85AF8-32C4-11EB-9F1B-1F54C5D7F887";
    ProductBuildVersion = 18K559;
    ProductCopyright = "1983-2020 Apple Inc.";
    ProductName = "Apple TVOS";
    ProductVersion = "14.3";
}

I already tried to

  • update Mac Software
  • Update Xcode
  • Clean Project
  • Close Xcode
  • Restart Mac
  • set derived Data in Preferences > Locations to Default

The You can see the black screen here

It would be very nice if you can help me to solve this.

Thank you very much

max

Ahmet Sina Ustem
  • 1,090
  • 15
  • 32
  • There are lots of "the storyboard is black" question/answer pairs on stack overflow already. There is no point asking this again. – matt Feb 01 '21 at 21:09
  • thanks. That also didn't help. I'm using the MacBook Pro with an M1 (2020) and "Open using Rosetta" is checked. I cleaned the project, closed Xcode, restarted the Mac, still nothing has changed. –  Feb 02 '21 at 20:21

1 Answers1

11

Update: This issue fixed with Xcode 12.5 release

I got this same error today and I tried the ways that you mentioned, but none of them worked. And then I remembered that I checked "Open using Rosetta" in Xcode's "Get Info". When I unchecked this option, cleaned the project, and reopened Xcode, it works.

If you are using MB with an M1 chip, I think you can try this.

But I should warn you if you unchecked "Open using Rosetta" option, you can get "IPA processing failed" error when you achieve the project. More detail: How to fix "IPA processing failed" in Xcode 12.2 with MAC M1

Ahmet Sina Ustem
  • 1,090
  • 15
  • 32
  • 2
    Well, that helped me too.However Disabling Rosetta mode will fail your build also. That's so unfortunate. – Anand Feb 03 '21 at 05:12
  • 1
    This was the only working method, thank you very much. "cleaned the project, and reopened Xcode" is important. – wonder Feb 25 '21 at 10:27