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

Cannot Create New Wasm Pack Project #1266

Closed
seanaye opened this issue Apr 1, 2023 · 16 comments · Fixed by #1285
Closed

Cannot Create New Wasm Pack Project #1266

seanaye opened this issue Apr 1, 2023 · 16 comments · Fixed by #1285

Comments

@seanaye
Copy link

seanaye commented Apr 1, 2023

🐛 Bug description

wasm-pack --version
> wasm-pack 0.11.0

wasm-pack new hello-world

>Error: expected value at line 1 column 1
>Caused by: expected value at line 1 column 1

🤔 Expected Behavior

Should create new project in current directory

👟 Steps to reproduce

I tried to update wasm-pack via cargo
cargo install wasm-pack
realized the install was broken, then uninstalled and re-installed via the install script
cargo uninstall wasm-pack
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
This gave me the above error

🌍 Your environment

Include the relevant details of your environment.
wasm-pack version: see above
rustc version: rustc 1.69.0-nightly (246eae2fa 2023-02-21)

@wolkenmachine
Copy link

I'm hitting the same issue. Updated wasm-pack using:
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh

error:

> wasm-pack new hello-world
Error: expected value at line 1 column 1
Caused by: expected value at line 1 column 1

@unti1x
Copy link

unti1x commented Apr 8, 2023

Confirm. wasm-pack v0.11.0 doesn't work, downgrading to 0.10.3 helped

@Dueen
Copy link

Dueen commented Apr 10, 2023

Issue confirmed: Creating new project not working on M1 Macbook.

@orhun
Copy link

orhun commented Apr 12, 2023

Related: #1245

@alikulaOwen
Copy link

The fix doesn't work for my Macbook pro m2 any other fixes?

@LeviticusNelson
Copy link
Contributor

LeviticusNelson commented May 12, 2023

It might have to do with a bad get request to https://crates.io/api/v1/crates/cargo-generate at Krate::new:

We require that all requests include a `User-Agent` header.  To allow us to determine the impact your bot has on our service, we ask that your user agent actually identify your bot, and not just report the HTTP client library you're using.  Including contact information will also reduce the chance that we will need to take action against your bot.

Bad:
  User-Agent: reqwest/0.9.1

Better:
  User-Agent: my_crawler

Best:
  User-Agent: my_crawler (my_crawler.com/info)
  User-Agent: my_crawler (help@my_crawler.com)

If you believe you've received this message in error, please email help@crates.io and include the request id 53cdcda1-0ea7-4acd-9673-45da30071f07.

@LeviticusNelson
Copy link
Contributor

It might have to do with a bad get request to https://crates.io/api/v1/crates/cargo-generate at Krate::new:

We require that all requests include a `User-Agent` header.  To allow us to determine the impact your bot has on our service, we ask that your user agent actually identify your bot, and not just report the HTTP client library you're using.  Including contact information will also reduce the chance that we will need to take action against your bot.

Bad:
  User-Agent: reqwest/0.9.1

Better:
  User-Agent: my_crawler

Best:
  User-Agent: my_crawler (my_crawler.com/info)
  User-Agent: my_crawler (help@my_crawler.com)

If you believe you've received this message in error, please email help@crates.io and include the request id 53cdcda1-0ea7-4acd-9673-45da30071f07.

I added a User-Agent header and now I get this as an error:

dyld[77274]: Library not loaded: /usr/local/opt/openssl@1.1/lib/libssl.1.1.dylib
  Referenced from: <9670E1DF-008C-328F-B608-CDADE7311C0A> /Users/levi/.cargo/bin/cargo-generate
  Reason: tried: '/usr/local/opt/openssl@1.1/lib/libssl.1.1.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/openssl@1.1/lib/libssl.1.1.dylib' (no such file), '/usr/local/opt/openssl@1.1/lib/libssl.1.1.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/Users/levi/wasm-pack/target/debug/build/bzip2-sys-e4c1951e741fbbdc/out/lib/libssl.1.1.dylib' (no such file), '/Users/levi/wasm-pack/target/debug/build/openssl-sys-ec0a95688bf13e99/out/openssl-build/install/lib/libssl.1.1.dylib' (no such file), '/Users/levi/wasm-pack/target/debug/build/zstd-sys-dbc8793556ebaa34/out/libssl.1.1.dylib' (no such file), '/Users/levi/wasm-pack/target/debug/deps/libssl.1.1.dylib' (no such file), '/Users/levi/wasm-pack/target/debug/libssl.1.1.dylib' (no such file), '/opt/homebrew/Cellar/rust/1.69.0/lib/rustlib/aarch64-apple-darwin/lib/libssl.1.1.dylib' (no such file), '/Users/levi/lib/libssl.1.1.dylib' (no such file), '/usr/local/lib/libssl.1.1.dylib' (no such file), '/usr/lib/libssl.1.1.dylib' (no such file, not in dyld cache), '/opt/homebrew/Cellar/openssl@1.1/1.1.1t/lib/libssl.1.1.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/openssl@1.1/1.1.1t/lib/libssl.1.1.dylib' (no such file), '/opt/homebrew/Cellar/openssl@1.1/1.1.1t/lib/libssl.1.1.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/Users/levi/wasm-pack/target/debug/build/bzip2-sys-e4c1951e741fbbdc/out/lib/libssl.1.1.dylib' (no such file), '/Users/levi/wasm-pack/target/debug/build/openssl-sys-ec0a95688bf13e99/out/openssl-build/install/lib/libssl.1.1.dylib' (no such file), '/Users/levi/wasm-pack/target/debug/build/zstd-sys-dbc8793556ebaa34/out/libssl.1.1.dylib' (no such file), '/Users/levi/wasm-pack/target/debug/deps/libssl.1.1.dylib' (no such file), '/Users/levi/wasm-pack/target/debug/libssl.1.1.dylib' (no such file), '/opt/homebrew/Cellar/rust/1.69.0/lib/rustlib/aarch64-apple-darwin/lib/libssl.1.1.dylib' (no such file), '/Users/levi/lib/libssl.1.1.dylib' (no such file), '/usr/local/lib/libssl.1.1.dylib' (no such file), '/usr/lib/libssl.1.1.dylib' (no such file, not in dyld cache)
Error: failed to execute `cargo-generate`: exited with signal: 6 (SIGABRT)
  full command: "/Users/levi/.cargo/bin/cargo-generate" "--version"
Caused by: failed to execute `cargo-generate`: exited with signal: 6 (SIGABRT)
  full command: "/Users/levi/.cargo/bin/cargo-generate" "--version"

@LeviticusNelson
Copy link
Contributor

It might have to do with a bad get request to https://crates.io/api/v1/crates/cargo-generate at Krate::new:

We require that all requests include a `User-Agent` header.  To allow us to determine the impact your bot has on our service, we ask that your user agent actually identify your bot, and not just report the HTTP client library you're using.  Including contact information will also reduce the chance that we will need to take action against your bot.

Bad:
  User-Agent: reqwest/0.9.1

Better:
  User-Agent: my_crawler

Best:
  User-Agent: my_crawler (my_crawler.com/info)
  User-Agent: my_crawler (help@my_crawler.com)

If you believe you've received this message in error, please email help@crates.io and include the request id 53cdcda1-0ea7-4acd-9673-45da30071f07.

I added a User-Agent header and now I get this as an error:

dyld[77274]: Library not loaded: /usr/local/opt/openssl@1.1/lib/libssl.1.1.dylib
  Referenced from: <9670E1DF-008C-328F-B608-CDADE7311C0A> /Users/levi/.cargo/bin/cargo-generate
  Reason: tried: '/usr/local/opt/openssl@1.1/lib/libssl.1.1.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/openssl@1.1/lib/libssl.1.1.dylib' (no such file), '/usr/local/opt/openssl@1.1/lib/libssl.1.1.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/Users/levi/wasm-pack/target/debug/build/bzip2-sys-e4c1951e741fbbdc/out/lib/libssl.1.1.dylib' (no such file), '/Users/levi/wasm-pack/target/debug/build/openssl-sys-ec0a95688bf13e99/out/openssl-build/install/lib/libssl.1.1.dylib' (no such file), '/Users/levi/wasm-pack/target/debug/build/zstd-sys-dbc8793556ebaa34/out/libssl.1.1.dylib' (no such file), '/Users/levi/wasm-pack/target/debug/deps/libssl.1.1.dylib' (no such file), '/Users/levi/wasm-pack/target/debug/libssl.1.1.dylib' (no such file), '/opt/homebrew/Cellar/rust/1.69.0/lib/rustlib/aarch64-apple-darwin/lib/libssl.1.1.dylib' (no such file), '/Users/levi/lib/libssl.1.1.dylib' (no such file), '/usr/local/lib/libssl.1.1.dylib' (no such file), '/usr/lib/libssl.1.1.dylib' (no such file, not in dyld cache), '/opt/homebrew/Cellar/openssl@1.1/1.1.1t/lib/libssl.1.1.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/openssl@1.1/1.1.1t/lib/libssl.1.1.dylib' (no such file), '/opt/homebrew/Cellar/openssl@1.1/1.1.1t/lib/libssl.1.1.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/Users/levi/wasm-pack/target/debug/build/bzip2-sys-e4c1951e741fbbdc/out/lib/libssl.1.1.dylib' (no such file), '/Users/levi/wasm-pack/target/debug/build/openssl-sys-ec0a95688bf13e99/out/openssl-build/install/lib/libssl.1.1.dylib' (no such file), '/Users/levi/wasm-pack/target/debug/build/zstd-sys-dbc8793556ebaa34/out/libssl.1.1.dylib' (no such file), '/Users/levi/wasm-pack/target/debug/deps/libssl.1.1.dylib' (no such file), '/Users/levi/wasm-pack/target/debug/libssl.1.1.dylib' (no such file), '/opt/homebrew/Cellar/rust/1.69.0/lib/rustlib/aarch64-apple-darwin/lib/libssl.1.1.dylib' (no such file), '/Users/levi/lib/libssl.1.1.dylib' (no such file), '/usr/local/lib/libssl.1.1.dylib' (no such file), '/usr/lib/libssl.1.1.dylib' (no such file, not in dyld cache)
Error: failed to execute `cargo-generate`: exited with signal: 6 (SIGABRT)
  full command: "/Users/levi/.cargo/bin/cargo-generate" "--version"
Caused by: failed to execute `cargo-generate`: exited with signal: 6 (SIGABRT)
  full command: "/Users/levi/.cargo/bin/cargo-generate" "--version"

Update: I reinstalled cargo-generate -> cargo uninstall cargo-generate && cargo install cargo-generate and it works fine now. Still needed USER-AGENT, so I can create a PR

@drager
Copy link
Member

drager commented May 14, 2023

Hmm, I haven't seen this issue myself... Does it work fine in 0.11.1?

@LeviticusNelson
Copy link
Contributor

LeviticusNelson commented May 15, 2023

@drager When I added the header for 0.11.1, it worked, but was giving me errors when there was no USER-AGENT header.

@ben-xD
Copy link

ben-xD commented May 28, 2023

I've just tested it on 0.11.1, and I get

$ wasm-pack new hello-wasm
Error: expected value at line 1 column 1
Caused by: expected value at line 1 column 1

version

$ wasm-pack --version
wasm-pack 0.11.1

cc: @orhun since he said 0.11.1 fixes it in #1245 (comment):

This is magically fixed in 0.11.1, maybe it was related to #1254

@orhun
Copy link

orhun commented May 28, 2023

Yeah, it is still a mystery to me how it stopped working and start working again. Somebody need to dive deeper into this.

@drager
Copy link
Member

drager commented May 29, 2023

I just merged #1285. Please try out latest master and see if that works for you @ben-xD @orhun

@drager drager reopened this May 29, 2023
@ben-xD
Copy link

ben-xD commented May 29, 2023

It's working on master, thanks @drager 🙏

@clbarnes
Copy link

clbarnes commented Jun 9, 2023

Could releasing this fix be prioritised, if only as a patch release on top of the previous release without any other recent additions? Older wasm-pack versions raise a warning if an older version is used so at present we're just funnelling users into a completely broken state.

@drager
Copy link
Member

drager commented Jun 17, 2023

Could releasing this fix be prioritised, if only as a patch release on top of the previous release without any other recent additions? Older wasm-pack versions raise a warning if an older version is used so at present we're just funnelling users into a completely broken state.

Released in v0.12.0

@drager drager closed this as completed Jun 17, 2023
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.

10 participants