Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

System Error when running Ganache 2.0.0 on darwin #1169

Closed
CodeWarriorr opened this issue Mar 22, 2019 · 12 comments
Closed

System Error when running Ganache 2.0.0 on darwin #1169

CodeWarriorr opened this issue Mar 22, 2019 · 12 comments

Comments

@CodeWarriorr
Copy link

This keeps happening when I want to browse ANY contract in new contract tab.
If i leave GUI i can keep working...

PLATFORM: darwin
GANACHE VERSION: 2.0.0

EXCEPTION:

TypeError: Cannot read property 'nodes' of undefined
    at getStateVariables (/node_modules/truffle-decoder/dist/allocate/storage.js:146:24)
    at vars.concat.linearizedBaseContractsFromBase.map (/node_modules/truffle-decoder/dist/allocate/storage.js:154:73)
    at Array.map (native)
    at allocateContract (/node_modules/truffle-decoder/dist/allocate/storage.js:154:61)
    at Object.getStorageAllocations (/node_modules/truffle-decoder/dist/allocate/storage.js:28:23)
    at TruffleContractDecoder.init (/node_modules/truffle-decoder/dist/interface/contract-decoder.js:87:43)
    at Object.getDecodedEvent (/src/truffle-integration/decode.js:42:11)
    at process.<anonymous> (/src/truffle-integration/index.js:92:31)
    at emitTwo (events.js:125:13)
    at process.emit (events.js:213:7)
    at emit (internal/child_process.js:768:12)
    at _combinedTickCallback (internal/process/next_tick.js:141:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)

APPLICATION LOG:

T+0ms: Starting server (version 2.0.0) with initial configuration: {"gasLimit":6721975,"gasPrice":20000000000,"hardfork":"petersburg","hostname":"127.0.0.1","port":7545,"network_id":5777,"default_balance_ether":1000,"total_accounts":10,"unlocked_accounts":[],"locked":false,"vmErrorsOnRPCResponse":true,"verbose":false,"db_path":"<<<USER_HOME_DIR>>>/Library/Application Support/Ganache/workspaces/solid-robin/chaindata"}
T+1101ms: Ganache started successfully!
T+1101ms: Waiting for requests...
T+1188ms: eth_subscribe
T+1254ms: eth_getLogs
T+1305ms: eth_subscribe
T+1390ms: eth_getCode
T+1493ms: eth_getCode
T+1519ms: eth_getCode
T+1555ms: eth_getCode
T+21847ms: eth_unsubscribe
T+21887ms: eth_unsubscribe
T+21934ms: eth_unsubscribe
T+21934ms: eth_unsubscribe
T+21934ms: eth_unsubscribe
@OnlyOneJMJQ
Copy link
Contributor

Hi @CodeFuriate, it would be helpful for reproduction if we could see the dapp you're working with. Is there a repo you mind sharing?

@theophoric
Copy link

I am having this issue as well.

@CodeWarriorr
Copy link
Author

@davidmurdoch
Copy link
Member

Thanks @CodeFuriate! We're looking into it and working on a fix now!

@haltman-at
Copy link

haltman-at commented Apr 3, 2019

Hm, I don't seem to be able to reproduce this issue. It's possible later versions of the decoder fixed this, maybe? (I've been using the development versions.) I guess I may have to retry with the released versions to be sure, though I'm skeptical there's been any relevant change. But for now I'm fairly stumped, because I haven't been able to reproduce this; I haven't gotten any errors of this form either upon inspecting contracts in this project with Ganache, or just checking out the storage allocations from the debugger's debug info. Allocation seems to be working fine here, so I'm not sure how I can isolate the problem at the moment, unfortunately. But like I said I'll try again shortly.

@haltman-at
Copy link

Oops, seems I made a mistake above -- I was using the application bundle, meaning I was using the released version after all. Meaning, I can't reproduce this, sorry. We'll have to figure out some other approach here, I suppose...

@davidmurdoch
Copy link
Member

This should now be fixed in our latest beta: https://github.com/trufflesuite/ganache/releases/tag/v2.0.1-beta.0 Let me know if you have any issues or if the fix doesn't work for you.

@CodeWarriorr
Copy link
Author

CodeWarriorr commented Apr 16, 2019

@davidmurdoch sadly its not https://github.com/trufflesuite/ganache/issues/1256
It starts with "truffle projects" configuration and makes Transaction details and Contracts details crash.
I have full list of deployed contracts but viewing any of them causes a crash (probably loading transactions part crashes)

@amorriscode
Copy link

Still appears to happen to me on 2.0.1.631.

@haltman-at
Copy link

So, we're currently looking into the problem, but I wanted to suggest a workaround until such time as we have a fix. Would you mind trying this and letting us know if it works? Try recompling your Truffle project with truffle compile --all, or, if necessary, recompiling and redeploying the whole thing with truffle migrate --compile-all --reset.

See if that fixes the problem for now; let us know if it works. Meanwhile, we are, as I said, looking into a more proper fix. Thank you!

@haltman-at
Copy link

haltman-at commented Apr 22, 2019

OK @davidmurdoch, you are presumably already aware of this, but writing this down here where you can find it again more easily: I just merged this Truffle PR, which causes the decoder to throw a special class of error when this error condition comes up, so that you can catch it rather than crashing. Obviously that's not a proper fix, but a proper fix is still being worked on; in the meantime, once Truffle 5.0.14 (or rather, truffle-decoder version 3.0.1) is released, if you upgrade your decoder version you'll be able to catch the error.

Note that Truffle 5.0.13 (or rather, truffle-decoder version 3.0.0) included a breaking change to the decoder, in that init is now async, so you'll have to change that if you haven't already. But obviously that's pretty minor.

@davidmurdoch
Copy link
Member

This issue should be fixed in the latest beta! https://github.com/trufflesuite/ganache/releases/tag/v2.0.2-beta.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants