gleam: Error sending request for url (https://repo.hex.pm/packages/gleeunit)

This is most likely a local issue, but I haven’t been able to get things to work due to some networking issue:

$ gleam --version
gleam 1.0.0
$ erl -version
Erlang (SMP,ASYNC_THREADS) (BEAM) emulator version 14.2.3

$ gleam new vars
$ cd vars
$ gleam run
  Resolving versions
error: Dependency resolution failed

An error occurred while determining what dependency packages and
versions should be downloaded.
The error from the version resolver library was:

Unable to determine package versions: error sending request for url
(https://repo.hex.pm/packages/gleeunit): error trying to connect: dns
error: failed to lookup address information: Name does not resolve

$ curl https://repo.hex.pm/packages/gleeunit -o out
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1822  100  1822    0     0   3884      0 --:--:-- --:--:-- --:--:--  3876

So I can download the file from hex using curl just fine, but gleam run runs into a DNS error.

(note: both gleam and erlang are installed using ASDF on WSL2/Ubuntu)

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Reactions: 1
  • Comments: 19 (17 by maintainers)

Most upvoted comments

@lpil yes using the precompiled binary. It happens quite often, I usually need to run the command several times until eventually it succeeds. I thought the hex server was timing out, but by putting the url in the browser I get an immediate response. I don’t think there is anything interesting about my network. I will try to investigate a bit more what is going on.

This just got even weirder. I was testing a local build today and when I did ~/.cargo/bin/gleam deps update it worked! I didn’t realize this though.

Later when I wanted to compare my build with the one from package manager, I found out the same error is still occuring.

So then I downloaded the gleam binary from github releases and still the error persists. But the local build works!

I’ve just tried adjusting our HTTP client. Tomorrow or later would you be able to download the nightly build and see if it works? Thank you