mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #5464] [Bug]: Clients Page Crashes on Page 2 #3822
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#3822
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 @ItsEhsanMM on GitHub (Jun 21, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5464
Describe the bug
When navigating to the second page of the Clients list, the web panel crashes and displays an "Unexpected Application Error".
How to reproduce the problem
1.Open the X-UI web panel.
2.Go to Clients.
3.Navigate to Page 2 of the clients list.
4.The page crashes immediately.
Expected behavior
The second page of clients should load normally.
Actual behavior
The application throws the following error:
Unexpected Application Error!
date value is not finite in DateTimeFormat.format()
Relevant logs
Screenshots
No response
3x-ui version
3.3.1
Xray-core version
26.4.25
How did you install 3x-ui?
install.sh script
Operating system
ubuntu 24.0.4
Which parts of the panel are affected?
No response
Browser (only if it is a UI bug)
firefox
Is the panel behind a reverse proxy or CDN?
None
Before submitting
@github-actions[bot] commented on GitHub (Jun 21, 2026):
The crash is caused by a missing validity check in
IntlUtil.formatDate(frontend/src/utils/index.ts:937). The function callsintl.format(new Date(date))without first verifying that the resultingDateobject is finite and valid.JavaScript's
Dateonly accepts values up to ±8,640,000,000,000,000 milliseconds from the Unix epoch (roughly year 275,760). The backend storesExpiryTimeas a Goint64, which can hold values far beyond that limit. A client record whoseexpiryTimeexceeds8_640_000_000_000_000will causenew Date(expiryTime)to returnInvalid Date(whose.getTime()isNaN), andIntl.DateTimeFormat.format(Invalid Date)then throws"date value is not finite in DateTimeFormat.format()".The rendering chain that triggers the crash in
ClientsPage.tsx:expiryLabel(line 391–397) guards against0,null,undefined, and negative values, but passes any positive value directly toIntlUtil.formatDate. A very large positiveexpiryTimethat is outside the JavaScript Date range therefore reachesintl.format()unguarded.Confirming the affected code (
frontend/src/utils/index.ts:920–938):Minimal fix — add a finite-check before calling
format:To identify the offending record you can query the database directly:
Any row returned has an
expiry_timethat JavaScript cannot represent as a validDate. You can correct individual records through the panel's edit form (set expiry to a realistic date or to "never"), or via the API. Once the offending record is corrected the page will load again without a code change.The fix in
IntlUtil.formatDateshould be applied in the source regardless, so that a single corrupt or out-of-range date value cannot crash the entire page for all users.This reply was generated automatically; a maintainer may follow up.