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

Payload decoding fails on large decimal number #1171

Closed
mjameswh opened this issue Feb 20, 2023 · 0 comments
Closed

Payload decoding fails on large decimal number #1171

mjameswh opened this issue Feb 20, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@mjameswh
Copy link

Describe the bug

A workflow's history contains some JSON payload (json/plain) and some field inside that payload is a decimal number of at least 15 characters. When inspecting that workflow in UI, the payload does not get decoded, and a warning message is displayed in the browser console, such as:

Could not parse payload:  SyntaxError: Cannot convert 0.2345678901234568 to a BigInt (at parse-with-big-int-f9a90488.js)

To Reproduce

Run this workflow, then open that workflow's in UI:

async myWorkflow() {
  return { result: 0.2345678901234568 };
}

Additional context

This is due to a bug in json-bigint, which has been fixed months ago in that project's master branch. However, no NPM release has been published in years. Given that json-bigint is MIT licensed, it might make sense to fork it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants