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

TypeError when running eos-transfers example #102

Open
angelol opened this issue Jan 10, 2019 · 4 comments
Open

TypeError when running eos-transfers example #102

angelol opened this issue Jan 10, 2019 · 4 comments

Comments

@angelol
Copy link

angelol commented Jan 10, 2019

When running the unmodified eos-transfers example, after a while I get the following error:

{"name":"demux","hostname":"Ubuntu-1804-bionic-64-minimal","pid":30211,"level":30,"msg":"Rolling back 1 blocks to block 7986487...","time":"2019-01-10T05:07:43.811Z","v":0}
(node:30211) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'indexState' of undefined
    at ObjectActionHandler.loadIndexState (/home/demo/demux-js/examples/eos-transfers/ObjectActionHandler.js:56:18)
    at ObjectActionHandler.<anonymous> (/home/demo/demux-js/examples/eos-transfers/node_modules/demux/dist/AbstractActionHandler.js:165:79)
    at Generator.next (<anonymous>)
    at /home/demo/demux-js/examples/eos-transfers/node_modules/demux/dist/AbstractActionHandler.js:7:71
    at new Promise (<anonymous>)
    at __awaiter (/home/demo/demux-js/examples/eos-transfers/node_modules/demux/dist/AbstractActionHandler.js:3:12)
    at ObjectActionHandler.refreshIndexState (/home/demo/demux-js/examples/eos-transfers/node_modules/demux/dist/AbstractActionHandler.js:164:16)
    at ObjectActionHandler.<anonymous> (/home/demo/demux-js/examples/eos-transfers/node_modules/demux/dist/AbstractActionHandler.js:50:28)
    at Generator.next (<anonymous>)
    at fulfilled (/home/demo/demux-js/examples/eos-transfers/node_modules/demux/dist/AbstractActionHandler.js:4:58)
(node:30211) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 4)
(node:30211) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

I suspect it has something to do with fork handling because it usually comes immediately after a fork has been handled, but not always. Sometimes it handles a dozen forks fine and then suddenly, the error pops up.

The Jungle testnet seems to have conditions that provoke this error more often than then mainnet.

@angelol
Copy link
Author

angelol commented Mar 25, 2019

Addendum: The process just freezes after this error. The only way to resolve it is to restart the process.

@jeffreyssmith2nd
Copy link
Contributor

Thanks for following up, sorry this got dropped. I'll try to take a look at this when I have a few minutes.

@jeffreyssmith2nd
Copy link
Contributor

I've been running for over 6 hours and haven't run into this issue. Do you happen to know of a block I could start at that might trigger this condition?

One thing to note, I have seen long periods of inactivity where if I hadn't added extra logging I would have assumed it was frozen.

@flux627
Copy link
Contributor

flux627 commented Apr 13, 2019

It seems the only place where state could be set to undefined is here. That would mean that there is no block history at the given index, which means there's probably something wrong with the toDelete assignment right above. I'll get to this eventually, but since this is a problem with just the example, it is low priority. If anyone else wants to tackle it and make a PR it would be greatly appreciated!

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

No branches or pull requests

3 participants