Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RangeError: Could not decode varint error #73

Open
maximesimoncelli opened this issue Dec 4, 2023 · 4 comments
Open

RangeError: Could not decode varint error #73

maximesimoncelli opened this issue Dec 4, 2023 · 4 comments

Comments

@maximesimoncelli
Copy link

maximesimoncelli commented Dec 4, 2023

Hello,

I'm currently implementing my own feed, and it works pretty well but I have these errors at random intervals:

repo subscription could not handle message RangeError: Could not decode varint
  at Object.read3 [as decode] (/home/bsky/app/node_modules/@atproto/repo/dist/index.js:13095:17)
  at readVarint (/home/bsky/app/node_modules/@atproto/repo/dist/index.js:24770:36)
  at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
  at async readHeader (/home/bsky/app/node_modules/@atproto/repo/dist/index.js:24775:19)
  at async decodeReaderComplete (/home/bsky/app/node_modules/@atproto/repo/dist/index.js:25015:40)

If a reproduction repo is needed, there you go: https://github.com/maximesimoncelli/dungeon-synth-bsky-feed
For information, I encounter these errors on node 20, and I haven't tested it on older versions.

Thank you very much for your help :)

@EddyLuten
Copy link

@maximesimoncelli not sure why exactly, but after I ran npm i and npm audit fix in my feed app's directory, it's working again.

@maximesimoncelli
Copy link
Author

@EddyLuten Thanks for the heads up. I will try to see what npm audit reports, maybe it is only a bug in one of the dependencies.

@jeffgca
Copy link

jeffgca commented Feb 3, 2024

I've sen this in my own feed service:

repo subscription could not handle message RangeError: Could not decode varint
    at Object.read3 [as decode] (/Users/jeff/code/projects/bsky/posta/node_modules/node_modules/.pnpm/[email protected]/node_modules/varint/decode.js:17:13)
    at readVarint (/Users/jeff/code/projects/bsky/posta/node_modules/node_modules/.pnpm/@[email protected]/node_modules/@ipld/car/esm/lib/decoder.js:12:20)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async readHeader (/Users/jeff/code/projects/bsky/posta/node_modules/node_modules/.pnpm/@[email protected]/node_modules/@ipld/car/esm/lib/decoder.js:17:18)
    at async decodeReaderComplete (/Users/jeff/code/projects/bsky/posta/node_modules/node_modules/.pnpm/@[email protected]/node_modules/@ipld/car/esm/lib/reader-browser.js:51:28)

It doesn't seem to cause problems, I think it's just running into some data it doesn't like at the ipld level.

@maximesimoncelli
Copy link
Author

I've sen this in my own feed service:

repo subscription could not handle message RangeError: Could not decode varint
    at Object.read3 [as decode] (/Users/jeff/code/projects/bsky/posta/node_modules/node_modules/.pnpm/[email protected]/node_modules/varint/decode.js:17:13)
    at readVarint (/Users/jeff/code/projects/bsky/posta/node_modules/node_modules/.pnpm/@[email protected]/node_modules/@ipld/car/esm/lib/decoder.js:12:20)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async readHeader (/Users/jeff/code/projects/bsky/posta/node_modules/node_modules/.pnpm/@[email protected]/node_modules/@ipld/car/esm/lib/decoder.js:17:18)
    at async decodeReaderComplete (/Users/jeff/code/projects/bsky/posta/node_modules/node_modules/.pnpm/@[email protected]/node_modules/@ipld/car/esm/lib/reader-browser.js:51:28)

It doesn't seem to cause problems, I think it's just running into some data it doesn't like at the ipld level.

Yep, no real problem, just a minor annoyance from time to time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants