flow-playground icon indicating copy to clipboard operation
flow-playground copied to clipboard

Contract deployment and forking of tutorial playground instances results in blank screen and console error

Open hichana opened this issue 3 years ago • 2 comments

Describe the bug As described in issue #186 at the point of contract deployment of one of the tutorial playground instances, a blank screen is experienced. It turns out that this applies to all of the tutorial playground instances, and also happens when attempting to fork any given playground instance.

The console error:

main.js:29 TypeError: Cannot read properties of undefined (reading 'state')
    at main.js:1962
    at Array.filter (<anonymous>)
    at main.js:1962
    at Xo (main.js:29)
    at Zo (main.js:29)
    at Object.useState (main.js:29)
    at t.useState (main.js:29)
    at Lb (main.js:1962)
    at Go (main.js:29)
    at Ps (main.js:29)

PR #187 resolves the issue of new playgrounds being created from the tutorial links, but the underlying issue probably effects other existing playgrounds in the wild. The below steps to reproduce are assuming PR #187 is not yet merged.

To Reproduce Deploy contract issue:

  1. visit https://play.onflow.org/
  2. click on Click here to start a tutorial, choose a tutorial by clicking on one of the 'Open Project' buttons
  3. attempt to deploy a contract

Fork issue:

  1. visit https://play.onflow.org/
  2. click on Click here to start a tutorial, choose a tutorial by clicking on one of the 'Open Project' buttons
  3. attempt to fork
  4. after the new UUID is set in the URL, refresh the browser. The forked playground instance should now load
  5. deploy contract (should work)

Expected behavior Playground should deploy contracts and fork without showing a blank screen or console errors.

Screenshots n/a

Desktop (please complete the following information):

  • OS: Max OsX 11.6
  • Browser Chrome 95.0, Firefox 94.0.1

hichana avatar Nov 16 '21 03:11 hichana

Does it happen upon the very first saving of project (from localstore to datastore)? I suspect temporary data mixup/lag is causing that as datastore generated UUIDs haven't made it back to the frontend yet.

soetop avatar Nov 18 '21 17:11 soetop

@hichana thank you for addressing this issue with PR https://github.com/onflow/flow-playground/pull/187 ! I tested both "Deploy contract issue" and "Fork issue", no longer seeing errors. I'll close this issue soon if you don't have concerns

kerrywei avatar Dec 16 '21 23:12 kerrywei

Fixed in #187

alse avatar Sep 15 '22 18:09 alse