Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Fetching libs for completion" crashes #1958

Closed
lassemaatta opened this issue Jan 31, 2025 · 3 comments
Closed

"Fetching libs for completion" crashes #1958

lassemaatta opened this issue Jan 31, 2025 · 3 comments
Labels
bug Something isn't working editor Related to clojure-lsp on a text editor

Comments

@lassemaatta
Copy link
Contributor

Describe the bug

Emacs modeline shows the startup status of clojure-lsp when starting. However, it gets stuck on Fetching libs for completions. See logs below.

Not fatal, as otherwise the LSP session seems to work fine. Not sure what that "fetching libs" functionality is, so something might break if it doesn't finish ok.

To Reproduce
Steps to reproduce the behavior:

  1. Open a clojure project
  2. Observer emacs modeline and/or server log

Expected behavior
Fetching libs doesn't crash.

Screenshots

Image
Log - clojure-lsp
2025-01-31T06:09:49.212Z  INFO [clojure-lsp.server:102] - :publish-diagnostics 0ms
2025-01-31T06:09:50.150Z  INFO [clojure-lsp.feature.clojuredocs:23] - [Clojuredocs] Refreshing clojuredocs cache took 4353ms.
2025-01-31T06:09:50.766Z  INFO [clojure-lsp.db:79] - [DB] Reading transit analysis cache from /Users/lassemaatta/.cache/clojure-lsp/db.transit.json db took 614ms
2025-01-31T06:09:50.767Z  INFO [clojure-lsp.feature.java-interop:271] - [Java] JDK source already present on global LSP cache dir.
2025-01-31T06:09:50.777Z  INFO [clojure-lsp.dep-graph:280] - :maintain-dep-graph 6ms
2025-01-31T06:09:50.779Z  INFO [clojure-lsp.feature.java-interop:312] - [Java] JDK source analysis cache loaded successfully.
2025-01-31T06:09:59.049Z  DEBUG [clojure-lsp.handlers:302] - :document-highlight cancelled - waited 0ms
2025-01-31T06:09:59.051Z  INFO [clojure-lsp.handlers:413] - :code-lens 0ms
2025-01-31T06:09:59.058Z  DEBUG [clojure-lsp.handlers:302] - :document-highlight cancelled - waited 0ms
2025-01-31T06:09:59.059Z  INFO [clojure-lsp.handlers:302] - :document-highlight 1ms
2025-01-31T06:09:59.059Z  INFO [clojure-lsp.handlers:302] - :document-highlight 0ms
2025-01-31T06:09:59.059Z  INFO [clojure-lsp.handlers:302] - :document-highlight 0ms
2025-01-31T06:09:59.059Z  INFO [clojure-lsp.handlers:302] - :document-highlight 0ms
2025-01-31T06:09:59.059Z  INFO [clojure-lsp.handlers:302] - :document-highlight 0ms
2025-01-31T06:09:59.060Z  INFO [clojure-lsp.handlers:302] - :document-highlight 0ms
2025-01-31T06:09:59.060Z  INFO [clojure-lsp.handlers:302] - :document-highlight 0ms
2025-01-31T06:09:59.041Z  ERROR [clojure-lsp.server:55] - Error receiving message: Internal error (-32603)
{:method "textDocument/didOpen"}
com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine     PlatformThreads.java:  872
com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine     PlatformThreads.java:  896
                                         java.lang.Thread.run              Thread.java: 1583
                                     java.lang.Thread.runWith              Thread.java: 1596
           java.util.concurrent.ThreadPoolExecutor$Worker.run  ThreadPoolExecutor.java:  642
            java.util.concurrent.ThreadPoolExecutor.runWorker  ThreadPoolExecutor.java: 1144
                                                          ...                              
                            clojure.core.async/thread-call/fn                async.clj:  486
                                lsp4clj.server/thread-loop/fn               server.clj:  123
                                 lsp4clj.server.ChanServer/fn               server.clj:  263
               lsp4clj.server.ChanServer/receive-notification               server.clj:  415
                                                          ...                              
                                        clojure-lsp.server/fn               server.clj:  223
                                clojure-lsp.handlers/did-open             handlers.clj:  201
                 clojure-lsp.feature.file-management/did-open      file_management.clj:   57
               clojure-lsp.feature.completion-lib/fetch-libs!       completion_lib.clj:  170
         clojure-lsp.feature.completion-lib/all-clojure-libs!       completion_lib.clj:  164
                                                          ...                              
                                clojure-lsp.shared/deep-merge               shared.clj:   41
                                clojure-lsp.shared/deep-merge               shared.clj:   70
                                          clojure.core/reduce                 core.clj: 6965
                                  clojure.core.protocols/fn/G            protocols.clj:   13
                                    clojure.core.protocols/fn            protocols.clj:   74
                            clojure.core.protocols/seq-reduce            protocols.clj:   31
                                  clojure.core.protocols/fn/G            protocols.clj:   19
                                    clojure.core.protocols/fn            protocols.clj:  167
                                clojure-lsp.shared/deep-merge               shared.clj:   68
                                          clojure.core/reduce                 core.clj: 6965
                                  clojure.core.protocols/fn/G            protocols.clj:   13
                                    clojure.core.protocols/fn            protocols.clj:   74
                            clojure.core.protocols/seq-reduce            protocols.clj:   31
                                  clojure.core.protocols/fn/G            protocols.clj:   19
                                    clojure.core.protocols/fn            protocols.clj:  167
                    clojure-lsp.shared/deep-merge/merge-entry               shared.clj:   67
                                           clojure.core/assoc                 core.clj:  193
                                                          ...                              
