Skip to content
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

Error in "Your first Aragon app" tutorial #274

Closed
sohkai opened this issue Nov 16, 2018 · 10 comments · Fixed by #302
Closed

Error in "Your first Aragon app" tutorial #274

sohkai opened this issue Nov 16, 2018 · 10 comments · Fixed by #302
Assignees
Labels
🐛 bug An unexpected behavior of the API 🦅 high priority A signal from the teams to mark the importance of an issue to the maintainers

Comments

@sohkai
Copy link
Contributor

sohkai commented Nov 16, 2018

@yutarond commented on Fri Nov 16 2018

I tried following this "Your first Aragon app" tutorial. When I run aragon run command, got an error bellow:

 ❯ Start a local Ethereum network
   ⠴ Setting up a new chain from latest Aragon snapshot
     Starting a local chain from snapshot
   Check IPFS
   Publish app to APM
   Create DAO
   Open DAO

/Users/yutaro/.nodebrew/node/v9.5.0/lib/node_modules/@aragon/cli/node_modules/ganache-core/node_modules/level-codec/index.js:44
  return this._valueEncoding(opts).decode(value)
                                   ^
SyntaxError: Unexpected token o in JSON at position 1
    at Object.parse [as decode] (<anonymous>)
    at Codec.decodeValue (/Users/yutaro/.nodebrew/node/v9.5.0/lib/node_modules/@aragon/cli/node_modules/ganache-core/node_modules/level-codec/index.js:44:36)
    at /Users/yutaro/.nodebrew/node/v9.5.0/lib/node_modules/@aragon/cli/node_modules/ganache-core/node_modules/level-sublevel/nut.js:122:34
    at /Users/yutaro/.nodebrew/node/v9.5.0/lib/node_modules/@aragon/cli/node_modules/ganache-core/node_modules/encoding-down/index.js:57:5
    at /Users/yutaro/.nodebrew/node/v9.5.0/lib/node_modules/@aragon/cli/node_modules/ganache-core/node_modules/cachedown/index.js:61:5
    at /Users/yutaro/.nodebrew/node/v9.5.0/lib/node_modules/@aragon/cli/node_modules/ganache-core/lib/database/filedown.js:28:5
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:528:3)
@sohkai
Copy link
Contributor Author

sohkai commented Nov 16, 2018

@yutarond I moved this repo to the CLI, since it appears that's where the issue is.

Seems like it's something to do with ganache, which is odd. Maybe there's something wrong with the new aragen snapshot @izqui?

@sohkai sohkai added the 🐛 bug An unexpected behavior of the API label Nov 16, 2018
@macor161
Copy link
Contributor

I was experiencing the same issue since yesterday and I thought it was some kind of file corruption in npm. It turns out that a new version of ganache-core was released yesterday and it breaks all new versions of @aragon/cli.

https://www.npmjs.com/package/ganache-core/v/2.3.0

This is quite a major issue because everyone installing @aragon/cli or changing its version since yesterday will end up with a broken tool.

@macor161
Copy link
Contributor

I submitted a pull request that uses ganache-core v2.2.1.
This is a temporary fix until we get to know exactly what in the new ganache-core version is causing the bug.

@sohkai
Copy link
Contributor Author

sohkai commented Nov 18, 2018

Could be the snapshot db's format slightly changed, or they're just incompatible between versions of ganache. We probably need to regen aragen with the latest ganache-core.

@bingen
Copy link
Contributor

bingen commented Dec 1, 2018

Yes, indeed that seems to be the problem, The exact change that is breaking it is this one:
trufflesuite/ganache@22e3af6#diff-f7055d87f223a4d22d9d739ca35e954aR36
In particular, it seems to be the addition of encoding-down.

@bingen
Copy link
Contributor

bingen commented Dec 1, 2018

This is fixed temporarily in #280.
For a more stable solution, I opened a PR in ganache-core repo, not sure if that's the best way to fix it, but their tests are passing and our cli is working with it:
trufflesuite/ganache#239

@0xGabi 0xGabi added the 🦅 high priority A signal from the teams to mark the importance of an issue to the maintainers label Dec 9, 2018
@0xGabi 0xGabi self-assigned this Dec 9, 2018
@0xGabi 0xGabi added this to the Aragon DAC Dec Sprint milestone Dec 14, 2018
@sohkai
Copy link
Contributor Author

sohkai commented Dec 18, 2018

@galactusss @0x6431346e It looks like with the newest [email protected] the snapshot regression should be fixed. We should try unpinning and making sure everything works :).

@bingen
Copy link
Contributor

bingen commented Dec 18, 2018

Oh, I just pushed PR #302 but I still want to test it thoroughly. You can give it try though.

@0xGabi
Copy link
Contributor

0xGabi commented Dec 19, 2018

I tested all the steps on the tutorial and it seem the error was fixed with #302 PR
should close this? Or you want to test a bit more before @bingen @0x6431346e

@bingen
Copy link
Contributor

bingen commented Dec 20, 2018

It's fine for me if you tested it. I just merged #302. Thanks @galactusss !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug An unexpected behavior of the API 🦅 high priority A signal from the teams to mark the importance of an issue to the maintainers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants