Skip to content

Using extension in docker devcontainer got stuck downloading haskell language server #501

New issue

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

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

Already on GitHub? # to your account

Closed
k3yzerS0ze opened this issue Nov 16, 2021 · 20 comments
Labels
os: docker status: needs attention type: bug A bug or unintended effect type: setup Issues related with the extension setup, including binaries downloads

Comments

@k3yzerS0ze
Copy link

k3yzerS0ze commented Nov 16, 2021

I am connecting to a haskell docker image but get a message "Downloading haskell-language-server-wrapper". I initially thought it was downloadin but after 24 hours realized something not right.

any ideas? I am able to runhaskell in the terminal

WIndows 10
VSCode 1.62.2

with or without devcontainer.json in my project directory

{
"name" : "haskell",
"images" : "haskell",
"extensions" : "haskell.haskell"
}

@jneira jneira added os: docker type: bug A bug or unintended effect type: setup Issues related with the extension setup, including binaries downloads labels Nov 16, 2021
@jneira
Copy link
Member

jneira commented Nov 16, 2021

have you check if you docker container is able to download the prebuilt binary outside the extension, f.e. using curl https://github.com/haskell/haskell-language-server/releases/download/1.4.0/haskell-language-server-wrapper-Linux.gz?

@k3yzerS0ze
Copy link
Author

actually no... hmm

I get a "you are being redirected"

@k3yzerS0ze k3yzerS0ze changed the title using Haskell Language server connectin to Docker Haskell Language Server : Connecting to Docker Nov 16, 2021
@k3yzerS0ze
Copy link
Author

other extensions install fine ...

@jneira
Copy link
Member

jneira commented Nov 16, 2021

actually no... hmm

I get a "you are being redirected"

hmm i see, use curl -L https://github.com/haskell/haskell-language-server/releases/download/1.4.0/haskell-language-server-wrapper-Linux.gz

@jneira
Copy link
Member

jneira commented Nov 16, 2021

other extensions install fine ...

do you know if any of they are doing http calls as part of the setup process?

@k3yzerS0ze
Copy link
Author

other extensions install fine ...

do you know if any of they are doing http calls as part of the setup process?

not sure but have the following;

  1. Haskell Syntax Highlighting
  2. Code Runner v0.11.6

by the way tried on haskell:9.0.1 and haskell:8.10 with same issue

@k3yzerS0ze
Copy link
Author

actually no... hmm
I get a "you are being redirected"

hmm i see, use curl -L https://github.com/haskell/haskell-language-server/releases/download/1.4.0/haskell-language-server-wrapper-Linux.gz

tried curl -L but for Windows, correct?

curl -L https://github.com/haskell/haskell-language-server/releases/download/1.4.0/haskell-language-server-wrapper-Windows.exe.zip

curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.haxx.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.

@k3yzerS0ze
Copy link
Author

not sure why but getting this now...

curl -L https://github.com/haskell/haskell-language-server/releases/download/1.4.0/haskell-language-server-wrapper-Windows.exe.zip

Warning: Binary output can mess up your terminal. Use "--output -" to tell
Warning: curl to output it to your terminal anyway, or consider "--output
Warning: " to save to a file.

@jneira
Copy link
Member

jneira commented Nov 16, 2021

tried curl -L but for Windows, correct?

Ii assumed you were running linux inside the docker image, does not images: haskell refers to https://github.com/microsoft/vscode-dev-containers/tree/main/containers/haskell? that one is running linux

not sure why but getting this now...

If you get that warning is it has reached the url. So the extension should be able to download it. Could collect the logs as described here: https://github.com/haskell/vscode-haskell#investigating-and-reporting-problems and post them?

@k3yzerS0ze
Copy link
Author

results of logs...

[client][INFO] Searching for server executables haskell-language-server-wrapper,haskell-language-server in $PATH
[client][INFO] Downloading haskell-language-server
[client][INFO] Fetching the latest release from GitHub or from cache
[client][INFO] The latest release is 1.4.0
[client][INFO] Figure out the ghc version to use or advertise an installation link for missing components
[client][INFO] Working out the project GHC version. This might take a while...

@jneira
Copy link
Member

jneira commented Nov 16, 2021

Hmm it should take a while but terminate 😄

I dont have a devcontainer setup at hand to try to reproduce, sorry.
However i would try to have the project prebuilt through the shell (with cabal or stack) before opening it in vscode. Trying to build it may help to discover the cause of the hang (as the extension has to trigger a build to get the ghc version of the project)

@k3yzerS0ze
Copy link
Author

tried on linux with no issue.
I am closing as I suspect something funny on my work laptop.

@jneira
Copy link
Member

jneira commented Nov 17, 2021

tried on linux with no issue. I am closing as I suspect something funny on my work laptop.

Nice! Happy to see the devcontainer setup works, at least in some envs. Will try to setup a devcontainer env in my windows laptop to check it works.

@hoosainmadhi
Copy link

@jneira I am attaching to the haskell container but as root. How do I do so as non-root?

@jneira
Copy link
Member

jneira commented Nov 17, 2021

@jneira I am attaching to the haskell container but as root. How do I do so as non-root?

sorry cant help much with devcontainers until i get an env to try it, maybe @k3yzerS0ze will know how?

@k3yzerS0ze
Copy link
Author

k3yzerS0ze commented Nov 18, 2021

after installing ghc 8.10.7 using choco on my local Windows 10 I am getting the similar issue as the docker...

i get the following msg:
Downloading haskell-language-server 1.5.0 for GHC 8.10.7
nothing downloads

@k3yzerS0ze k3yzerS0ze reopened this Nov 18, 2021
@k3yzerS0ze
Copy link
Author

never mind ... rebooted and all working as expected.

@jneira
Copy link
Member

jneira commented Nov 18, 2021

hmm just i tried in my windows machine and it worked 😅

@k3yzerS0ze
Copy link
Author

k3yzerS0ze commented Nov 18, 2021

so this still leaves us with the docker image issue... I initially suspected something funny on my work laptop that prevented me from downloading (firewalls etc) ... Hmm

going to leave open until someone proof otherwise.

@k3yzerS0ze k3yzerS0ze reopened this Nov 18, 2021
@jneira jneira changed the title Haskell Language Server : Connecting to Docker Using extension in docker devcontainer got stuck downloading haskell language server Nov 18, 2021
@fendor
Copy link
Collaborator

fendor commented May 9, 2024

We switched to ghcup for downloading HLS, so this issue is stale by now.

@fendor fendor closed this as completed May 9, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
os: docker status: needs attention type: bug A bug or unintended effect type: setup Issues related with the extension setup, including binaries downloads
Projects
None yet
Development

No branches or pull requests

4 participants