java.lang.IllegalArgumentException: Key must be integer

2025-01-31T06:09:59.520Z INFO [clojure-lsp.handlers:361] - :hover 460ms
2025-01-31T06:09:59.550Z INFO [clojure-lsp.handlers:325] - :server-info-raw 491ms

User details (please complete the following information):

  • OS: MacOs
  • Editor emacs
  • Version: 2025.01.22-23.28.23
@lassemaatta lassemaatta added bug Something isn't working editor Related to clojure-lsp on a text editor labels Jan 31, 2025
@ericdallo
Copy link
Member

This is a async non blocking task that fetch libs for completion at project.clj/deps.edn, so you can completion lib names and versions, but it's supposed to be fast, but it seems a exception is happening, I'll fix it

@ericdallo
Copy link
Member

Fixed @lassemaatta , LMK if any related issues

@lassemaatta
Copy link
Contributor Author

Thanks, the fechting (sic) works fine now with the latest nightly ;)

2025-02-01T08:31:57.541Z  INFO [clojure-lsp.db:79] - [DB] Reading transit analysis cache from /Users/lassemaatta/.cache/clojure-lsp/db.transit.json db took 956ms
2025-02-01T08:31:57.542Z  INFO [clojure-lsp.feature.java-interop:271] - [Java] JDK source already present on global LSP cache dir.
2025-02-01T08:31:57.549Z  INFO [clojure-lsp.dep-graph:280] - :maintain-dep-graph 5ms
2025-02-01T08:31:57.551Z  INFO [clojure-lsp.feature.java-interop:312] - [Java] JDK source analysis cache loaded successfully.
2025-02-01T08:32:03.641Z  INFO [clojure-lsp.feature.completion-lib:162] - Fechting all jar libs took 10584ms
2025-02-01T08:32:03.644Z  INFO [clojure-lsp.handlers:197] - :did-open 10749ms
2025-02-01T08:32:03.644Z  INFO [clojure-lsp.server:164] - :refreshing-test-tree 0ms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working editor Related to clojure-lsp on a text editor
Projects
None yet
Development

No branches or pull requests

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy