spin: Invalid discriminant for `option`
Hey all, Just tried spin out for the first time and tried to build the hello-rust example and I’m running into the following situation:
Expected Behavior
HTTP/1.1 200 OK
foo: bar
content-length: 15
Hello, Fermyon!
Steps to Reproduce the Problem
- Follow installation guide using cargo
- Build new project using: spin new http-rust spin-hello-world
- Run: spin build --up
- Make a request with: curl -i localhost:3000/hello
Actual Behavior
I get a response of:
HTTP/1.1 500 Internal Server Error
content-length: 0
With a log of:
ERROR spin_http_engine: Error processing request: invalid discriminant for `option`
Specifications
- Version: 0.3.0
- Platform: Intel Mac running MacOS 12.4
As I said this is the first time I’ve built spin so not sure where to debug this
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 18 (12 by maintainers)
Commits related to this issue
- doc(quickstart): specify tag in `git clone` command Per #615, the HEAD of the main branch of the repo is not guaranteed to be compatible with the most recent SDK release, so it's better to have users... — committed to dicej/spin by dicej 2 years ago
- doc(quickstart): specify tag in `git clone` command Per #615, the HEAD of the main branch of the repo is not guaranteed to be compatible with the most recent SDK release, so it's better to have users... — committed to miketang84/spin by dicej 2 years ago
@gmlewis: Please try the following:
That should ensure you have the correct Spin version and compatible templates. Then, in another terminal:
Probably the best approach here is to use the latest release rather than the HEAD of the Git repo, e.g.
git checkout v0.3.0
. I’m going to open a PR shortly to change the quickstart instructions to use the tag. I’ll also open a new issue for adding an explicit version check to the SDK so we can provide an informative error in cases like this.