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

Logger can't serialize BigInt's #228

Open
pixtron opened this issue Jan 22, 2020 · 0 comments
Open

Logger can't serialize BigInt's #228

pixtron opened this issue Jan 22, 2020 · 0 comments

Comments

@pixtron
Copy link
Member

pixtron commented Jan 22, 2020

Describe the bug

When logging an object with a BigInt Uncaught TypeError: Do not know how to serialize a BigInt is thrown.

To Reproduce

There are two known cases in sync module where BigInt's are logged:

https://github.com/gyselroth/balloon-node-sync/blob/97bd70918eeaa901d74f743dfb878fbb619068f8/lib/delta/delta.js#L423
https://github.com/gyselroth/balloon-node-sync/blob/97bd70918eeaa901d74f743dfb878fbb619068f8/lib/delta/delta.js#L445

There are

Expected behavior

Logger should serialize BigInt's to a string.

Environment

  • desktop client version: v1.3.x (4b83690)

Additional context

See: davidmarkclements/fast-safe-stringify/issues/41

Uncaught TypeError: Do not know how to serialize a BigInt
    at JSON.stringify (<anonymous>)
    at JsonStringify (/Users/.../balloon-client-desktop/node_modules/fast-safe-stringify/index.js:18)
    at stringify (/Users/.../balloon-client-desktop/node_modules/fast-safe-stringify/index.js:27)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant