Skip to content

Running examples results in "Undefined" #1094

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

Closed
jackcmay opened this issue Jul 30, 2018 · 3 comments
Closed

Running examples results in "Undefined" #1094

jackcmay opened this issue Jul 30, 2018 · 3 comments

Comments

@jackcmay
Copy link

jackcmay commented Jul 30, 2018

When attempting to run any of the rust-by-example examples the only output generated is the string "Undefined". The example on the rust home page works and the rust playground works.

Tried on safari and firefox with macos Yosemite.

@Arnavion
Copy link

Arnavion commented Jul 30, 2018

Playground responds with HTTP 500 {"error":"Unable to deserialize request: Can't parse body to the struct"} because it's missing a backtrace: false property in the POST body. Adding that to the params object used in fetch() makes it work.

The parameter was added recently in rust-lang/rust-playground#364

https://github.com/rust-lang-nursery/mdBook/blob/d87e77ed/src/theme/book.js#L112-L119 needs to be updated, or playground needs to mark that with #[serde(default)]

cc @shepmaster

@frewsxcv
Copy link
Member

Relevant issues: rust-lang/mdBook#751 rust-lang/rust#52871

@Arnavion
Copy link

Arnavion commented Aug 2, 2018

Playground made the parameter optional to unbreak existing docs, and mdBook has updated to use the proper endpoint for new docs, so this can be closed now.

@jackcmay jackcmay closed this as completed Aug 8, 2018
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

No branches or pull requests

3 participants