Joystream / joystream

Joystream Monorepo
http://www.joystream.org
GNU General Public License v3.0
1.42k stars 115 forks source link

QueryNode: handle invalid protobuf message decoding #5189

Closed mnaamani closed 2 days ago

mnaamani commented 2 days ago

Solves processor failing with error

INFO: Processing block: 0009303780-14959, events count: 1
ERROR: Stopping the proccessor due to errors: {} name: Error, message: invalid wire type 4 at offset 1, stack: Error: invalid wire type 4 at offset 1
    at Reader.skipType (/joystream/metadata-protobuf/node_modules/protobufjs/src/reader.js:377:19)
    at Function.decode (/joystream/metadata-protobuf/compiled/index.js:8365:24)
    at content_ChannelOwnerRemarked (/joystream/query-node/mappings/lib/src/content/channel.js:158:63)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async MappingsLookupService.call (/joystream/node_modules/@joystream/hydra-processor/lib/executor/MappingsLookupService.js:80:9)
    at async /joystream/node_modules/@joystream/hydra-processor/lib/executor/TransactionalExecutor.js:41:17
INFO: Shutting down...

Fixed by used the deserializeMetadata helper method.