Problem:
I tried to create my first WASM Project with Rust and was following the yew tutorial, when I ran into issues at the step where you're supposed to write trunk serve --open
. When it came to the step of downloading wasm-bindgen it just... didn't do anything. It was stuck there for a solid 20 minutes until it spat out an error. I got a windows firewall popup shortly before. I usually press cancel on those and it never causes any issues, but I assume it might have here. My network was misconfigured so Windows thought it was a public one. Here is the log:
2023-01-27T22:23:41.020077Z INFO starting build
2023-01-27T22:23:41.032045Z INFO spawning asset pipelines
2023-01-27T22:23:41.545398Z INFO building frontend_test
Finished dev [unoptimized + debuginfo] target(s) in 0.66s
2023-01-27T22:23:42.561343Z INFO fetching cargo artifacts
2023-01-27T22:23:43.229764Z INFO processing WASM for frontend_test
2023-01-27T22:23:43.276664Z INFO downloading wasm-bindgen version="0.2.83"
2023-01-27T22:41:45.320856Z 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.83/wasm-bindgen-0.2.83-x86_64-pc-windows-msvc.tar.gz): error trying to connect: dns error: request timed out
4: error trying to connect: dns error: request timed out
5: dns error: request timed out
6: request timed out
2023-01-27T22:41:45.325688Z INFO serving static assets at -> /
2023-01-27T22:41:45.326468Z INFO server listening at http://127.0.0.1:8080
2023-01-27T22:41:45.329381Z INFO starting build
2023-01-27T22:41:45.330883Z INFO spawning asset pipelines
2023-01-27T22:41:46.588554Z INFO building frontend_test
Finished dev [unoptimized + debuginfo] target(s) in 1.07s
2023-01-27T22:41:47.771800Z INFO fetching cargo artifacts
2023-01-27T22:41:48.076489Z INFO processing WASM for frontend_test
2023-01-27T22:41:48.145249Z INFO downloading wasm-bindgen version="0.2.83"
It did finally open a webpage after those 20 minutes, but then it went right back to trying to download wasm-bindgen.
I actually tried the same thing again today and got a different error, weirdly enough
2023-01-28T10:18:56.492305Z INFO starting build
2023-01-28T10:18:56.494544Z INFO spawning asset pipelines
2023-01-28T10:18:56.733116Z INFO building yew-app
Finished dev [unoptimized + debuginfo] target(s) in 0.23s
2023-01-28T10:18:57.068825Z INFO fetching cargo artifacts
2023-01-28T10:18:57.338284Z INFO processing WASM for yew-app
2023-01-28T10:18:57.364685Z INFO downloading wasm-bindgen version="0.2.83"
2023-01-28T10:36:54.440228Z 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.83/wasm-bindgen-0.2.83-x86_64-pc-windows-msvc.tar.gz): error trying to connect: dns error: proto error: io error: An attempt was made to access a socket in a way forbidden by its access permissions. (os error 10013)
4: error trying to connect: dns error: proto error: io error: An attempt was made to access a socket in a way forbidden by its access permissions. (os error 10013)
5: dns error: proto error: io error: An attempt was made to access a socket in a way forbidden by its access permissions. (os error 10013)
6: proto error: io error: An attempt was made to access a socket in a way forbidden by its access permissions. (os error 10013)
2023-01-28T10:36:54.441677Z INFO serving static assets at -> /
2023-01-28T10:36:54.442410Z INFO server listening at http://127.0.0.1:8080
2023-01-28T10:36:54.443619Z INFO starting build
2023-01-28T10:36:54.445409Z INFO spawning asset pipelines
2023-01-28T10:36:54.695740Z INFO building yew-app
Finished dev [unoptimized + debuginfo] target(s) in 0.21s
2023-01-28T10:36:55.009066Z INFO fetching cargo artifacts
2023-01-28T10:36:55.310185Z INFO processing WASM for yew-app
2023-01-28T10:36:55.336558Z INFO downloading wasm-bindgen version="0.2.83"
Both errors seem to be related to online activity though, which makes sense.
What I tried
- Invalidating IDE caches
- Reopening the project
- Changing my firewall settings to allow Trunk access
- Properly setting my network as a private one
- Restarting the pc
- Looking up the error online (I actually found this GitHub Issue, which looks fairly similar, however it did not help.
- Uninstalling and reinstalling Trunk using cargo
- Manually installing wasm-bindgen (it worked, but Trunk still tried downloading it so it ended up being useless)
- Starting a new project and after failure, repeating the above steps again
I also asked someone I know if they could see if it worked for them and after following the yew tutorial mentioned above everything worked great for them. The only difference in the setup was the firewall popup in my case, which again, I presume happened due to Windows thinking my network was public. I do not understand how it doesn't work after changing my firewall settings to allow access and setting my network to be private though.
Any ideas on what I could do?
I know this is more of a Windows 10 issue than a Rust issue, but... I don't think I'll get much help in other places. I'd be quite grateful for any ideas, since this is basically just stopping me from web development with Rust outright.