trunk icon indicating copy to clipboard operation
trunk copied to clipboard

trunk build/serve fail at fetching cargo artifacts when internet access is via an http proxy

Open godeater opened this issue 3 years ago • 1 comments

Hi there,

I have searched to see if anyone else has reported a similar problem - so forgive me if I've still somehow managed to miss a related case.

I've been trying to use trunk on my work machine, a Windows 10 box - and I've tried both via WSL2 (my preferred dev environment) and native windows builds - and both seem to be failing during the attempt to pull down the cargo artifacts to build the project. Note that running cargo build works fine - so it would seem cargo itself is happy with my HTTP proxy configuration.

What I see is this (in both environments, either WSL2, or native windows) :

source/rust/rust-frontend-example-yew on  master ? is 📦 v0.1.0 via 🦀 v1.54.0 🕙[ 08:14:18 ]✗ trunk -v build Sep 07 08:14:26.644 INFO 📦 starting build Sep 07 08:14:26.645 INFO spawning asset pipelines Sep 07 08:14:26.762 INFO building rust-frontend-example-yew Finished dev [unoptimized + debuginfo] target(s) in 0.03s Sep 07 08:14:26.880 INFO fetching cargo artifacts Sep 07 08:14:27.004 ERROR ❌ error error from HTML pipeline

Caused by: 0: error from asset pipeline 1: could not find WASM output after cargo build Error: error from HTML pipeline

Caused by: 0: error from asset pipeline 1: could not find WASM output after cargo build

Have I done something obviously stupid here? On inspecting the documentation around the proxy support in Trunk itself, I think I'm right in thinking this is to proxy requests coming through trunk itself to some backend system, and isn't anything to do with the build pipeline? Or am I wrong there?

godeater avatar Sep 07 '21 07:09 godeater

Hello!

Saw you had this a issue a month ago, but I saw this part: "source/rust/rust-frontend-example-yew".

I've been stuck on the "finally running the tutorial" step myself for some time today, but got it working now!

Switched from native windows to WSL2 first.

Then looked through this: wasm-bingen-cli issue 30 discussion (though this works fine on stable for me, so no need for that nightly) which lead to: rustup toolchain install stable-x86_64-unknown-linux-gnu and, cargo install wasm-bindgen-cli --version 0.2.78

and then the error shifted to "wasm-bindgen call returned a bad status" so: having that, 0.2.78, version specifically in Cargo.toml and, NOT having a version in Trunk.toml and, then seeing this: wasm-pack template enforcing the tutorial's setup I installed wasm-pack

and then it worked!

DataScienceLeadJr avatar Oct 13 '21 17:10 DataScienceLeadJr

About two and half year later: @godeater for which reason should this issue be left open?

stappersg avatar Mar 20 '23 18:03 stappersg

I gave up with it, so I guess you can close it.

godeater avatar Mar 20 '23 21:03 godeater