paritytech / substrate-api-sidecar

REST service that makes it easy to interact with blockchain nodes built using Substrate's FRAME framework.
https://paritytech.github.io/substrate-api-sidecar/dist/
GNU General Public License v3.0
245 stars 151 forks source link

500 received for two blocks #1293

Closed lovelaced closed 1 year ago

lovelaced commented 1 year ago

Description

When attempting to access two particular blocks on Kusama there is an error. https://kusama-public-sidecar.parity-chains.parity.io/blocks/18062770 https://kusama-public-sidecar.parity-chains.parity.io/blocks/18062771

{
  "code": 500,
  "message": "Cannot read properties of undefined (reading 'queryInfo')",
  "stack": "TypeError: Cannot read properties of undefined (reading 'queryInfo')\n    at BlocksService.fetchQueryInfo (/usr/src/app/build/src/services/blocks/BlocksService.js:243:46)\n    at runMicrotasks (<anonymous>)\n    at processTicksAndRejections (node:internal/process/task_queues:96:5)\n    at async BlocksService.fetchBlock (/usr/src/app/build/src/services/blocks/BlocksService.js:153:67)\n    at async BlocksController.getBlockById (/usr/src/app/build/src/controllers/blocks/BlocksController.js:152:49)\n    at async /usr/src/app/build/src/controllers/AbstractController.js:226:9",
  "level": "error"
}

Steps to Reproduce

See above links. If either of these blocks are included in a range query, the entire thing will also return a 500.

Expected vs. Actual Behavior

The block info should be correctly retrieved, just like all of the other blocks.

TarikGul commented 1 year ago

Okay cool, so for those public instances it looks like its an easy fix. They are currently on 14.5.2, they just need to be bumped to the most recent version: 17.0.0 and they should work fine.

I was able to confirm it locally

lovelaced commented 1 year ago

Thanks, it's been updated! Sorry for the noise.

lovelaced commented 1 year ago

Hi, I'm reopening this issue because I'm seeing a 500 error on a new range of blocks and I understand the sidecars are on the most recent release. Issues start at block 15976986 and end at block 15978187. Here is a sample error message:

{"code":500,"message":"Unable to decode storage session.validators:: createType([u8;21]):: [u8;21]:: Decoded input doesn't match input, received 0xa5040000966d74f8027e07b43717b6876d97544fe0d71facef06acc8382749ae…feffabd8f3747b5ca19766866bd59856a2e65c537c6456c6f6863c026915f473 (9506 bytes), created 0xa5040000966d74f8027e07b43717b6876d97544fe0 (21 bytes)","stack":"Error: Unable to decode storage session.validators:: createType([u8;21]):: [u8;21]:: Decoded input doesn't match input, received 0xa5040000966d74f8027e07b43717b6876d97544fe0d71facef06acc8382749ae…feffabd8f3747b5ca19766866bd59856a2e65c537c6456c6f6863c026915f473 (9506 bytes), created 0xa5040000966d74f8027e07b43717b6876d97544fe0 (21 bytes)\n    at RpcCore._newType (/usr/src/app/node_modules/@polkadot/rpc-core/cjs/bundle.js:385:19)\n    at RpcCore._formatStorageData (/usr/src/app/node_modules/@polkadot/rpc-core/cjs/bundle.js:320:21)\n    at RpcCore._formatOutput (/usr/src/app/node_modules/@polkadot/rpc-core/cjs/bundle.js:285:25)\n    at RpcCore._formatResult (/usr/src/app/node_modules/@polkadot/rpc-core/cjs/bundle.js:147:20)\n    at callWithRegistry (/usr/src/app/node_modules/@polkadot/rpc-core/cjs/bundle.js:168:25)\n    at processTicksAndRejections (node:internal/process/task_queues:96:5)","level":"error"}

The nodes it's connected to are on 0.9.43, the latest polkadot release.

https://polkadot-public-sidecar.parity-chains.parity.io/blocks/15978187

Thanks for any help!

TarikGul commented 1 year ago

Closing in favor of https://github.com/paritytech/substrate-api-sidecar/issues/1299.

If there is ever an issue with the public instances, please feel free to reopen this.