omnisharp-emacs
omnisharp-emacs copied to clipboard
Error communicating to the OmniSharpServer (OSX)
I'm having the following error when opening a .cs file:
Error from syntax checker csharp-omnisharp-curl-semantic-errors: Wrong type argument: listp, "Error communicating to the OmniSharpServer instance"
Maybe there is a way I can output the curl command omnisharp-emacs tries to do to find out where the problem comes from?
try (setq omnisharp-debug t) . This logs the curl command to an output window.
You can also start the server with -v Verbose to log incoming and outgoing requests. If you can't figure out what might be wrong, you can post some output here and we'll take a look.
On 03/16/2015 01:50 PM, Jason Imison wrote:
try (setq omnisharp-debug t) . This logs the curl command to an output window.
— Reply to this email directly or view it on GitHub https://github.com/OmniSharp/omnisharp-emacs/issues/154#issuecomment-81602134.
It's doing this call: curl --ipv4 --silent -H "Content-type: application/json" --data null http://localhost:2000/checkalivestatus
And apparently tries to parse it as JSON (I'm getting "omnisharp--json-read-from-string error"), but the Ensime server just returns "true".
➜ wroom git:(exp) ✗ curl --ipv4 --silent -H "Content-type: application/json" --data null http://localhost:2000/checkalivestatus -v
- Hostname was NOT found in DNS cache
- Trying 127.0.0.1...
- Connected to localhost (127.0.0.1) port 2000 (#0)
POST /checkalivestatus HTTP/1.1 User-Agent: curl/7.37.1 Host: localhost:2000 Accept: / Content-type: application/json Content-Length: 4
- upload completely sent off: 4 out of 4 bytes < HTTP/1.1 200 OK < Content-Type: application/json; charset=utf-8
- Server Mono-HTTPAPI/1.0 is not blacklisted < Server: Mono-HTTPAPI/1.0 < Date: Mon, 16 Mar 2015 12:50:24 GMT < Transfer-Encoding: chunked < Keep-Alive: timeout=15,max=100 <
- Connection #0 to host localhost left intact true%
Does this occur if you call omnisharp-check-alive-status manually?
I get this error (or a similar one) as well, but not when I start OmniSharpServer externally. When calling omnisharp-check-alive-status manually it will still error and hang, but if I mash C-G enough I can break it out of the hang and subsequent omnisharp-check-alive-status calls report success.
Here's the omnisharp-debug buffer output:
2015-04-22T04:04:24-0400
(:command "curl" :arguments ("--ipv4" "--silent" "-H" "Content-type: application/json" "--data" "null" "http://localhost:2000/checkalivestatus"))
2015-04-22T04:04:24-0400
omnisharp--json-read-from-string error: ""
2015-04-22T04:04:41-0400
(:command "curl" :arguments ("--ipv4" "--silent" "-H" "Content-type: application/json" "--data" "null" "http://localhost:2000/checkalivestatus"))
I'm getting the same error, too. But if the first line of the .cs file I open is empty it's fine for some reason.
I'm also experiencing the same issue. Although whenever the next request is sent, there is no issue, only with the initial opening of a *.cs file.
Same error message. The autocompletion works for me, only get the issue when using omnisharp-unit-test-worker