trunk icon indicating copy to clipboard operation
trunk copied to clipboard

"trunk serve --open" fails to download wasm-bindgen

Open lolitacon2012 opened this issue 2 years ago • 6 comments

When I was trying to run through the yew tutorial here https://yew.rs/ja/docs/tutorial , I encountered the following error when executing trunk serve --open:

Feb 17 22:50:19.451  INFO downloading wasm-bindgen version="0.2.79"
Feb 17 22:51:19.469 ERROR ❌ error
error from HTML pipeline

Caused by:
    0: error from asset pipeline
    1: failed downloading release archive
    2: error sending HTTP request
    3: error sending request for url (https://github.com/rustwasm/wasm-bindgen/releases/download/0.2.79/wasm-bindgen-0.2.79-x86_64-unknown-linux-musl.tar.gz): error trying to connect: dns error: proto error: io error: No such file or directory (os error 2)
    4: error trying to connect: dns error: proto error: io error: No such file or directory (os error 2)
    5: dns error: proto error: io error: No such file or directory (os error 2)
    6: proto error: io error: No such file or directory (os error 2)
Feb 17 22:51:19.469  INFO 📡 serving static assets at -> /
thread 'tokio-runtime-worker' panicked at 'error binding to 0.0.0.0:8080: error creating server listener: No such file or directory (os error 2)', /home/userName/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.14.17/src/server/server.rs:87:17
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Aborted (core dumped)

Seems it can not find https://github.com/rustwasm/wasm-bindgen/releases/download/0.2.79/wasm-bindgen-0.2.79-x86_64-unknown-linux-musl.tar.gz. However I tried to download it directly, it's working fine.

My system: WSL-Ubuntu-20.04

lolitacon2012 avatar Feb 17 '22 14:02 lolitacon2012

Similar when Trunk downloads sass

Feb 19 14:07:10.737 ERROR ❌ error
error from HTML pipeline

Caused by:
    0: error from asset pipeline
    1: failed downloading release archive
    2: error sending HTTP request
    3: error sending request for url (https://github.com/sass/dart-sass/releases/download/1.37.5/dart-sass-1.37.5-linux-x64.tar.gz): connection error: unexpected end of file
    4: connection error: unexpected end of file
    5: unexpected end of file

erihsu avatar Feb 19 '22 06:02 erihsu

Similar when Trunk downloads sass

Feb 19 14:07:10.737 ERROR ❌ error
error from HTML pipeline

Caused by:
    0: error from asset pipeline
    1: failed downloading release archive
    2: error sending HTTP request
    3: error sending request for url (https://github.com/sass/dart-sass/releases/download/1.37.5/dart-sass-1.37.5-linux-x64.tar.gz): connection error: unexpected end of file
    4: connection error: unexpected end of file
    5: unexpected end of file

Finally I mannually download the sass and solve the problem

erihsu avatar Feb 22 '22 13:02 erihsu

I came across exactly the same problem as lolitacon2012 on WSL Ubuntu 18.04. I can download wasm-bindgen gz directly, unzip it and copy the files under a PATH directory, and it works

BurtonQin avatar Mar 01 '22 18:03 BurtonQin

I also had problems with that. I'm using Archlinux with systemd-resolved, which manages DNS differenly (via DBUS). Consequently, my /etc/resolv.conf file was empty. Adding a DNS server like this worked the problem around:

nameserver 8.8.8.8

Also related to #317, trunk cannot handle IPv6 addresses.

Please check your resolv.conf files, that might be the problem, try removing IPv6 addresses, etc. Please bear in mind that resolv.conf might be regenerated upon reboot!

susu avatar Apr 08 '22 20:04 susu

Could you explain in more detail what you did after downloading wasm-bindgen directly?

ghost avatar May 31 '22 09:05 ghost

Same issue with "failed install dart-sass". I installed it manually at my mac by brew install sass/sass/sass. It works

leftstick avatar Jul 08 '22 09:07 leftstick

I also had problems with that. I'm using Archlinux with systemd-resolved, which manages DNS differenly (via DBUS). Consequently, my /etc/resolv.conf file was empty. Adding a DNS server like this worked the problem around:

nameserver 8.8.8.8

Also related to #317, trunk cannot handle IPv6 addresses.

Please check your resolv.conf files, that might be the problem, try removing IPv6 addresses, etc. Please bear in mind that resolv.conf might be regenerated upon reboot!

Totally fixed for me on ubuntu 22.04 (using dnsmasq instead of systemd-resolved), adding a nameserver like @susu did.

aazev avatar Feb 24 '23 20:02 aazev

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Oct 20 '23 00:10 github-actions[bot]

This issue was closed because it has been stalled for 5 days with no activity.

github-actions[bot] avatar Oct 26 '23 00:10 github-actions[bot]