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

(BadMapError) expected a map, got: nil #535

Closed
dan-klasson opened this issue Aug 13, 2024 · 5 comments · Fixed by #539, #540 or #542
Closed

(BadMapError) expected a map, got: nil #535

dan-klasson opened this issue Aug 13, 2024 · 5 comments · Fixed by #539, #540 or #542

Comments

@dan-klasson
Copy link

dan-klasson commented Aug 13, 2024

In my next-ls log when starting Zed I get this:

15:15:57.136 [error] ** (BadMapError) expected a map, got: nil
    (stdlib 5.2.3) :maps.merge(%{}, nil)
    (next_ls 0.22.8) lib/next_ls.ex:1005: anonymous fn/2 in NextLS.handle_notification/2
    (elixir 1.16.3) lib/map.ex:916: Map.update!/3
    (next_ls 0.22.8) lib/next_ls.ex:1005: NextLS.handle_notification/2
    (gen_lsp 0.10.0) lib/gen_lsp.ex:478: anonymous fn/2 in GenLSP.loop/3
    (telemetry 1.2.1) /private/tmp/next-ls-20240531-10295-xqrzy1/next-ls-0.22.8/deps/telemetry/src/telemetry.erl:321: :telemetry.span/3
    (gen_lsp 0.10.0) lib/gen_lsp.ex:474: anonymous fn/7 in GenLSP.loop/3
    (gen_lsp 0.10.0) lib/gen_lsp.ex:553: GenLSP.attempt/4

Installed with Brew

@PJUllrich
Copy link

Same here. This is how the error looks in the overall logs:

2024-08-13T10:11:49.212501Z [ERROR] failed to format via language server

Caused by:
    ** (CaseClauseError) no case clause matching: :timeout
        (gen_lsp 0.10.0) lib/gen_lsp.ex:353: anonymous fn/7 in GenLSP.loop/3
        (gen_lsp 0.10.0) lib/gen_lsp.ex:553: GenLSP.attempt/4
        (stdlib 6.0) proc_lib.erl:329: :proc_lib.init_p_do_apply/3

@xmyst
Copy link

xmyst commented Aug 15, 2024

@PJUllrich to be fair, your error is clearly different from the OP's one. It might make sense to file a separate issue.

@iampeter
Copy link

Getting the same as @dan-klasson.

@PJUllrich
Copy link

@xmyst it's the same error, just viewed from a different log file. OP showed the error from the LSP's log file whereas mine is from Zed's log file.

@iampeter
Copy link

@mhanberg in the light of the merge of the 3 language servers, what should we expect to happen with this issue? thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants