-
Notifications
You must be signed in to change notification settings - Fork 697
6.4.0 Version crashes with error Cannot read property 'subscriptions' of undefined #633
Comments
@olaf89 Thanks for letting us know. I'll do another release later today to fix this! |
Thanks for such a fast fix, i tested new version and previous issue is gone but its still sometimes fails in another place. Here is a line which fails: |
Thanks @olaf89 for testing so quickly! I've got a new branch of ganache-core that refactors our webSocketServer here that should gaurd against all of these kinds of failures: https://github.com/trufflesuite/ganache-core/tree/websocket-refector (please excuse the "refector" typo... it was as late night :-D ) I'm curious what you testing code looks like. Are you using Truffle? This bug is triggered if something closes the webSocketServer connection while simultaneously calling |
I am running e2e tests where dev server and ui are using ganache-cli over websockets. I am not using truffle. I do snapshot revert and reset connection in between tests so probably thats the reason. If you would like me test for any version let me know. |
I created a pr to fix this issue. If you could please take a look and let me know if that is ok or how it should behave in this scenario. I think maybe it would be better when the server would return some kind of error. |
Could someone give me feedback about my pr? trufflesuite/ganache#385 I tested it on my app and it solved the problem. At the moment i have to use forked cli so it would be awsome if this issue could be solved. |
Current Behavior
After updating ganache from 6.2.5 to 6.4.0 while running tests its crashing with error "Cannot read property 'subscriptions' of undefined".
TypeError: Cannot read property 'subscriptions' of undefined
node_modules/ganache-cli/build/ganache-core.node.cli.js:130:151516
looking at code its
https://github.com/trufflesuite/ganache-core/blob/e17046e16d41e8a758cbebb13d8a98fb0c7795d3/lib/webSocketServer.js#L102
I think its the similar to trufflesuite/ganache#213
The text was updated successfully, but these errors were encountered: