Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP component sources do not work on Windows #2112

Closed
itowlson opened this issue Nov 24, 2023 · 4 comments · Fixed by #2159
Closed

HTTP component sources do not work on Windows #2112

itowlson opened this issue Nov 24, 2023 · 4 comments · Fixed by #2159
Assignees
Milestone

Comments

@itowlson
Copy link
Contributor

I ran into this while trying to repro #2111. The static-fileserver template uses a HTTP reference to the fileserver Wasm. On Windows, spin up fails because it is unable to persist the downloaded Wasm file. The error is "failed to persist temporary file path: The parameter is incorrect. (os error 87)" and the location is loader/src/http.rs line 41, temp_path.persist_noclobber.

My guess is that Windows dislikes the colon in file names such as C:\Users\ivan\AppData\Local\spin\registry\wasm\sha256:5f05b15f0f7cd353d390bc5ebffec7fe25c6a6d7a05b9366c86dcb1a346e9f0f but I haven't confirmed that.

@david-wallace-croft
Copy link

david-wallace-croft commented Nov 30, 2023

I am seeing this on Windows as well. I am using Git Bash for Windows.

I am doing this as a workaround:
spin.toml: source = "../spin-fileserver/target/wasm32-wasi/release/spin_static_fs.wasm"

I then get another error which I can solve by either doing this:
spin up --direct-mounts

Or this:
mkdir -p temp/assets/test0 (test0 is the name of my component for the static file server)
cp assets/* temp/assets/test0/
spin up --temp temp

But I cannot do a spin deploy, even with these workarounds:
Caused by:
0: Failed to load component test0
1: Couldn't resolve C:\Users\David\AppData\Local\Temp\.tmp2HWtYd\test0
2: The system cannot find the file specified. (os error 2)

@itowlson
Copy link
Contributor Author

@david-wallace-croft Sorry for not replying earlier. I think once we fix this and #2111 that should sort out the deploy problem. I'm afraid that for now the only workaround for deployment may be to use WSL2, which I appreciate is rather disruptive. I am hoping to look at these this week.

@david-wallace-croft
Copy link

@itowlson I am able to deploy for the Advent of Spin 2023 submissions by using GitHub CodeSpaces. I made some notes about my setup here:
https://github.com/david-wallace-croft/advent-of-spin

@itowlson
Copy link
Contributor Author

Oh, I'm relieved to hear that! And thanks for sharing your setup!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants