deislabs / yo-wasm

Yeoman generator for Rust projects intended to build to WASM in OCI registries
Other
63 stars 10 forks source link

Unclear error message when yo wasm fails to publish #41

Closed carolynvs closed 3 years ago

carolynvs commented 3 years ago

It's not clear what to do or troubleshoot when yo wasm fails to publish.

$ yo wasm
? What is the name of the WASM module? hello
? What type of application is the module? Web service or application using WAGI
? What is the name of the author? carolynvs
? What programming language will you write the module in? Rust
? Where do you plan to publish the module? Hippo
? What is the URL of your Hippo service? HIPPO_SERVICE_URL=https://localhost:5001
? What is the URL of your Hippo's Bindle server? http://localhost:8080/v1/
? Would you like to create a new Hippo application for this project? Yes
? What storage ID (bindle name) would you like for your Hippo app? carolynvs/hello
? Enter your Hippo user name (will become app owner) admin
? Enter your Hippo password *********
   create .gitignore
   create Cargo.toml
   create HIPPOFACTS
   create LICENSE
   create README.md
   create .cargo/config.toml
   create .vscode/extensions.json
   create .vscode/launch.json
   create .vscode/settings.json
   create .vscode/tasks.json
   create src/main.rs
   create .github/workflows/build.yml
   create .github/workflows/release.yml

Created project and GitHub workflows

Setting up your Hippo application...
Setup failed! You will need to create the Hippo app manually.
The error was: Error: connect ECONNREFUSED 127.0.0.1:80

I can see it tried to contact localhost:80 but ... I never configured that so I don't know where it got it from. If it's possible to add more context into the error message that would really help with this error.

carolynvs commented 3 years ago

Oops, just realized that this is a duplicate of the problem from #39. When there is a problem parsing the URL provided, it seems to quietly default to 127.0.0.1:80 instead of yelling at me.

itowlson commented 3 years ago

Yikes. Definitely time for a big error handling pass - this has been a neglected area I'm afraid. Thanks!