[BUG] LOG entries: RangeError [ERR_OUT_OF_RANGE]: The value of "offset" is out of range. It must be >= 0 && <= 17825792.
See original GitHub issueDescribe the bug Some downloads cause this to appear in the log:
RangeError [ERR_OUT_OF_RANGE]: The value of "offset" is out of range. It must be >= 0 && <= 17825792. Received 17825795
at validateOffset (node:buffer:115:3)
at Buffer.write (node:buffer:1066:5)
at serializeObject (/app/node_modules/bson/lib/bson/parser/serializer.js:342:14)
at serializeInto (/app/node_modules/bson/lib/bson/parser/serializer.js:947:17)
at serializeObject (/app/node_modules/bson/lib/bson/parser/serializer.js:347:18)
at serializeInto (/app/node_modules/bson/lib/bson/parser/serializer.js:947:17)
at serializeObject (/app/node_modules/bson/lib/bson/parser/serializer.js:347:18)
at serializeInto (/app/node_modules/bson/lib/bson/parser/serializer.js:947:17)
at serializeObject (/app/node_modules/bson/lib/bson/parser/serializer.js:347:18)
at serializeInto (/app/node_modules/bson/lib/bson/parser/serializer.js:729:17)
at serializeObject (/app/node_modules/bson/lib/bson/parser/serializer.js:347:18)
at serializeInto (/app/node_modules/bson/lib/bson/parser/serializer.js:947:17)
at BSON.serialize (/app/node_modules/bson/lib/bson/bson.js:64:28)
at Msg.serializeBson (/app/node_modules/mongodb/lib/core/connection/msg.js:127:22)
at Msg.makeDocumentSegment (/app/node_modules/mongodb/lib/core/connection/msg.js:119:33)
at Msg.toBin (/app/node_modules/mongodb/lib/core/connection/msg.js:105:25) {
code: 'ERR_OUT_OF_RANGE'
}
Not sure what this will cause for our instance’s mongoDB data integrity?
To Reproduce Steps to reproduce the behavior:
I get this on some subscription downloads (and I think one-offs as well).
I’m sussing this may have something to do with the info.json being too large to ingress into mongodb when you have enabled to download comments, since they all get written into the info.json.
Expected behavior
for the log to not receive this STERR and if my assumption above about the reason for this appearing is correct:
Maybe YTDL-M should truncate the comment part out of the query to mongoDB and rely on the info.json to load the comments when we implement displaying them. (#289) Writing to the DB that we DO have the comments downloaded would suffice.
Screenshots n/a
Environment
- Installed version: v4.2
- Installation type: docker Docker tag: nightly Commit hash: d5c1361 Build date: 2022-04-24
Additional context n/a
Issue Analytics
- State:
- Created a year ago
- Comments:9 (4 by maintainers)
Currently please use
nightly
tag ratherlatest
tag.Can you give a few more details/logs? It should be relatively easy to switch back
The error appears to be MongoDB related, not surprised it only happens then