Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[Bug]: Fauxton silently corrupts integers larger than `Number.MAX_SAFE_INTEGER`

Open
#6,008 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
javascript

Research direction

Reproduce the issue using the provided document and save it through the Fauxton Web UI, then inspect the document editor and its JSON parsing or serialization path. Done means reopening and fetching the document preserves 9223372036854775807 exactly; add or run coverage for the reported large-integer case if the relevant Fauxton tests are located.

Written by the indexing model from the issue text.

Description

bug fauxton javascript patches-welcome
Version

3.3.3

Describe the problem you're encountering

Documents containing integers larger than JavaScript Number.MAX_SAFE_INTEGER are stored correctly by CouchDB itself.

However, when such a document is opened and saved through the Fauxton Web UI, the integer is silently rounded/truncated due to JavaScript number precision limits, corrupting the document.

Expected Behaviour

The integer value should remain unchanged after editing/saving via Fauxton.

Steps to Reproduce
  1. Insert a document containing a large integer:
{
  "_id": "large-int-test",
  "hugeNumber": 9223372036854775807
}
  1. Open the document in Fauxton.
  2. Save the document.
  3. Fetch the document again.
Actual Result
{
  "_id": "large-int-test",
  "_rev": "1-242234d64bf45499ef1d622e1a0f8237",
  "hugeNumber": 9223372036854776000
}
Your Environment

No response

Additional Context

No response

Dominant language
Erlang
Stars
7k
Forks
1.1k
Avg merge
2d 10h
Merged PRs (30d)
18

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/couchdb

All issues in apache/couchdb

Similar issues

More Databases issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.