decred / dcrdata

Decred block explorer, with packages and apps for data collection and storage. Written in Go.
https://dcrdata.decred.org/
ISC License
129 stars 128 forks source link

Unexpected end of JSON input error #1994

Open ukane-philemon opened 6 months ago

ukane-philemon commented 6 months ago

This is the only log I've got on this, I keep getting the logs.

Screenshot 2024-06-06 at 1 14 40 AM
2024-06-04 16:10:08.131 [INF] PSQL: Block import elapsed: 0.05 minutes, 5 blocks (1.56 blocks/s)
2024-06-04 16:10:08.131 [DBG] PSQL: (*ChainDB).SyncChainDB: barLoad chan full. Halting sync progress updates.
(PoliteiaBackend).ProposalsSync: fetchTicketVoteResults failed with err: pi client TicketVoteResults err: unexpected end of JSON input
ukane-philemon commented 6 months ago

Investigating.

chappjc commented 6 months ago

Pi hangs up. A lot. There may yet be something, but I'd wager it's a non-JSON response like "500 internal server error" or a broken connection.

ukane-philemon commented 6 months ago

The returned data is missing "} at the end. We proly need an upstream politeia fix.

Not sure how we'd want to go about this: I was able to log the first 500 and last 500 bytes of the response body and noticed the response is defective. Why would this happen?


(PoliteiaBackend).ProposalsSync: fetchTicketVoteResults failed with err: pi client TicketVoteResults err: Result: ({Token:fa9d9045633ec04a}) Body: ({"votes":[{"token":"fa9d9045633ec04a","ticket":"0001577270c6903d38489af06ccdf5c52195484f4b0b7e3134c9399272502f55","votebit":"2","address":"DsdsexSsyu3NBj1MmkyDfb7MTijzYy4qRyV","signature":"1fad9642d027e6cc29277631f6443b07a784d0eba6f4bbe57e2feb7c79422dc72004ce9761c1549c428674a25e3a8df2c2913df4ee7a4ca7755741080aabd70f8a","receipt":"9d7dfed778d03fc14d0afc9bbffba9a27ab5f5ea1c0fc629caeeff76f17c9c1613573ead08b123b34481cfafb3d333f72ae7e9315bc82aa5e5a7a672f6a8f807","timestamp":1716697645},{"token":"fa9d.....................................
.......ss":"DsYHzCsZppiTPmMHv5wA5UFSbG4bLdru3Q7","signature":"20fcffd38b2ea2d363544226d4c1f63517c44163eb1bc4f3f861dc47038e301e1e118a404bc3e1d42f8860d37946217bbad4c71cf657324bb9985ac2432861916a","receipt":"8cb407d41ab0acb5facaa04c4f5f5885347ff40892d347ab237951578a57b33e3baaa67412e4805df8c59ef9c2b8144741bd7a30a1bfee9b08a2ca28f5769209","timestamp":1716681456},{"token":"fa9d9045633ec04a","ticket":"71d089b06ec8bf16da54bc96a1713397ea2692aaad750f01ad9d850f15560bdb","votebit":"2","address":"DsT8N7wXx56ayBMvRoy): unexpected end of JSON input