[GH-ISSUE #4837] [Bug]: Refreshing the page in the browser with the Groups tab open returns a 404 error. #3368

Closed
opened 2026-10-31 20:31:57 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @Ramazik on GitHub (Jun 3, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/4837

Describe the bug

I noticed this error back in version 3.2. If I open the 3x-ui panel in the Groups section and then try refreshing the browser page (CTRL+R in MS Edge), the page doesn't refresh as expected, but displays "HTTP ERROR 404 - Web page not found for the web address: https://panel.site.com:5555/G56ZGDFH45jj456/panel/groups" (domain name changed for example purposes).

This doesn't happen with other pages of other menu items.

How to reproduce the problem

The explanation is given above.

Expected behavior

No response

Actual behavior

No response

Relevant logs


Screenshots

No response

3x-ui version

3.2.6

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?

No response

Browser (only if it is a UI bug)

MS Edge148.0.3967.96 (Windows 11 Pro 25H2)

Is the panel behind a reverse proxy or CDN?

None

Before submitting

  • I searched existing issues and this bug has not been reported.
  • I am running the latest released version of 3x-ui (or have verified the bug still exists on it).
  • This bug report is written in English.
  • I have redacted any sensitive data (tokens, real domains, client UUIDs).
Originally created by @Ramazik on GitHub (Jun 3, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/4837 ### Describe the bug I noticed this error back in version 3.2. If I open the 3x-ui panel in the Groups section and then try refreshing the browser page (CTRL+R in MS Edge), the page doesn't refresh as expected, but displays "HTTP ERROR 404 - Web page not found for the web address: https://panel.site.com:5555/G56ZGDFH45jj456/panel/groups" (domain name changed for example purposes). This doesn't happen with other pages of other menu items. ### How to reproduce the problem The explanation is given above. ### Expected behavior _No response_ ### Actual behavior _No response_ ### Relevant logs ```shell ``` ### Screenshots _No response_ ### 3x-ui version 3.2.6 ### 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? _No response_ ### Browser (only if it is a UI bug) MS Edge148.0.3967.96 (Windows 11 Pro 25H2) ### Is the panel behind a reverse proxy or CDN? None ### Before submitting - [x] I searched [existing issues](../issues?q=is%3Aissue) and this bug has not been reported. - [x] I am running the latest released version of 3x-ui (or have verified the bug still exists on it). - [x] This bug report is written in English. - [x] I have redacted any sensitive data (tokens, real domains, client UUIDs).
bsakaguchi 2026-10-31 20:31:57 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@github-actions[bot] commented on GitHub (Jun 3, 2026):

Thanks for the clear report — this is a confirmed backend routing bug.

Root cause

When you open /panel/groups through the React SPA (client-side navigation), the browser never actually fetches that URL from the server, so it works fine. But when you press F5 / Ctrl+R, the browser sends a fresh GET request directly to the server for the path /<basepath>/panel/groups. The Go/Gin backend has no registered handler for that path, so it falls through to the global NoRoute 404 handler.

You can see the registered SPA routes in web/controller/xui.go (lines 39–45):

g.GET("/", a.panelSPA)
g.GET("/inbounds", a.panelSPA)
g.GET("/clients", a.panelSPA)
g.GET("/nodes", a.panelSPA)
g.GET("/settings", a.panelSPA)
g.GET("/xray", a.panelSPA)
g.GET("/api-docs", a.panelSPA)

/groups is simply missing from this list. Every other menu entry has a matching g.GET(...) registration so the server can return index.html and let React Router take over — /groups does not.

Fix

Adding g.GET("/groups", a.panelSPA) to that block in web/controller/xui.go (after the /api-docs line) is all that is needed. A pull request would be very welcome.

<!-- gh-comment-id:4607961532 --> @github-actions[bot] commented on GitHub (Jun 3, 2026): Thanks for the clear report — this is a confirmed backend routing bug. **Root cause** When you open `/panel/groups` through the React SPA (client-side navigation), the browser never actually fetches that URL from the server, so it works fine. But when you press **F5 / Ctrl+R**, the browser sends a fresh GET request directly to the server for the path `/<basepath>/panel/groups`. The Go/Gin backend has no registered handler for that path, so it falls through to the global `NoRoute` 404 handler. You can see the registered SPA routes in [`web/controller/xui.go`](https://github.com/MHSanaei/3x-ui/blob/main/web/controller/xui.go) (lines 39–45): ```go g.GET("/", a.panelSPA) g.GET("/inbounds", a.panelSPA) g.GET("/clients", a.panelSPA) g.GET("/nodes", a.panelSPA) g.GET("/settings", a.panelSPA) g.GET("/xray", a.panelSPA) g.GET("/api-docs", a.panelSPA) ``` `/groups` is simply missing from this list. Every other menu entry has a matching `g.GET(...)` registration so the server can return `index.html` and let React Router take over — `/groups` does not. **Fix** Adding `g.GET("/groups", a.panelSPA)` to that block in `web/controller/xui.go` (after the `/api-docs` line) is all that is needed. A pull request would be very welcome.
Author
Owner

@MHSanaei commented on GitHub (Jun 3, 2026):

Fixed in commit ccfd0421 — added the missing g.GET("/groups", a.panelSPA) registration in web/controller/xui.go so a hard refresh on the Groups page returns the SPA shell instead of a 404. Thanks for the report!

<!-- gh-comment-id:4608020287 --> @MHSanaei commented on GitHub (Jun 3, 2026): Fixed in commit ccfd0421 — added the missing `g.GET("/groups", a.panelSPA)` registration in `web/controller/xui.go` so a hard refresh on the Groups page returns the SPA shell instead of a 404. Thanks for the report!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#3368
No description provided.