Clang daemon: Failed to initialize server: capabilities are null
After the update to the recent version of CLion (vesrion 2020.2), I have been getting the above message in the log. In the clangd Tool window, the log pane is blank, and under the Info tab in that Tool window, Clangd server PID: Unknown [Running]. When I check the processes running on the system, clangd is not present. Inspections are not working correctly unless I disable Clangd completion.
This is on Linux, Pop!_OS 20.04 LTS
During the update to version 2020.2, there was a brief message about clangd and so I checked the log file (~/.cache/JetBrains/CLion2020.1/log/idea_updater.log) and saw the following error message:
29/07 12:47:12 WARN PatchAction.isWritable - /home/user/Applications/clion-2019.3.3/bin/clang/linux/clangd
java.nio.file.FileSystemException: /home/user/Applications/clion-2019.3.3/bin/clang/linux/clangd: Text file busy at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:100)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
at java.base/sun.nio.fs.UnixFileSystemProvider.newFileChannel(UnixFileSystemProvider.java:182)
at java.base/java.nio.channels.FileChannel.open(FileChannel.java:292)
at java.base/java.nio.channels.FileChannel.open(FileChannel.java:345)
at com.intellij.updater.PatchAction.isWritable(PatchAction.java:149)
at com.intellij.updater.PatchAction.doValidateAccess(PatchAction.java:135)
at com.intellij.updater.BaseUpdateAction.validate(BaseUpdateAction.java:94)
at com.intellij.updater.Patch.lambda$validate$0(Patch.java:254)
at com.intellij.updater.Patch.forEach(Patch.java:400)
at com.intellij.updater.Patch.validate(Patch.java:253)
at com.intellij.updater.PatchFileCreator.prepareAndValidate(PatchFileCreator.java:101)
at com.intellij.updater.Runner.install(Runner.java:332)
at com.intellij.updater.Runner._main(Runner.java:161)
at com.intellij.updater.Runner.main(Runner.java:40)
29/07 12:47:13 WARN Runner.askForResolutions - conflicts:
29/07 12:47:13 WARN Runner.askForResolutions - UPDATE @ bin/clang/linux/clangd: Access denied
29/07 13:05:00 WARN Runner.askForResolutions - resolutions:
29/07 13:05:00 WARN Runner.askForResolutions - bin/clang/linux/clangd: IGNORE
I checked that /home/user/Applications/clion-2019.3.3/bin/clang/linux/clangd can be run from the command line, but after I do that the server still doesn't appear to function, even after a restart of Clion while the clangd is running after a manual launch (I see the message: "Built-in clangd version: unable to check" in the Settings under Languages & Frameworks > C/C++ > Clangd.
How I can I fix this problem?
Please sign in to leave a comment.
Hello!
It seems you faced https://youtrack.jetbrains.com/issue/CPP-21644. Feel free to comment or upvote the issue in order to get updates. See https://intellij-support.jetbrains.com/hc/en-us/articles/207241135-How-to-follow-YouTrack-issues-and-receive-notifications if you are not familiar with YouTrack.
Please reinstall CLion, it should help.
Sorry for the inconvenience.
Reinstalling CLion fixed the problem. Thanks!