yewstack / yew

Rust / Wasm framework for creating reliable and efficient web applications

Home Page:https://yew.rs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Yew Playground API returns 500 Server Error on the example code

adrian-golawski opened this issue · comments

Problem
The Yew Playground website linked in the documentation does not work. Example code breaks the API.

The generated example code on the website looks like this:

use yew::prelude::*;

#[function_component]
fn App() -> Html {
    html! { "hello world" }
}

fn main() {
    yew::Renderer::<App>::new().render();
}

Upon clicking Run button, the following request is sent:

GET https://api.play.yew.rs/api/run?code={<escaped example code here>}

Request returns Internal Server Error 500:

failed to deserialize bson: invalid element type: 117

Steps To Reproduce
Steps to reproduce the behavior:

  1. Go to https://play.yew.rs/
  2. Click on 'Run'
  3. See error

Expected behavior
3. See the demo of the example page

Screenshots
Screenshot 2023-09-03 at 21 36 26

Environment:

  • Browser and version, if relevant: Tested on Firefox 116, Chrome 116, Safari 16.6

Questionnaire

  • I'm interested in fixing this myself but don't know where to start
  • I would like to fix and I have a solution
  • I don't have time to fix this right now, but maybe later
commented

Closing this as it is unrelated to Yew and is already reported on yew-playground repo