Xcode storyboard: Internal error. Please file a bug
Asked Answered
J

20

74

While editing in the storyboard, specifically assigning a view controller to a specific class, I suddenly encountered this error when I wanted to run the project.

Main.storyboard: Internal error. Please file a bug at bugreport.apple.com and attach "/var/folders/79/_jh611t15qsfcx165_jv_20h0000gn/T/IB-agent-diagnostics_2015-10-28_00-33-12_730000".

And now I can't run my project anymore. I couldn't find any information regarding to this anywhere else. Did anyone encounter this before?

enter image description here

Janicejanicki answered 27/10, 2015 at 16:42 Comment(8)
Yes that's happening with me too a lot. Specially on xibs. Using Xcode 7.1Arnone
Let's hope 7.1.1 will be released soon.Longlimbed
Xcode 7.1.1 was released earlier this week, and resolves this issue.Jaime
it happens to me in xcode 7.2Dialytic
@JustinLeo it is happening for me in Xcode 8.0 (beta)Hailstorm
uncheck target for the xib file -> clean the project->then check the target->clean -> build the project. working in xcode 8.xAparicio
It is happening to me in Xcode 9.2Avertin
Same issue now on Xcode 9.2 i cleaned i restarted mac book i tried everything no use :(((Fahey
S
122

I faced the same issue. And it was solved by cleaning up the build files.

cmd + shift + k

AND

cmd + option + shift + k

Scintillate answered 28/10, 2015 at 9:5 Comment(8)
Cleaning the build folder should not be necessary, this was an intermittent issue related to the iOS simulator, and is resolved in Xcode 7.1.1.Jaime
Yeah. I used them together. So i wasn't sure which one worked.Scintillate
i have tried the above options but still not solved my issueEndora
@FahadAjmal I have tried this but not helping in Xcode 8.0 (beta)Hailstorm
If cleaning doesn't work, try cleaning out the derived data also - which solves many of the Xcode problems for me. To clear derived data for all projects (which should be safe), in terminal type: rm -rf ~/Library/Developer/Xcode/DerivedDataConah
This does not work for me and any alternatives would be greatly appreciated. Thank You!Vivacious
Thanks, glad I didn't waste my time in filing up the report.Grodno
Occurred in Xcode 9.2 as well. Cleaning the project and closing the simulator solved the problem.Oeillade
D
20

The following steps will stop your problem.

  1. cmd + shift + k
  2. cmd + option + shift + k
  3. Restart Xcode
  4. Restart Mac.
Discourse answered 29/12, 2016 at 5:48 Comment(3)
No need to start the Mac, Just restart the XCode.Omaromara
I had to delete derived data too... phew glad i didn't lose all that work :DRape
Restart Mac saved my day!Springbok
I
11

Clearing out the DerivedData folder (in ~/Library/Developer/Xcode/DerivedData) is what fixed the issue for me.

Incomputable answered 28/9, 2016 at 14:44 Comment(0)
S
7

I had the same issue. Got it fixed using below steps :

  1. Delete the derived data of your project

  2. Clean your project (Shortcut : cmd + shift + k)

screenshot

  1. Now, run your app.
Sartain answered 26/4, 2017 at 13:12 Comment(1)
Hah. I guess I didn't try this exact combination of steps. Performing these steps in this order seems to have worked for me, however. Cheers!Jurist
D
6

Just ran into this error, and it coincided with non-available iOS versions showing for the wrong Xcode (e.g., iOS 11.2 showing for Xcode 8.2.1, which is not possible for iOS Simulators).

Solution was to delete /Library/Developer/CoreSimulator, e.g.,

rm -rf /Library/Developer/CoreSimulator

In theory you should be able to run xcrun simctl delete unavailable but that didn't work in this case.

Note Found this issue on Xcode 8.2.1, but 9.2 was also installed.

Ditch answered 10/4, 2018 at 19:54 Comment(0)
H
2

Sounds like you found a bug in Xcode and should file a bug report with apple here and attach the file that it specifies with the error. In the mean time, do you have an earlier version of your project that you can revert back to? Or provide the xml of your main story board here?

Heathendom answered 27/10, 2015 at 16:49 Comment(1)
Restoring an old version of my storyboard with Time Machine worked. Not sure filing a bug will help...Morelock
A
2

In my case, the problem was with a UITextField as a subview in a UITableViewCell with 'Basic' styling. Once I changed it from 'Basic' to 'Custom' It started compiling.

Aligarh answered 11/12, 2015 at 15:30 Comment(0)
K
2

I simply removed the file causing this issue (just reference not delete) and re-added it again.

Karate answered 1/11, 2017 at 7:43 Comment(1)
Awesome. Solved my problem. Only solution that was working for me.Smattering
A
1

Here are the steps to fix this issue:

Uncheck target for the xib file -> clean the project->then check the target->clean the project-> run/build the project. Working in xcode 8.x

Aparicio answered 16/1, 2017 at 9:19 Comment(0)
E
1

All these solutions didn't work for me.
What did work was this:

$ sudo chmod -R 777 ~/Library/Logs
Espy answered 10/3, 2018 at 9:58 Comment(1)
This was the only solution that worked for me. Updating XCode 7.3.1 project to XCode 8.2.1.Kapok
F
0

Try Deleting each view controller and Build to find the view controller causing an issue.

In my case, I misplaced object in the storyboard.

enter image description here

Deleting this object worked for me.

Ferroconcrete answered 4/7, 2016 at 8:1 Comment(0)
N
0

I had same problem with xcode8 beta 6 , Command+K was not helpful , But then for which .xib file xcode was displaying error, I just corrected its related properties in IB like mine view was custom one & some of its inner image view properties. then i cleaned the build & run the app. It worked.

Nahshu answered 5/9, 2016 at 5:14 Comment(0)
F
0

I had this issue on Xcode 8.2.1. Cleaning(cmd + option + shift + k) did not help. However, uninstalling the Xcode, downloading Xcode 8.2.1 from Apple, installing did resolve the issue.

Five answered 19/3, 2017 at 8:58 Comment(0)
T
0

Just close your Xcode and open it again. issue will be gone.

Triune answered 19/12, 2017 at 7:25 Comment(1)
just closing and opening again hasn't worked for me.Sappy
F
0

I'm using Xcode 9.2 and all the above answers didn't solve the issue. My issue was that i added a constraint accidentally to the TableViewCell Content View. And content view is not constraint applicable and i'm not supposed to add constraints to it. It is already locked. But i really don't know how i added constraint to it accidentally. After deleting the constraint everything started working again perfectly fine.

I thought this answer would help somebody having my same issue.

Fahey answered 5/3, 2018 at 21:57 Comment(0)
E
0

None of the other answers worked for me. Here's what did.

  1. Open the storyboard, select all and copy.
  2. Create a new storyboard, paste.
  3. Delete original storyboard.
  4. Rename all references to old storyboard.

Build and run.

Extensor answered 21/8, 2019 at 17:43 Comment(0)
P
0

For me, I removed a whole UITableView section that was playing up. It only had one cell, but obviously something was up. Removing it and restarting Xcode fixed it for me.

Predella answered 2/9, 2019 at 21:13 Comment(0)
C
0

No solution above work for me. I fix it with this:

  • close xcode
  • open Terminal app and goto project directory
  • run command 'pod install'. it regenerate my project
  • open project in xcode again

note: this only for project with cocoapod installed project

Como answered 10/2, 2020 at 4:8 Comment(0)
M
0

The only thing that worked for me(not needing to restart the Mac) was:

  1. (Close all Storyboard tabs opened on Xcode)

  2. [Product] -> [Clean All Issues]

  3. [Cmd] + [Shift] + [k]

  4. [Cmd] + [Q] (Quit Xcode)

  5. Open [Launchpad] -> [Xcode] instaled from AppStore

  6. [Open a project or file] -> 'MyProjct.xcworkspace'

  7. [Cmd] + [R] (Run)

Mallette answered 31/3, 2023 at 5:2 Comment(0)
V
0

I had the same issue that I just recently resolved. Hopefully this helps somebody..

What I tried that did not work:

  • Closing / Restarting XCode.
  • [Cmd][Shift][k] & [Cmd][Shift][option][k].
  • Cleaning derived folder.

XCode was telling me the issue was in the Main storyboard. I was making a lot of changes to one View Controller in particular. After removing all outlets and connections and deleting this View Controller (in Storyboard), I got the error to go away and the App to launch.

I then re-added a new View Controller and basically re-made the whole UI. It took about 15 minutes, but now the App actually compiles and runs.

Vadim answered 6/9, 2023 at 16:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.