You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! I received this error "SourceKittenFramework/library_wrapper.swift:31: Fatal error: Loading sourcekitdInProc.framework/Versions/A/sourcekitdInProc failed", when wrote fix command "swiftlint --fix".
Update and reinstall aren't help me.
Reacted by dvosscricut, Kaijie Yu and Pierre-Yves Lapersonne
Reacted by Gianluca Lofrumento, Maciek Czarnik, Môrisson Marcel, Darren Ehlers, borsosbe, Peter Oettl, Kyle Shipley, Ezequiel Alejandro Becerra, Keeley Carrigan, Matheus dos Reis de Jesus and 19 more
Reacted by Pedro Almeida, Slava Fomin, grossmae, Victor Rubenko, Roman1610, gomserker, Alex Levshenkov, Camilo Núñez, Jeff Hanson, Caleb A Kierum and 3 more
I had this problem when used xcodes in terminal. My version of Xcode 16.1 was marked as "installed". Then I opened AppStore and downloaded Xcode app from there. And after this problem solved. And xcodes it terminal now shows "installed, selected". Maybe it is not necessary to download app from AppStore and only type command it terminal (xcodes select) but in mine case only new app download helped.
P.S. after install Xcode from AppStore, xcodes in terminal showed something like this:
xcodes installed
16.1 (16B40) (Selected) /Applications/Xcode.app
16.1 (16B40) /Applications/Xcode-16.1.0.app
So it seems was an issue in Xcodes duplicates. And command in terminal "xcodes uninstall 16.1.0" erased unnecessary one.
After this i`ve got this list
xcodes installed
16.1 (16B40) (Selected) /Applications/Xcode.app
I have the same issue with Xcode 16.3.
I have tried both using SwiftLint as
Build Tool Plug-in
using it from command line (installed with brew)
and got the same error:
Error from terminal:
swiftlint --fix
Correcting Swift files in current working directory
warning: 'unused_declaration' should be listed in the 'analyzer_rules' configuration section for more clarity as it is only run by 'swiftlint analyze'.
warning: 'unused_import' should be listed in the 'analyzer_rules' configuration section for more clarity as it is only run by 'swiftlint analyze'.
Correcting 'Tests.swift' (3/3)
Correcting 'AppDelegate.swift' (1/3)
Correcting 'ViewController.swift' (2/3)
SourceKittenFramework/library_wrapper.swift:58: Fatal error: Loading sourcekitdInProc.framework/Versions/A/sourcekitdInProc failed
zsh: trace trap swiftlint --fix
I'm getting this error in 2026, after installing with home-brew.
Considering how long this issue has been open, Its safe to assume this won't be fixed.
This issue has reportedly always been solved by reinstalling/reselecting Xcode, hence I don't see what SwiftLint could do better.
One thing to know is that you can --disable-sourcekit in case you're not relying on SourceKit-based rules (which there are only a few of them left). That avoids the issue entirely as there's no runtime dependency required anymore.
This issue has reportedly always been solved by reinstalling/reselecting Xcode, hence I don't see what SwiftLint could do better.
One thing to know is that you can --disable-sourcekit in case you're not relying on SourceKit-based rules (which there are only a few of them left). That avoids the issue entirely as there's no runtime dependency required anymore.
Thanks @SimplyDanny , I was able to get it to work by reselecting Xcode.
Cheers!
Just in case, I got this error because, after installingand deleting different Xcode version, I had no more command line tools selected (in Settings>Locations>Command line tools). Selecting one solve the problem.
Activity
SimplyDanny commentedon Nov 5, 2023
On macOS, make sure Xcode is installed. See #1466 (comment) for help.
taher-mosbah commentedon Jan 23, 2024
This also occurs when using a nightly/snapshot toolchain. (tested with latest Swift 5.10 Development Toolchain).
ObjectiveCesar commentedon Jun 18, 2024
This fixed it for me. I had to remove the Swift 6.0 snapshot toolchain.
nysander commentedon Sep 25, 2024
SourceKittenFramework/library_wrapper.swift:58: Fatal error: Loading sourcekitdInProc.framework/Versions/A/sourcekitdInProc failed
macOS Sequoia and Xcode 16.0
dabrahams commentedon Nov 11, 2024
This should be reopened.
gomserker-jp commentedon Nov 22, 2024
SourceKittenFramework/library_wrapper.swift:58: Fatal error: Loading sourcekitdInProc.framework/Versions/A/sourcekitdInProc failed
same here. guess this should be reopened.
i've checked swiftlint --version on terminal. it worked.
but this error appears on xcode 16
ih-codes commentedon Dec 9, 2024
Also seeing this after downloading the Xcode 12.6 RC. Tried removing and reinstalling with no luck.
I'm on MacOS Sequoia 15.1.1 (24B91).
ognerub commentedon Dec 11, 2024
I had this problem when used xcodes in terminal. My version of Xcode 16.1 was marked as "installed". Then I opened AppStore and downloaded Xcode app from there. And after this problem solved. And xcodes it terminal now shows "installed, selected". Maybe it is not necessary to download app from AppStore and only type command it terminal (xcodes select) but in mine case only new app download helped.
P.S. after install Xcode from AppStore, xcodes in terminal showed something like this:
xcodes installed
16.1 (16B40) (Selected) /Applications/Xcode.app
16.1 (16B40) /Applications/Xcode-16.1.0.app
So it seems was an issue in Xcodes duplicates. And command in terminal "xcodes uninstall 16.1.0" erased unnecessary one.
After this i`ve got this list
xcodes installed
16.1 (16B40) (Selected) /Applications/Xcode.app
And now everything works fine
nysander commentedon Dec 11, 2024
@ognerub so it looks like we cannot have 15.4 and 16.1 at the same time?
ognerub commentedon Dec 12, 2024
In truth after update to Sequoia I`ve deleted XCode 15.3 from xcodes, and now use only version 16.1.
But you can try)
TimOliver commentedon Jan 1, 2025
Hey folks! I also just encountered this error message and found this issue while looking for an answer.
Doing this solved it for me: #1466 (comment)
marcoroth commentedon Jan 27, 2025
Thanks @TimOliver, that did it for me too! 🙏🏼
olcayertas commentedon Apr 29, 2025
I have the same issue with Xcode 16.3.
I have tried both using SwiftLint as
and got the same error:
Error from terminal:
Error from Xcode:
UPDATE
Reselecting Xcode toolchain has solved my problem
riderx commentedon Sep 11, 2025
Can we get it work to nightly as well ? it's super annoying when we test new OS release that lint fail
talesp commentedon Nov 4, 2025
I'm getting this error with Xcode 26.1 installed with https://github.com/XcodesOrg/XcodesApp (and symlinked as Xcode.app inside applications)
SwiftLint installed with brew.
swiftlint version
0.62.2
acevif commentedon Dec 5, 2025
I've encountered a similar error with:
This error was resolved for me after the following steps:
1. Run
xcode-selectSee:
sourcekitdfails #1466 (comment)2. Restart Xcode
Hope this helps.
Thanks to @TimOliver and @jpsim.
legoesbenr commentedon Dec 11, 2025
Reinstalling Xcode fixed it for me... Save version etc...
Thanks Apple...
talesp commentedon Dec 11, 2025
I get this error when installing Xcode via https://github.com/XcodesOrg/XcodesApp.
sudo xcode-select -sdoes not solve, I had to install from App Storesamuelowino commentedon May 11, 2026
SourceKittenFramework/library_wrapper.swift:58: Fatal error: Loading sourcekitdInProc.framework/Versions/A/sourcekitdInProc failed
I'm getting this error in 2026, after installing with home-brew.
Considering how long this issue has been open, Its safe to assume this won't be fixed.
TimOliver commentedon May 12, 2026
But this issue is closed... 😅
samuelowino commentedon May 12, 2026
😅 closed != fixed
SimplyDanny commentedon May 14, 2026
This issue has reportedly always been solved by reinstalling/reselecting Xcode, hence I don't see what SwiftLint could do better.
One thing to know is that you can
--disable-sourcekitin case you're not relying on SourceKit-based rules (which there are only a few of them left). That avoids the issue entirely as there's no runtime dependency required anymore.samuelowino commentedon May 15, 2026
Thanks @SimplyDanny , I was able to get it to work by reselecting Xcode.
Cheers!
yannbonafons commentedon Sep 19, 2026
Just in case, I got this error because, after installingand deleting different Xcode version, I had no more command line tools selected (in Settings>Locations>Command line tools). Selecting one solve the problem.