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

Explorer not populating block details, only difficulty is shown #284

Closed
fabioganga opened this issue May 14, 2019 · 5 comments
Closed

Explorer not populating block details, only difficulty is shown #284

fabioganga opened this issue May 14, 2019 · 5 comments

Comments

@fabioganga
Copy link

Hi,

I am having a weird problem. The block explorer seems to be working fine, but it is only showing the difficulty and the network hash (hence connection to the wallet must occur).

No error when issuing the command to index update and index reindex either, yet I see no info on the blocks or transactions.

What can I do?

Thanks for your help!

@uaktags
Copy link
Collaborator

uaktags commented May 26, 2019

You say no error when running node scripts/sync.js index update, but are you getting output at all? Specifically you should be getting two things happening:

Your explorer's running log (after running npm start) should start showing you calls to /api/getrawtransation.
Your other terminal window, where you're running the sync update, should be showing you blocks that it hits.

What in all, are you seeing in your terminals?

@fabioganga
Copy link
Author

fabioganga commented May 28, 2019

Hi @uaktags and thanks a lot for your reply.

I have tried again to get somewhere....

I am now getting this error when running node scripts/sync.js index update

script launched with pid: 14184
/root/explorer/lib/database.js:642
lib.syncLoop(block.tx.length, function (subloop) {
^

TypeError: Cannot read property 'length' of undefined
at /root/explorer/lib/database.js:642:37
at Request._callback (/root/explorer/lib/explorer.js:107:14)
at Request.self.callback (/root/explorer/node_modules/request/request.js:187:22)
at emitTwo (events.js:126:13)
at Request.emit (events.js:214:7)
at Request. (/root/explorer/node_modules/request/request.js:1044:10)
at emitOne (events.js:116:13)
at Request.emit (events.js:211:7)
at IncomingMessage. (/root/explorer/node_modules/request/request.js:965:12)
at emitNone (events.js:111:20)
at IncomingMessage.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)

Thanks a lot!

@uaktags
Copy link
Collaborator

uaktags commented May 28, 2019

Can you put a console.log(block)on line 642?
So 642-643 should say

console.log(block);
lib.syncLoop(block.tx.length, function (subloop) {

then re-run

@uaktags
Copy link
Collaborator

uaktags commented May 29, 2019

Basically, the theory is that the block isn't parsed correctly and we need to know what the value is that's causing it to fail. Specifically the error is that the block's json output doesn't include a "tx" parameter which is why .length doesn't exist. This tells me that block isn't actually a block but something else (possibly a string or some other malformed/unexpected object).

@TheHolyRoger
Copy link
Collaborator

Dup of #56

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