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 while decoding with largeBigIntToFloat: true, enabled #82

Open
livelove1987 opened this issue Aug 22, 2023 · 5 comments
Open

Comments

@livelove1987
Copy link

livelove1987 commented Aug 22, 2023

image - with this code i still get error while trying to decode data. Full error RangeError: 3866570211328656136252311744600662103021 was too large to fit in CBOR 64-bit integer format, set largeBigIntToFloat to convert to float-64.

Also i see that in decode.js there is not keyword like largeBigIntToFloat

@livelove1987
Copy link
Author

Nice lib!!! Fuck this shit

@kriszyp
Copy link
Owner

kriszyp commented Oct 22, 2023

I don't understand how to reproduce this. The reported error is an encoding error, but the image of a code sample above only shows decoding, and is not itself a reproducible code sample. Do you have a specific code sample that can be executed that shows the problem?

@livelove1987
Copy link
Author

no i dont have , i know that this happens for values of big objects. @kriszyp

Thats like full error

RangeError: 4063412740216055739805618382074543969456 was too large to fit in CBOR 64-bit integer format, set largeBigIntToFloat to convert to float-64
bot:start:     at encode (file:///workspace/node_modules/cbor-x/encode.js:588:13)
bot:start:     at file:///workspace/node_modules/cbor-x/encode.js:645:7
bot:start:     at encode (file:///workspace/node_modules/cbor-x/encode.js:472:7)
bot:start:     at file:///workspace/node_modules/cbor-x/encode.js:645:7
bot:start:     at encode (file:///workspace/node_modules/cbor-x/encode.js:472:7)
bot:start:     at file:///workspace/node_modules/cbor-x/encode.js:645:7
bot:start:     at encode (file:///workspace/node_modules/cbor-x/encode.js:472:7)
bot:start:     at Encoder.encode (file:///workspace/node_modules/cbor-x/encode.js:183:5)
bot:start:     at LogUpdateEvent (file:///workspace/apps/bot/dist/functions/Logs.js:43:63)
bot:start:     at messageUpdateLog (file:///workspace/apps/bot/dist/events/messages/messageUpdate.js:14:15)

@livelove1987
Copy link
Author

livelove1987 commented Nov 8, 2023

And the 4063412740216055739805618382074543969456 is value of discord avatar hashe

@livelove1987
Copy link
Author

Using "cbor-x": "^1.5.4" version

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

2 participants