Swift Metal Compiler failed with XPC_ERROR_CONNECTION_INTERRUPTED BERT Model - swift

I've recently been working on an app where a user can ask questions about a text and the app will print out the answer. For that, I used the Apple Finding Answers to Questions template, which is powered by BERT. This template worked just fine, until yesterday when it always printed out the error message:
Compiler failed with XPC_ERROR_CONNECTION_INTERRUPTED
when executing the BERT inference code:
let answer = self.bert.findAnswer(for: searchText, in: detail.body)
I haven't changed anything of the code, so this seems like a bug, does anyone know how to solve it or did anyone have similar problems?

I was able to resolve the issue by cleaning my build folder, therefore this issue seemed to be caused by corrupted cache files.

Related

Problems in generating UIKit/UICloudSharingController.h

When I compile my app I get a long list of errors all connected to
UIKit/UICloudSharingController.h
as you may see in the attached screenshot.
What does it mean and how to fix it?
The issue was due to a very weird problem Apple helped me to find out. In practice I used flag share in #if clauses to shield piece of code in the appropriate target. What I found was that this flag is also used somewhere by Apple itself and so I shielded even some parts of its code with the errors I reported. Once renamed to sharespare, the name of the app, the problem all but disappeared.

'Parse/ParseClientConfiguration.h' file not found

I am trying to make a project using Parse. My project used to work before Swift 3.0 update. Yesterday I decided to upgrade my project code to Swift 3.0. I also updated Parse to its latest version which I used pods to do it. I get these 2 errors which I couldn't find a solution to. I deleted Parse and then reinstalled again using Pods but that didn't fix the problem.
(Can't post pictures because I don't have enough reputation :/)
(Can't post more than 2 links too :/)
Error #1:
http://i.imgur.com/oeGeU2V.png
Error #2:
http://i.imgur.com/urYEWxk.png
Proof of having the required file:
These are the 2 errors that I am encountering right now. When I remove the ParseClientConfiguration.h I also get the same error twice.
Error #1 twice:
While answering keep in mind that I am not a very experienced programmer. You may have to explain some parts more detailed. If you need more information I would gladly provide them.
Deleting "Derived Data" solved my problem.
How to delete "Derived Data":
https://stackoverflow.com/a/39495772/7188022
Most likely you ran into this, because you ignored
"From now on you’ll open the workspace file instead of the project file"
like I did.
A single line, which can easily bee overseen at the Install Guide

Swift Compiler Error Group

Sorry to post this again. But I really got lost in solving this bug in my Xcode. I am using Xcode Version 8.0 swift 3 , I have got this error when building the project:
Command failed due to signal: Segmentation fault: 11, and it shows me in the storyboards the code in black color for a while. Also, there is a notification says An internal error occurred, Source editor functionality is limited, attempting to restore, Report a Bug.
I have searched a lot and most things I found about building, cleaning, reopening the project. Also, I tried to uncheck and recheck the Automatically managed signing for my project.
I hope to hear from you the best solution for my problem
waiting for your replay greatest coders
I had this same issue. I went to the 'Debug Session' window and saw I had type conversion issues. I was trying to determine is an object was a Set and needed to evaluate it as a Set<String>.
Not sure if that'll help you, but check out the 'Debug Session' window to see which view controller class has the issue and what it is.

Xcode 6.1 Swift Extensions - SourceKit Service Crash

I am trying to add an extension to Swift so I can format Doubles as found in this answer here
Precision String Format Specifier In Swift
Not ideal, but best solution I can find so far. However I cannot seem to add extensions to my project. Extensions work fine on playground, but when I try to add it to my project, I get the SourceKit service crash error every time I try to add the code in. I also get an error stating "declaration is only valid at file scope".
I have not previously used extensions in Swift before, so I cannot tell if this is directly related to Xcode 6.1 update or not.
Has anyone else had this issues or know anyway to solve this?
The SourceKit service crash error is pretty annoying and doesn't only happen with Extensions. I have found breaking your project up into different files has helped.

Why do I get Source Kit Service terminated error? [duplicate]

This question already has answers here:
Error Xcode 6 --> Error SourceKit terminated. Editor functionality temporarily limited [duplicate]
(9 answers)
Closed 8 years ago.
With second line something wrong, what?
let modelURL = NSBundle.mainBundle().URLForResource("xxx", withExtension: "momd");
let managedObjectModel = NSManagedObjectModel.init(contentsOfURL: modelURL)
In my case I had imported missing files in bridged header.
After I deleted it the error notification gone.
the issue is the ";" letter end of the first line, I removed it, and now it works, no popup anymore, that was an interesting side effect
In my case, I created about 6+ swift files for one or two targets and SourceKit Service Failure errors occurred. I found I was importing Frameworks that I was not using. So I deleted many of the import lines across the .swift files. For me, it was helpful; I am getting (much) less error.
Hope this helps.
KW
I run across this every once in a while too. As near as I can tell, it's an issue that occurs when you try to do something that the type checker doesn't think is valid - I run across it a lot when writing for-in loops. You should file a bug report, detailing what code, exactly, produces the error.
For now, you'll probably have to play with it until you find a combination that doesn't make the realtime-compiler angry.
Set the target to 7.1 fix my issue. Hope this helps you.
Update:
I have a working solution here, works for me:
Error Xcode 6 --> Error SourceKit terminated. Editor functionality temporarily limited
Hope can help