Unable to decode storage system.events for Kusama block 92874
See original GitHub issueI get the following at block 92874 (polkascan)
Unable to decode storage system.events: createType(Vec<EventRecord>):: Struct: failed on 'data':: Unable to create Enum via index 15, in Normal, Operational
2020-01-21 18:13:29 RPC-CORE: getStorage(key: StorageKey, at?: BlockHash): StorageData:: createType(Vec<EventRecord>):: Struct: failed on 'data':: Unable to create Enum via index 15, in Normal, Operational
2020-01-21 18:13:29 MAIN: Error: getStorage(key: StorageKey, at?: BlockHash): StorageData:: createType(Vec<EventRecord>):: Struct: failed on 'data':: Unable to create Enum via index 15, in Normal, Operational
at CatchSubscriber.pipe.error [as selector] (/home/thib/github/paritytech/Nomidot/node_modules/@polkadot/rpc-core/index.js:193:38)
at CatchSubscriber.error (/home/thib/github/paritytech/Nomidot/node_modules/rxjs/src/internal/operators/catchError.ts:132:23)
at MapSubscriber._next (/home/thib/github/paritytech/Nomidot/node_modules/rxjs/src/internal/operators/map.ts:86:24)
at MapSubscriber.Subscriber.next (/home/thib/github/paritytech/Nomidot/node_modules/rxjs/src/internal/Subscriber.ts:99:12)92874
at SwitchMapSubscriber.notifyNext (/home/thib/github/paritytech/Nomidot/node_modules/rxjs/src/internal/operators/switchMap.ts:172:24)
at InnerSubscriber._next (/home/thib/github/paritytech/Nomidot/node_modules/rxjs/src/internal/InnerSubscriber.ts:17:17)
at InnerSubscriber.Subscriber.next (/home/thib/github/paritytech/Nomidot/node_modules/rxjs/src/internal/Subscriber.ts:99:12)
at CombineLatestSubscriber.notifyNext (/home/thib/github/paritytech/Nomidot/node_modules/rxjs/src/internal/observable/combineLatest.ts:313:26)
at InnerSubscriber._next (/home/thib/github/paritytech/Nomidot/node_modules/rxjs/src/internal/InnerSubscriber.ts:17:17)
at InnerSubscriber.Subscriber.next (/home/thib/github/paritytech/Nomidot/node_modules/rxjs/src/internal/Subscriber.ts:99:12)
Reproducible in the js console. With the block before all good, the 92874 fails:
async function logMethod(blockHash){
const events = await api.query.system.events.at(blockHash);
events.map(
({ event: { method } }) =>
console.log('method',method)
);
}
const blockHashFine = "0x88bfb8baf0e8e5e192b911b80aed45e49f27b50fa91d217a2ca71c6dd1e2c53d"; //92873 working fine
const blockHashFailing = "0xc67e368912d8b0a824f917fff7ef3885e4bf867f07df99441368eb234b05b4ab"; //92874 failing
logMethod(blockHashFine).catch(e => console.error(e));
logMethod(blockHashFailing).catch(e => console.error(e));
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
How to decode events help on substrate using polkadot.js?
You want to decode the data from ContractEmitted. So you are half-way there in known that you can pass the Bytes to the...
Read more >Errors and How to Resolve Them - Polkadot Wiki
In the explorer tab, find the block in which this failure occurred. Then, expand the system.ExtrinsicFailed frame: Error described.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It is the types, specifically DispatchError, as indicated above, see https://github.com/polkadot-js/api/blob/master/packages/api/src/base/typeInjector.ts#L33
(The above is NOT comprehensive, since types adjust to latest)
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.