Xcode 15.3 crippled with "internal inconsistency error"

Since Xcode 15.3 it has become impossible to build our project more twice in a row without encountering a batch of "internal inconsistency error: never received target ended message for target ID …".

This issues appeared a few months ago (15.0 i think, but i'm not sure), but xcode 15.3 makes it almost unusable. We're a team of 3 iOS devs, and we're all having the problem.

Our project involves a lot of SPM packages, a few cocoa pods, a few iOS Frameworks, and a bit of swiftgen. Nothing particularly special for a large project, and no custom build steps that does anything fancy.

It is now to the point where we're looking for alternative to xcode, because we can't decently kill xcode and restart every time we have to build our code...

Post not yet marked as solved Up vote post of benjamin_g Down vote post of benjamin_g
2.5k views

Replies

I'm seeing similar problems here. When adding a control in an XIB, adding an IBOutlet in ViewController (iOS, Swift), and running the app using "Product -> Run" with target "My Mac (Designed for iPad)" the new control is not there, and the corresponding variable is also not visible in the source code debugger. Looks to me as if the Xcode has not recognised the changes and did not recompile the source files. After doing a "Clean Build folder" the control is shown and the variable is also there. Earlier I also had to "Clean Build folder" after upgrading to Xcode 15.3, otherwise breakpoints did not work.

Same here. I use an external text editor (Emacs) to edit source files.

Before Xcode 15.3 I would get the "internal inconsistency error" every now and again. Now I get it almost every single time I return to Xcode and trigger a build.

As a result Xcode 15.3 is pretty much unusable for me.

I get the same error all the time. My workaround is just to build it again, and that seems to work for me every time. It's annoying to build twice when I'd rather just build once, but if it works, maybe this'll save you time over killing and restarting Xcode.

I can't believe Xcode 15.3 shipped in this state.

This is probably the buggiest Xcode release yet.

In our team, we have an impression the root cause is the number of Swift Packages we have,and keep adding. We have opened a StackOverflow issue, and also opened a post on Swift Forums

@SerjooA, I don't think it has to do with having many Swift Packages. I only have a single one in my project (SecretsManager, so a build tool plugin if that's any relevant) and I encounter this issue every time I build after having made some changes.

This happens to me with a project that uses a couple of external SwiftPM, no XIB files.

As described, every other build this gets triggered. Sometimes you get one error of that kind, sometimes, 4 or 5. A rebuild clears it, but is a lot of wasted time.

I'm also hitting this same issue--alternating builds failing with "internal inconsistency error."

I'm referencing a Swift package and "overriding" locally to point to a local checkout, but that's something that has worked in the past just fine.

I have a pure Objective-C project and I also get the XCode crash on every other build. (It is actually the second build because the crash puts one back at first build.) At least my code changes are saved! It appears to be one of the final seven or eight steps in the build process counter. These crashes happen whether or not the device is hardware or simulator, iOS 17.4 or 16.x or 15.x, etc.

Same issue. Xcode 15.3. Every second build is failing. Configuration doesn't matter, all of my projects, simulator/device, iOS 16/17.

I run into this every time I swap branches and my xcodeproj file changes in one way or another. I have to Resolve Package Dependencies manually every time.

I think this is related to the automatic saving file feature. I noticed that sometimes if i save the file manually and build, it completes correctly, but if i don't save the file and let xcode do it, it will fail on the first build, and then on second try succeed. This is so annoying to be honest.

I was getting this with some frequency prior to Xcode 15.3 in projects that had SPM build-time plugins. Now on Xcode 15.3 it's nearly every other build.

Same here. Still no luck in Xcode 15.4 beta

I had the same problem in Xcode Swift Playgrounds (v. 15.3). I was using UIKit/PlaygroundSupport and setting a UIViewController subclass to the liveView. That UIViewController subclass was defined in the main file (not in the Sources folder). When I made that UIViewController subclass public was when I got this error and the playground would run but the live view wouldn't show. When I removed the "public" accessor, that error disappeared and the live view started showing again. I know that this isn't the same type of project as the OP's, but I figured there might be something related.