mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 01:06:00 +03:00
[GH-ISSUE #5155] [feature]: add high-precision number support for desktop app #1962
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#1962
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @auzundere on GitHub (Jun 16, 2025).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/5155
Originally assigned to: @CuriousCorrelation on GitHub.
Is there an existing issue for this?
Current behavior
When I pass a data like in the request body
"dsid": 990000000262240065Then it converts to the dsid value to
"dsid": 990000000262240100I cannot wrap with double quote because my server/API cannot allow different data type, it should stay the same data type as numerical.
Steps to reproduce
Logs and Screenshots
Environment
Production
Hoppscotch Version
Cloud (Desktop App for Mac OS)
Interceptor
Not Applicable - Issue not related to network requests
Browsers Affected
No response
Operating System
None
Additional Information
No response
@CuriousCorrelation commented on GitHub (Jun 19, 2025):
Hi @auzundere, this isn't actually a bug in the traditional sense, it's a JavaScript limitation where numbers larger than MAX_SAFE_INTEGER (2^53 - 1) lose precision.
The number
990000000262240065you mentioned exceeds this limit, so standard parsing tends to lose precision there.And although this isn't quite possible on the web app without usage of string at some point, this certainly is an interesting feature request for the desktop app which can bypass such restrictions, and something I'll definitely consider, a PoC draft is already up for this but there are some edge cases to be considered.
For now I'm changing the ticket to be a feature request with title "[features]: add high-precision number support for desktop app" instead so it'll encompass the constraints and help us track this better.
Thanks for suggesting this! 🎯
@auzundere commented on GitHub (Jun 25, 2025):
@CuriousCorrelation any ETA to complete this feature request?
@CuriousCorrelation commented on GitHub (Jun 25, 2025):
Unsure at the moment, but planning to tackle this very soon.
Progress right now is that this feature requires some changes to the
relaycomponent, which is a major part of the core networking machinery that powers the entire request-response flow.Any modifications to the underlying networking stack need to go through a lot of consideration and review channels, which is why this might need extra care with the impl.
I'll keep you updated as we make progress. Appreciate your patience.
@auzundere commented on GitHub (Jun 30, 2025):
@CuriousCorrelation thank you.
@auzundere commented on GitHub (Jul 9, 2025):
@CuriousCorrelation Any updates so far? My application consistently uses DSIDs greater than 2^53 - 1, and as a result, I’m currently blocked from sending requests through the Desktop Application.
@CuriousCorrelation commented on GitHub (Jul 10, 2025):
Hi @auzundere, just wanted to check if you are you still experiencing this precision loss issue on the latest desktop app build?
We actually implemented a fix for a separate sub-system that was partially also a workaround for this issue. It essentially changes how json content is processed to treat it as text rather than parsing them through js' number system.
Could you please confirm you're running the latest version of the desktop app and test with one of your problematic DSID values to see if the precision is now preserved?
This will help me determine if there are any edge cases the current workaround doesn't cover, or if we need to investigate further. A more complete high-precision number support at the relay level is still in development, but that workaround should unblock you for now.
@auzundere commented on GitHub (Jul 14, 2025):
@CuriousCorrelation I just tested this on version 25.6.0 and I’m still seeing the same issue. It’s not limited to POST requests—I’m also seeing GET requests return altered dsid values.
For example, the expected dsid stored in the DB looks like this:
However, when making a GET request using the Hoppscotch Desktop app on Mac, I receive:
But when I test the same request using Postman, I receive the correct dsid:
So it seems the issue persists, and it’s not the correct behavior.
@CuriousCorrelation commented on GitHub (Jul 15, 2025):
Hi @auzundere, thanks for testing on the latest version, also I appreciate the details.
I've been trying to reproduce this with the exact DSID values you mentioned (
990000000262257282) using version 25.6.0 on the same Cloud Desktop App for Mac OS setup. The strange thing is that in my tests, the DSID values are coming through correctly without any precision loss:Notice I'm seeing
990000000262257282in both requests and responses when testing against remote (httpbin's echo response) APIs and local servers (nc -l 8080which simply displays what it got).Perhaps I am missing some context regarding the exact config or the request you are making. Also wondering if this happens every single time or just sometimes. A screenshot showing the precision loss like above would be really helpful to understand all the surrounding context!
Thanks again for your patience
@auzundere commented on GitHub (Jul 15, 2025):
@CuriousCorrelation After today’s patch update, I’m now receiving the correct response and the payload is also sent correctly. Thank you so much for the help!
I have a quick question — I’m trying to self-host the Desktop Application on my Mac. Could you please provide detailed steps to achieve this? I tried following the documentation, but ran into several issues while running pnpm commands.
I believe I could run it locally using Docker, but I’m facing problems building the Docker image. Any guidance on how to set this up would be greatly appreciated.
@CuriousCorrelation commented on GitHub (Jul 16, 2025):
That's fantastic to hear @auzundere 🎉 glad I could help!
Just to clarify, when you mention wanting to "self-host the Desktop Application," I'm assuming you mean building the desktop app locally from source?
The term "self-host" in the Hoppscotch context typically refers to using our Docker image to host the Hoppscotch platform locally, and any desktop app distribution (whether our official release or locally built) can connect to that self-hosted instance via the instance switcher in the top-left corner.
You can find detailed instructions for setting up and connecting to self-hosted instances in the Desktop App README and also the Hoppscotch SH Edition section of the official docs.
For troubleshooting those
pnpmerrors, Docker image building issues, and general setup help with connecting to self-hosted instances, I'd recommend checking the Discussions tab; there are some existing threads that might help, but if they don't cover your specific issue, feel free to start a new discussion with the exact error messages you're seeing.I'll be happy to help there.
Since the original precision issue has been resolved, I'll go ahead and close this issue. Thanks for your patience throughout! 🚀
@auzundere commented on GitHub (Jul 17, 2025):
Thanks @CuriousCorrelation! Yes, I meant building the desktop app locally from source — and I’ve now successfully set up the on-premise instance. Everything is working great. Really appreciate your guidance throughout! 🙌