Plutus Playground DecodingError when Evaluating any script
catch-21 opened this issue · comments
Summary
In our hosted Plutus Playground, when evaluating any compiled script the following error then a DecodingError is displayed and it is not possible to proceed to view transactions. Building and hosting locally evaluates correctly, logs and transactions can be seen.
Steps to reproduce the behavior
- Go to https://playground.plutus.iohkdev.io/
- Pick any demo file (e.g. Hello world or Starter)
- Click "Compile"
- On successful compilation, click "Simulate"
- On Simulator page, click "Evaluate"
Actual Result
Error is displayed at bottom of screen and it is not possible to view transactions.
DecodingError: An error occurred while decoding a JSON value: Under 'EvaluationResult': At object key 'emulatorLog': Under 'Array': At array index 0: Under 'EmulatorTimeEvent': At object key '_eteEvent': Under 'EmulatorEvent'': At object key 'contents': Under 'ChainEvent': At object key 'contents': At array index 1: Under 'Tx': At object key 'txData': Expected value of type 'Object'.
Please try again or contact support for assistance.
Expected Result
Evaluation succeeds, no error, logs and transactions are displayed.
Describe the approach you would take to fix this
No response
System info
OS: Linux Mint 20.2
Current plutus-apps commit is 835ce24 (works locally, not sure what we're currently hosted but should be head of main)
We are looking into this issue, and a fix should be implementing in the coming time.
Hey there,
I Have same issues can we have resolution here ?
I don't know what happening but my code is not working anymore on playground https://playground.plutus.iohkdev.io/
Can you please do let me know here and process what exactly what happening with the playground..
And please let me know alternative way to run Plutus program run and deploy for the same so that I continue on that part till issues fixed..
thanks :)
@developerdarsh You can run a local instance of the Plutus Playground. See readme here
@james-iohk I don't believe this will help, in this instance, as the bug is present on staging, which is the latest changes from the repo.
Although this issue is occurring at both the production and staging environments, I can confirm that the latest commit 7f53f18 works locally. What I did to make it happen, in bash terminal:
- At top of this repo,
nix-build -A plutus-playground.server
- Enter
nix-shell
then
cd plutus-playground-client
plutus-playground-server
Wait for server to start, it'll log "Interpreter ready"
- In second terminal at top of this repo, enter
nix-shell
then:
cd plutus-playground-client
npm run start
Wait for client to start, it'll log "webpack compiled with ..."
- In web browser, navigate to url https://localhost:8009/ (need to accept that ssl certificate is invalid)
- Compile and evaluate plutus code without DecodingError
Thanks @james-iohk ! :)
When I try to follow the steps to install it locally with this commit, I get the following error:
sudo nix-build -A plutus-playground.server
zsh: segmentation fault sudo nix-build -A plutus-playground.server
Hi James,
I got the following error when running the "npm run start" command:
plutus-playground-server: user error (Error evaluating simulation: InterpreterError (CompilationErrors [CompilationError {filename = "\n/private/tmp/web-ghc-work-30f080fdeb208c5b/Main.hs", row = 2, column = 1, text = [" error:"," Could not find module \8216Playground.Contract\8217"," Use -v (or :set -v
in ghci) to see a list of the files searched for."," |","2 | import Playground.Contract"," | ^^^^^^^^^^^^^^^^^^^^^^^^^^"]},CompilationError {filename = "/private/tmp/web-ghc-work-30f080fdeb208c5b/Main.hs", row = 3, column = 1, text = [" error:"," Could not find module \8216Plutus.Contract\8217"," Use -v (or :set -v
in ghci) to see a list of the files searched for."," |","3 | import Plutus.Contract"," | ^^^^^^^^^^^^^^^^^^^^^^"]},CompilationError {filename = "/private/tmp/web-ghc-work-30f080fdeb208c5b/Main.hs", row = 4, column = 1, text = [" error:"," Could not find module \8216PlutusTx.Prelude\8217"," Use -v (or :set -v
in ghci) to see a list of the files searched for."," |","4 | import PlutusTx.Prelude"," | ^^^^^^^^^^^^^^^^^^^^^^^"]}]))
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! plutus-playground-client@1.0.0 start: plutus-playground-generate-purs && npm install && npm run install:spago && npm run build:webpack:dev
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the plutus-playground-client@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/user/.npm/_logs/2022-01-13T03_54_22_317Z-debug.log
@rwhiten1 @derneuere @specpro30. The steps I listed are proven working on Ubuntu. If you are using a Mac, particularly with silicon M1 hardware, then additional steps are required. The most proven community-produced guide I have seen is: https://github.com/renzwo/cardano-plutus-apps-install-m1
If you're using Linux and my steps didn't work for you then it might be best to start with a clean checkout of plutus-apps
and try again. Another community member has put this guide together, it has received positive feedback: https://docs.google.com/document/d/15QR25eWgg587FTPnuf6Si_lpux-uFQsY_2Gj_4vf4lM
The issue is still existing. Can someone in IOG fix it? As it is the only place for me to practise plutus.
This is now fixed on all our hosted environments, including https://playground.plutus.iohkdev.io