bluesky-social / atproto

Social networking technology created by Bluesky
Other
6.18k stars 433 forks source link

"RangeError: Could not decode varint" in repo package #2484

Open aalku opened 4 months ago

aalku commented 4 months ago

Describe the bug

When connected to the Firehose with the Typescript SDK sometimes an exception is thrown.

To Reproduce

Steps to reproduce the behavior:

  1. Connect to the Firehose
  2. Wait
  3. Error happens after seconds or hours. I don't know what triggers it:
    
    error: RangeError: Could not decode varint
        at Object.read3 [as decode] (/project_folder/node_modules/@skyware/firehose/node_modules/@atproto/repo/dist/index.js:13360:17)
        at readVarint (/project_folder/node_modules/@skyware/firehose/node_modules/@atproto/repo/dist/index.js:25090:36)
        at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
        at async readHeader (/project_folder/node_modules/@skyware/firehose/node_modules/@atproto/repo/dist/index.js:25095:19)
        at async decodeIterator (/project_folder/node_modules/@skyware/firehose/node_modules/@atproto/repo/dist/index.js:25408:40)


**Expected behavior**

Messages from the Firehose are parsed without errors by the SDK.

**Details**

- Operating system: Windows 11
- Node version: v21.6.1

**Additional context**

I'm trying to create a bot.
mary-ext commented 4 months ago

They're coming from Bridgy Fed, re: https://github.com/snarfed/bridgy-fed/issues/1016