wrangler-legacy icon indicating copy to clipboard operation
wrangler-legacy copied to clipboard

'wrangler generate' fails to connect to server on WSL 2

Open Ptomerty opened this issue 5 years ago • 8 comments
trafficstars

Environment

  • operating system: Ubuntu 20.04 (WSL 2), running on Windows 10 2004 build 19041.572
  • output of rustc -V: rustc 1.47.0 (18bf6b4f0 2020-10-07)
  • output of node -v: v14.9.0
  • output of wrangler -V: 👷 ✨ wrangler 1.11.0
  • contents of wrangler.toml: N/A

Steps to reproduce

After installing wrangler, create a new directory and run wrangler generate. The command will hang on ⬇️ Installing cargo-generate v0.5.0... and eventually exit with an error:

Error: could not download `cargo-generate`
failed to download from https://workers.cloudflare.com/get-binary/ashleygwilliams/cargo-generate/v0.5.0/x86_64-unknown-linux-musl.tar.gz

Visiting the link directly through cURL works fine.

I've tried downloading the wrangler binary directly from GitHub releases, as well as installing through npm and cargo on two different machines, with no luck.

What did you expect to see?

A correctly generated project.

What did you see instead?

An error stating that the site could not be found.

Ptomerty avatar Oct 23 '20 23:10 Ptomerty

I'm experiencing the same on WSL2 (Ubuntu 20.04).

mikkokotila avatar Dec 28 '20 22:12 mikkokotila

Not just on WSL, it's also happening for me on Ubuntu 20.04. I don't have that error but the ⬇️ Installing cargo-generate v0.5.0... is taking forever. The maximum duration I've waited is ~10 minutes and nothing happens, it just stuck there.

I'm sure it's not because of the network speed, I have a fine internet.

frencojobs avatar Dec 29 '20 15:12 frencojobs

Experiencing the same on Windows 10, running in WSL2 via Ubuntu 20.04.

Running wrangler generate test results in:

➜ wrangler generate test
 Creating project called `test`...
warning: spurious network error (2 tries remaining): failed to mmap. Could not write data: Permission denied; class=Os (2)
warning: spurious network error (1 tries remaining): failed to mmap. Could not write data: Permission denied; class=Os (2)
Error:  Git Error: failed to clone into: /mnt/c/Users/user/Projects/project/packages/testflJcSe
Error: tried running command:
/home/user/.cache/.wrangler/cargo-generate-0.5.0/cargo-generate generate --git https://github.com/cloudflare/worker-template --name test --force
exited with exit code: 1

Creating a ~/.cargo/config.toml configuration and setting net.git-fetch-with-cli=true does not seem to work.

➜ node -v
v12.21.0
➜ npm -v
7.6.2
➜ wrangler --version
1.15.0

thasmo avatar Mar 10 '21 15:03 thasmo

Same issue here, wrangler login, config, etc. failed on a fresh install WSL2 Ubuntu 18 LTS, node 14 LTS, npm 6.14.11, and wrangler 1.15.0

RicardoViteriR avatar Apr 02 '21 23:04 RicardoViteriR

Same here I've gone through the authentication, but stuck on the Waiting for API token

jameswoodley avatar Apr 30 '21 15:04 jameswoodley

I had the same problem inside a node:14-slim Docker container when I tried to run `wrangler generate

failed to download from https://workers.cloudflare.com/get-binary/ashleygwilliams/cargo-generate/v0.5.0/x86_64-unknown-linux-musl.tar.gz

I installed the curl package to try to connect to the URL and curl worked. I tried the wrangler generate command again it worked. Does something use curl underneath?

grahamlyons avatar Oct 09 '21 21:10 grahamlyons

same issue, WSL2

snird avatar Oct 10 '21 00:10 snird

me too

roja avatar Oct 21 '21 16:10 roja

👋 Thanks for reporting this issue! Wrangler v1 is now deprecated and support is only being provided for critical updates or security concerns. As such, we are closing this issue.

New versions of Wrangler are maintained in the workers-sdk repo. If you are running into a similar issue with wrangler v2, please report it in the workers-sdk repo. For more info about wrangler v1 deprecation, please check out our blog post.

mrbbot avatar Feb 27 '23 16:02 mrbbot