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: Cannot read property 'length' of undefined #116

Closed
zhq1 opened this issue Nov 24, 2017 · 6 comments
Closed

TypeError: Cannot read property 'length' of undefined #116

zhq1 opened this issue Nov 24, 2017 · 6 comments

Comments

@zhq1
Copy link

zhq1 commented Nov 24, 2017

root@vultr:~/explorer# node scripts/sync.js index reindex
script launched with pid: 19148
index cleared (reindex)

TypeError: Cannot read property 'length' of undefined
at /root/explorer/lib/database.js:642:36
at Request._callback (/root/explorer/lib/explorer.js:107:14)
at Request.self.callback (/root/explorer/node_modules/request/request.js:187:22)
at Request.EventEmitter.emit (events.js:98:17)
at Request. (/root/explorer/node_modules/request/request.js:1044:10)
at Request.EventEmitter.emit (events.js:95:17)
at IncomingMessage. (/root/explorer/node_modules/request/request.js:965:12)
at IncomingMessage.EventEmitter.emit (events.js:117:20)
at _stream_readable.js:919:16
at process._tickCallback (node.js:419:13)

@cvaldezscse
Copy link

i've got the same problem with the "proof-of-work" property, does anybody solved it?

@cvaldezscse
Copy link

I solved this problem, at first you have your coin daemon running properly, and you may be able to launch it methods like i.e.
./yourcoin_daemon getblockcount

if it returns a number, it means that it works properly, so the next step is when you start your explorer at firstfrom the explorer root path with npm start, then run manually the sync.js script, and it will be storing in your mongodb if all the properties are correct,

PD. look in the settings.json file if your wallet credentials are correct

@skorotkiewicz
Copy link

my fix:

add to coin config (yourCoin.conf)

txindex=1
addressindex=1
spentindex=1

@leegod
Copy link

leegod commented Mar 28, 2018

@modinfo I did, still get length error.

@leegod
Copy link

leegod commented May 11, 2019

I solved this problem, at first you have your coin daemon running properly, and you may be able to launch it methods like i.e.
./yourcoin_daemon getblockcount

if it returns a number, it means that it works properly, so the next step is when you start your explorer at firstfrom the explorer root path with npm start, then run manually the sync.js script, and it will be storing in your mongodb if all the properties are correct,

PD. look in the settings.json file if your wallet credentials are correct

What it means? run manually sync.js script? Isn't it mean type node scripts/sync.js index reindex ?

@TheHolyRoger
Copy link
Collaborator

Duplicate of #56

@TheHolyRoger TheHolyRoger marked this as a duplicate of #56 Dec 25, 2019
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

5 participants