49

I'm getting this weird warning. I'm not sure what could cause it. A .dia file extension supposedly indicates a core digraph graphics file. I did not add one and the app has almost no ui at all.

Could not read serialized diagnostics file:

Could not read serialized diagnostics file: error("Invalid diagnostics signature")

pkamb
  • 33,281
  • 23
  • 160
  • 191
ScottyBlades
  • 12,189
  • 5
  • 77
  • 85

10 Answers10

33

It appears to be an internal issue, the following steps seem to reliably resolve it for me.

  • Installing my uninstalled dependencies (ie: CocoaPods).
  • Cleaning the build folder.
  • Removing derived data.
  • Restarting Xcode
  • If that doesn't work restarting my computer makes this go away.
ScottyBlades
  • 12,189
  • 5
  • 77
  • 85
  • 47
    Xcode is the reason why we are paid that well. – brainray Oct 11 '21 at 18:35
  • 2
    But I was able to get my 6 years old app running in 10 minutes with the option to migrate to the latest swift version. But now I'm sitting already for 3 hours trying to get my 10 month old RN app up running. I hate react-native so much right now – Tob Jun 04 '22 at 16:15
  • Yeah Xcode has its flaws, but when I go to other ides I wonder where did all the “standard” features go… – ScottyBlades Aug 17 '22 at 18:55
16

Here's the zsh script line I use (after navigating to the project's folder):
Note: Uses rm -rfs!

rm -rf ~/Library/Caches/CocoaPods; rm -rf Pods; rm -rf ~/Library/Developer/Xcode/DerivedData/*; pod install;
hEADcRASH
  • 1,905
  • 17
  • 17
4

For me this issue occurred after I updated my Xcode to iOS15. The reason behind my issue was some of my swift packages were no longer up to date. Updating all my swift packages solved this issue. To do this simply do File > Packages > Update to Latest Package Versions.

Dharman
  • 30,962
  • 25
  • 85
  • 135
Sarth Shah
  • 73
  • 4
3

I also experienced this issue. The reason in my case was lack of storage space on my laptop so make sure to check that too.

2

Solution for M1 and M2 Macbook

I'm on a 2020 M1 Apple MacBook and none of these solutions worked for me.

The folder where I had the project created in was named 'Client Works' with a space in-between even throughout folder structure.

Previously folder structure: /Users/ABC/Documents/Client Works/AwesomeProject

Change folder structure to: /Users/ABC/Documents/Client_Works/AwesomeProject

Apparently that had an adverse effect on running the pod install properly. I renamed the folder to 'Client_Works' and ran pod install and everything started working.

Saumil Shah
  • 2,299
  • 1
  • 22
  • 27
0

Check the file and make sure all the document is linked to the project -> Target Memembership

Yunnosch
  • 26,130
  • 9
  • 42
  • 54
D Sun
  • 31
  • 6
0

If you're using a third party library, it might be where this warning or error originates. In my case, I had the same error, it was from a third party library not updated for Xcode 13. I had to go to the library on Github to check if they had an update for this error, and they had. Then, I updated the library's swift package. In my case I had to use the exact commit id at which they fixed the error.

fullmoon
  • 8,030
  • 5
  • 43
  • 58
  • What library was it that had this issue? I'm wondering what they did to resolve it and would like to check them out on GitHub. – phatblat Feb 06 '22 at 22:51
  • It's `xmartlabs/Eureka`, with commit id `6f779aeb9438bccf07a7191d662293b644ff875d` – fullmoon Feb 07 '22 at 13:33
0

I'm quite sure I know the issue and it is severe if you don't use version control. It happened to me twice with working on two different projects, when my disk space was around 7GB free with Xcode 13/13.1. I could not fix it manually, only removing all and cloning the repo again made it compilable again, and freeing disk space of course.

With Xcode 12 I had this issue around 4GB free space, but I could recover at least.

7RedBits.com
  • 454
  • 6
  • 6
0

If you have pods in your project then make sure you are opening the .xcworkspace and not the .xcodeproj

TimBigDev
  • 511
  • 8
  • 7
0

When I removed a library from my Podfile I suddenly received a TON of these messages. The usual clean + clear derived data + restart trick unfortunately didn't seem to work for me this time.

Took me a while to figure this one out, but what did work was upgrading from Xcode 13 to Xcode 14. Doing so provided much better error messages! Turns out I needed to import Foundation, UIKit, or another framework in some of my files.

Leighton Kuchel
  • 297
  • 4
  • 9