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

wasmer run {url} interprets c:// file paths as URLs on Windows #3366

Closed
lt-gerjan opened this issue Nov 24, 2022 · 1 comment · Fixed by #3370
Closed

wasmer run {url} interprets c:// file paths as URLs on Windows #3366

lt-gerjan opened this issue Nov 24, 2022 · 1 comment · Fixed by #3370
Labels
bug Something isn't working

Comments

@lt-gerjan
Copy link

Describe the bug

I get the following error:

>  wapm run cowsay
error: error fetching c:\Users\username\wapm_packages\syrusakbary/[email protected]\target/wasm32-wasi/release/cowsay.wasm: get_webc_bytes failed
> wasmer -V
wasmer 3.0.1

Steps to reproduce

Run above command on Windows

Expected behavior

Output from cowsay

Actual behavior

Error, see above

@lt-gerjan lt-gerjan added the bug Something isn't working label Nov 24, 2022
@fschutt
Copy link
Contributor

fschutt commented Nov 24, 2022

I could reproduce this, it seems that this was a bug from the migration from wapm run to wasmer run: wapm run creates a file cowsay.cmd in ~/wapm_packages/.bin with the content:

@"wapm" run cowsay %*

When the command is executed, wasmer will be invoked with the path to the file, and for some reason it interprets the file path as a Url. This seems to only happen on Windows because Windows file paths start with C://, which gets parsed into a Url like http://. So it will try to fetch the file from the network and fail at that.

As a workaround wasmer run cowsay does work, even though there is some output that shouldn't happen.

@fschutt fschutt changed the title Error: get_webc_bytes failed wasmer run {url} interprets c:// file paths as URLs on Windows Nov 24, 2022
bors bot added a commit that referenced this issue Nov 25, 2022
3370: Fix wasmer run not interpreting URLs correctly + display fixes r=fschutt a=fschutt

Fixes #3366.
Fixes #3346.

Should land in the 3.0.2 release.

Co-authored-by: Felix Schütt <[email protected]>
Co-authored-by: Felix Schütt <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants