rust-lang / rust-lang/rust-playground

Passing `gist` URL parameter twice breaks playground

Open
#617 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
1.4k
Forks
267
Avg merge
3h 2m
Merged PRs (30d)
6

Description

Normally, if you pass something invalid for the gist, the playground just opens with an empty textarea. But if you pass it twice, the page doesn't load at all. (Q: How could that happen / why would you do that? A: by mistake, but it happened)

This link shows a completely blank page for me in Firefox and Chrome (macOS): https://play.rust-lang.org/?gist=break&gist=rust

The error console shows:

TypeError: "Parameter 'url' must be a string, not object"
    parse https://play.rust-lang.org/assets/13f807a13f5fc9461372.js:1
    b https://play.rust-lang.org/assets/13f807a13f5fc9461372.js:1
    resolve https://play.rust-lang.org/assets/13f807a13f5fc9461372.js:1
    resolve https://play.rust-lang.org/assets/13f807a13f5fc9461372.js:1
    Bt https://play.rust-lang.org/assets/c6dbac6de476402e0d00.js:13
    r https://play.rust-lang.org/assets/13f807a13f5fc9461372.js:6
    dispatch https://play.rust-lang.org/assets/13f807a13f5fc9461372.js:1
    Ut https://play.rust-lang.org/assets/c6dbac6de476402e0d00.js:13
    r https://play.rust-lang.org/assets/13f807a13f5fc9461372.js:6
    l https://play.rust-lang.org/assets/c6dbac6de476402e0d00.js:13
    router https://play.rust-lang.org/assets/c6dbac6de476402e0d00.js:13
    Rr https://play.rust-lang.org/assets/c6dbac6de476402e0d00.js:13
    gi https://play.rust-lang.org/assets/13f807a13f5fc9461372.js:22
    La https://play.rust-lang.org/assets/13f807a13f5fc9461372.js:22
    yu https://play.rust-lang.org/assets/13f807a13f5fc9461372.js:22
    sl https://play.rust-lang.org/assets/13f807a13f5fc9461372.js:22
    ul https://play.rust-lang.org/assets/13f807a13f5fc9461372.js:22
    Ju https://play.rust-lang.org/assets/13f807a13f5fc9461372.js:22
    Ku https://play.rust-lang.org/assets/13f807a13f5fc9461372.js:22
    Fl https://play.rust-lang.org/assets/13f807a13f5fc9461372.js:22
    l https://play.rust-lang.org/assets/13f807a13f5fc9461372.js:22
    tl https://play.rust-lang.org/assets/13f807a13f5fc9461372.js:22
    $l https://play.rust-lang.org/assets/13f807a13f5fc9461372.js:22
    render https://play.rust-lang.org/assets/13f807a13f5fc9461372.js:22
    511 https://play.rust-lang.org/assets/c6dbac6de476402e0d00.js:13
    c https://play.rust-lang.org/assets/c6dbac6de476402e0d00.js:1
    239 https://play.rust-lang.org/assets/c6dbac6de476402e0d00.js:1
    c https://play.rust-lang.org/assets/c6dbac6de476402e0d00.js:1
    a https://play.rust-lang.org/assets/c6dbac6de476402e0d00.js:1
    <anonymous> https://play.rust-lang.org/assets/c6dbac6de476402e0d00.js:1
    <anonymous> https://play.rust-lang.org/assets/c6dbac6de476402e0d00.js:1
13f807a13f5fc9461372.js:22:82385

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with https://play.rust-lang.org/?gist=break&gist=rust in Firefox or Chrome and inspect the query-parameter handling behind the reported TypeError. Trace how the repeated gist value reaches the playground router, then verify that the page loads with an empty textarea instead of becoming blank.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.