Skip to content

SourceKitten #5325

Closed
Closed

Description

@BorisBakhlykov

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.

Activity

  1. SimplyDanny commented on Nov 5, 2023

    @SimplyDanny
    Collaborator

    On macOS, make sure Xcode is installed. See #1466 (comment) for help.

  2. added
    help
    on Nov 5, 2023
  3. taher-mosbah commented on Jan 23, 2024

    @taher-mosbah

    This also occurs when using a nightly/snapshot toolchain. (tested with latest Swift 5.10 Development Toolchain).

  4. ObjectiveCesar commented on Jun 18, 2024

    @ObjectiveCesar

    This also occurs when using a nightly/snapshot toolchain. (tested with latest Swift 5.10 Development Toolchain).

    This fixed it for me. I had to remove the Swift 6.0 snapshot toolchain.

  5. nysander commented on Sep 25, 2024

    @nysander

    SourceKittenFramework/library_wrapper.swift:58: Fatal error: Loading sourcekitdInProc.framework/Versions/A/sourcekitdInProc failed

    macOS Sequoia and Xcode 16.0

  6. dabrahams commented on Nov 11, 2024

    @dabrahams

    This should be reopened.

  7. gomserker-jp commented on Nov 22, 2024

    @gomserker-jp

    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

  8. ih-codes commented on Dec 9, 2024

    @ih-codes
    SourceKittenFramework/library_wrapper.swift:58: Fatal error: Loading sourcekitdInProc.framework/Versions/A/sourcekitdInProc failed
    

    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).

  9. ognerub commented on Dec 11, 2024

    @ognerub

    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

  10. nysander commented on Dec 11, 2024

    @nysander

    @ognerub so it looks like we cannot have 15.4 and 16.1 at the same time?

  11. ognerub commented on Dec 12, 2024

    @ognerub

    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)

  12. TimOliver commented on Jan 1, 2025

    @TimOliver

    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)

  13. marcoroth commented on Jan 27, 2025

    @marcoroth

    Thanks @TimOliver, that did it for me too! 🙏🏼

  14. olcayertas commented on Apr 29, 2025

    @olcayertas

    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
    

    Error from Xcode:

    Plug-in ended with uncaught signal: 5)
    SourceKittenFramework/library_wrapper.swift:58: Fatal error:
    Loading sourcekitdInProc.framework/Versions/A/sourcekitdInProc failed
    

    UPDATE

    Reselecting Xcode toolchain has solved my problem

  15. riderx commented on Sep 11, 2025

    @riderx

    #5325 (comment)

    Can we get it work to nightly as well ? it's super annoying when we test new OS release that lint fail

  16. talesp commented on Nov 4, 2025

    @talesp

    I'm getting this error with Xcode 26.1 installed with https://github.com/XcodesOrg/XcodesApp (and symlinked as Xcode.app inside applications)

    ls -ltra /Applications/Xcode*
    lrwxr-xr-x  1 talesp  admin  30 Nov  4 11:18 /Applications/Xcode.app@ -> /Applications/Xcode-26.1.0.app
    
    /Applications/Xcodes.app:
    total 0
    drwxrwxrwx   10 talesp  staff   320 Sep 20 06:24 Contents/
    drwxrwxrwx@   3 talesp  staff    96 Oct 14 10:55 ./
    drwxrwxr-x  122 root    admin  3904 Nov  4 11:21 ../
    
    /Applications/Xcode-26.1.0.app:
    total 0
    drwxr-xr-x@   3 talesp  staff    96 Nov  4 11:16 ./
    drwxr-xr-x   16 talesp  staff   512 Nov  4 11:17 Contents/
    drwxrwxr-x  122 root    admin  3904 Nov  4 11:21 ../
    

    SwiftLint installed with brew.

    swiftlint version
    0.62.2

  17. acevif commented on Dec 5, 2025

    @acevif

    I've encountered a similar error with:

    • Xcode 26.1.1
    • macOS 26.1(25B78)
    • SwiftLint SPM Build Tool Plugin

    This error was resolved for me after the following steps:

    1. Run xcode-select

    $ sudo xcode-select -s /Applications/Xcode_26.1.1.app/Contents/Developer
    

    See:

    2. Restart Xcode

    $ xed .
    

    Hope this helps.

    Thanks to @TimOliver and @jpsim.

  18. legoesbenr commented on Dec 11, 2025

    @legoesbenr

    Reinstalling Xcode fixed it for me... Save version etc...
    Thanks Apple...

  19. talesp commented on Dec 11, 2025

    @talesp

    I get this error when installing Xcode via https://github.com/XcodesOrg/XcodesApp. sudo xcode-select -s does not solve, I had to install from App Store

  20. samuelowino commented on May 11, 2026

    @samuelowino

    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.

  21. TimOliver commented on May 12, 2026

    @TimOliver

    Considering how long this issue has been open, Its safe to assume this won't be fixed.

    But this issue is closed... 😅

  22. samuelowino commented on May 12, 2026

    @samuelowino

    Considering how long this issue has been open, Its safe to assume this won't be fixed.

    But this issue is closed... 😅

    😅 closed != fixed

  23. SimplyDanny commented on May 14, 2026

    @SimplyDanny
    Collaborator

    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.

  24. samuelowino commented on May 15, 2026

    @samuelowino

    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!

  25. yannbonafons commented on Sep 19, 2026

    @yannbonafons

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    help

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions