mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #5821] [Bug]: settings: subUpdates silently capped at 168h in 3.x — blocks all settings saves after upgrade from 2.x #4042
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#4042
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 @igrek59rd-coder on GitHub (Jul 5, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5821
Describe the bug
After upgrading from 2.x to 3.x, saving any panel settings fails with
subUpdates: Invalid input. There is no hint in the UI about what value is invalid or what the allowed range is.Root cause
The maximum allowed value for
subUpdates(Profile Update Interval) was silently lowered in 3.x — values above 168 hours are now rejected. Users who had a value higher than 168 in 2.x (e.g. 720) are stuck: their stored value is no longer valid, but there is no migration, no clamp, and no error message indicating the allowed range.How to reproduce the problem
subUpdatesto a value above 168 (e.g. 720).subUpdates: Invalid inputExpected behavior
One or more of the following:
1–168 hours) next to the input.subUpdates: must be between 1 and 168.Actual behavior
Saving any settings is blocked with a generic
subUpdates: Invalid inputerror. The user has no way to know which tab contains the offending field or what value is acceptable without trial and error.Relevant logs
Screenshots
3x-ui version
3.3.4
Xray-core version
26.6.27
How did you install 3x-ui?
install.sh script
Operating system
Ubuntu 24.04
Which parts of the panel are affected?
Frontend (UI / panel pages)
Browser (only if it is a UI bug)
Chrome 150.0.7871.46
Is the panel behind a reverse proxy or CDN?
Yes — Nginx
Before submitting
@github-actions[bot] commented on GitHub (Jul 5, 2026):
Confirmed in the current source — this is a frontend-only regression, not an intentional new limit.
Root cause
frontend/src/pages/settings/SettingsPage.tsx:126validates the entire settings object in one shot before saving anything:AllSettingSchema(frontend/src/schemas/setting.ts:56) declares:Since this check runs against the whole settings payload on every save, one stale out-of-range field (
subUpdates) blocks saving any tab — exactly what you're seeing.That
168cap does not match the server side at all:internal/web/entity/entity.go:88:validate:"gte=0,lte=525600".frontend/src/generated/zod.ts:92:z.number().int().min(0).max(525600).So the backend (and the generated schema derived from it) already accepts values well above 168 — the
168ceiling exists only in the hand-maintainedfrontend/src/schemas/setting.ts, out of sync with the backend limit. It isn't a documented "1 week max" design change, and theInputNumberinfrontend/src/pages/settings/SubscriptionGeneralTab.tsx:82only setsmin={1}with nomaxand no range hint in the UI, so there is no way to discover the limit except by triggering the error.I checked the latest release (v3.4.2) and the current
dev-latestbuild; the code is unchanged there, so this is not yet fixed in any released version.Workaround until this is addressed
Since the UI itself cannot save while this value is out of range, you will need to clamp it directly in the database:
(Adjust the path if you set a custom
XUI_DB_FOLDER.) After that, the Panel Settings page should load and save normally again; you can then decide whether 168 hours is acceptable or wait for the frontend cap to be corrected to match the backend's actual limit.This reply was generated automatically; a maintainer may follow up.