Closed Bug 1964888 Opened 1 year ago Closed 1 year ago

Large integers not rendered in JSON view

Categories

(DevTools :: JSON Viewer, defect, P2)

Firefox 138
defect

Tracking

(firefox-esr128 unaffected, firefox138 wontfix, firefox139 wontfix, firefox140 fixed)

RESOLVED FIXED
140 Branch
Tracking Status
firefox-esr128 --- unaffected
firefox138 --- wontfix
firefox139 --- wontfix
firefox140 --- fixed

People

(Reporter: neumann, Assigned: jdescottes)

References

Details

Attachments

(2 files, 1 external file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:138.0) Gecko/20100101 Firefox/138.0

Steps to reproduce:

  • Create a file "test.json"
  • Add the following content: "9999999999999999"
  • Open file in Firefox 138.0.1 (64-Bit)

Actual results:

  • See empty JSON view

Expected results:

  • See number "9999999999999999" in JSON view

If you change the number to e.g. "9999999999999998" and reload the page, the correct number is shown in the JSON view.

In any case the source code view ([Ctrl]+[U]) always shows the correct number.

The Bugbug bot thinks this bug should belong to the 'DevTools::General' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → General
Product: Firefox → DevTools

we should check the spec to see how JSON is supposed to handle big integers. But in any case, if there's an error we should at least display the raw data tab, and show a warning.

Severity: -- → S3
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P3

FWIW: The error does not occur when the integer is not the "bare" JSON object, but nested within a JSON object.

{ "n": 9999999999999999, "even_larger_n": 99999999999999999999999999999999999999999999999999999999 }

This is actually a regression, in ESR128 it worked fine. Potentially from Bug 1431808 ?

Component: General → JSON Viewer
Priority: P3 → P2
See Also: → 1431808

Confirmed this is a regression in Firefox 136.

We should special case the JSON_NUMBER type in the JSON viewer panel component,
otherwise it will attempt to render it as a tree.

Assignee: nobody → jdescottes
Status: NEW → ASSIGNED
Pushed by jdescottes@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a68996b702e7 [devtools] Fix JSON viewer rendering for JSON_NUMBER at the root r=devtools-reviewers,ochameau
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 140 Branch

The patch landed in nightly and beta is affected.
:jdescottes, is this bug important enough to require an uplift?

For more information, please visit BugBot documentation.

Flags: needinfo?(jdescottes)

Even though it's a regression I feel like it's still an edge case and can ride the trains.

Flags: needinfo?(jdescottes)
See Also: → 1965996

Note that we have the same issue in the Netmonitor response panel, see Bug 1965996

QA Whiteboard: [qa-triage-done-c141/b140]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: