polkadot-js / api

Promise and RxJS APIs around Polkadot and Substrate based chains via RPC calls. It is dynamically generated based on what the Substrate runtime provides in terms of metadata.
Apache License 2.0
1.07k stars 353 forks source link

Error: createType(SignedBlock):: Struct: failed on block: {\"header\":\"Header\",\"extrinsics\":\"Vec<Extrinsic>\"}:: Struct: failed on extrinsics: Vec<Extrinsic>:: createType(ExtrinsicV4):: createType(Call):: findMetaCall: Unable to find Call with index [1, 7]/[1,7] #5930

Closed xuetong6 closed 4 months ago

xuetong6 commented 4 months ago

the code:

let blockHash = await polapi.rpc.chain.getBlockHash(_blockNum);
let block = await polapi.rpc.chain.getBlock(blockHash);
let allRecords = await polapi.query.system.events.at(block.block.header.hash);

number:21468174 Error: createType(SignedBlock):: Struct: failed on block: {\"header\":\"Header\",\"extrinsics\":\"Vec\"}:: Struct: failed on extrinsics: Vec:: createType(ExtrinsicV4):: createType(Call):: findMetaCall: Unable to find Call with index [1, 7]/[1,7]

number:21468749 Error: createType(SignedBlock):: Struct: failed on block: {\"header\":\"Header\",\"extrinsics\":\"Vec\"}:: Struct: failed on extrinsics: Vec:: createType(ExtrinsicV4):: createType(Call):: Call: failed decoding system.killStorage:: Struct: failed on args: {\"keys\":\"Vec\"}:: decodeU8aStruct: failed at 0x03002326d02252ce7447206b042b59b4… on keys (index 1/1): Vec:: Vec length 3492160256 exceeds 65536

version: "@polkadot/api": "^9.14.2", const wsProvider = new DotObj.WsProvider('wss://rpc.polkadot.io');

so how to solve this problem, thank you.

TarikGul commented 4 months ago

so how to solve this problem, thank you.

Have you tried updating the API version to latest?

xuetong6 commented 4 months ago

"@polkadot/api": "^9.14.2", latest The wallet node is also the latest

TarikGul commented 4 months ago

"@polkadot/api": "^9.14.2", latest

This is not latesst we are on: 12.0.2

xuetong6 commented 4 months ago

"@polkadot/api": "^9.14.2", 最新

这不是我们最新的:12.0.2

Thank you, it has been resolved It's because the API version is too low

polkadot-js-bot commented 4 months ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue if you think you have a related problem or query.