mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #4830] [Bug]: Inbounds page does not load after update #3361
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#3361
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 @maa3x on GitHub (Jun 2, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/4830
Describe the bug
How to reproduce the problem
Use the following database: [xxxxx
In the panel, select
Inboundsfrom the sidebar.Expected behavior
No response
Actual behavior
No response
Relevant logs
Screenshots
No response
3x-ui version
3.2.5
Xray-core version
26.6.1
How did you install 3x-ui?
install.sh script
Operating system
Ubuntu 24.04
Which parts of the panel are affected?
Backend (API endpoints, login, settings)
Browser (only if it is a UI bug)
No response
Is the panel behind a reverse proxy or CDN?
Yes — Caddy
Before submitting
@github-actions[bot] commented on GitHub (Jun 2, 2026):
Thanks for the detailed report and the database file — that makes this much easier to diagnose.
Root cause
When the Inbounds page loads it calls the
/defaultSettingsendpoint, which reads several integer settings from the database (pageSize,expireDiff,trafficDiff, etc.). The setting service falls back to its built-in defaults only when a key is absent from the database; if the row exists but itsvaluecolumn is an empty string"",strconv.Atoi("")is called directly, producing the error you see:Your migrated database likely contains one or more setting rows with an empty value for a key that is now expected to be an integer.
Workaround
You can fix the affected rows directly with the SQLite CLI (stop the panel first):
Adjust the path to
x-ui.dbif you used a custom install location. After the update the Inbounds page should load normally.Underlying issue
The
getInthelper should treat an empty stored value the same as a missing row and fall back to the default — it currently does not. This is a code-level fix that should prevent the crash for any setting whose value ends up empty in the database.@MHSanaei commented on GitHub (Jun 2, 2026):
Fixed.
Root cause: Your database had a
pageSizesetting row whosevaluecolumn was NULL (a few other rows too). The panel reads such a row as an empty string and parsed it directly, sostrconv.Atoi("")failed withparsing "": invalid syntax. The Inbounds page triggers this via/defaultSettings→GetPageSize, which is why the page didn't load. The Settings page had the same exposure.Fix: The setting service now treats an empty/NULL value the same as a missing row and falls back to the built-in default at the integer/bool parse sites (
getInt,getBool, and the settings reflection path). String settings that are legitimately empty (e.g. Sub Domain) are left untouched.Verified end-to-end using the database you shared: after the fix,
/panel/setting/defaultSettingsand/panel/setting/allboth load andpageSizeresolves to the default25— no DB editing needed, the panel self-heals any empty/NULL setting value.Thanks for attaching the database — it made the root cause unambiguous. Will ship in the next release.