mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #3001] 2fa button cannot be interacted with #2003
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#2003
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 @ckun52880 on GitHub (May 13, 2025).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/3001
Describe the bug
Clicking the two-factor authentication button does not respond and interaction is unavailable
How to repeat the problem?
https://github.com/user-attachments/assets/7ef690cd-f2dc-46af-9637-8b1b39136ab4
Expected action
2fa is not working
Received action
2fa is not working
3x-ui Version
Version built on May 12, 2025 from the latest code on the main branch via GitHub Actions.
Xray-core Version
v25.4.30
Checklist
@sh1shd commented on GitHub (May 13, 2025):
Hello!
I cannot replicate this bug, two-factor authentication works correctly.
The test was done on a build based on the
7a5a833af3commit, with a completely clean installation.Demo
https://github.com/user-attachments/assets/2e0c327e-ec69-42ef-9330-6fcbbd9b8986
Perhaps the problem is solved by hard reloading the page with clearing the cache.
If the problem is not solved, you can tell me the browser version and logs from the console.
@ckun52880 commented on GitHub (May 13, 2025):
error:
vue.min.js?2.5.8:6 TypeError: RandomUtil.randomBase32String is not a function
at Er.toggleTwoFactor (settings:1296:48)
at _n (vue.min.js?2.5.8:6:22257)
at a.r (vue.min.js?2.5.8:6:10679)
at _n (vue.min.js?2.5.8:6:22257)
at a.$emit (vue.min.js?2.5.8:6:44724)
at a.handleClick (antd.min.js:2:1221856)
at _n (vue.min.js?2.5.8:6:22257)
at HTMLButtonElement.r (vue.min.js?2.5.8:6:10679)
at HTMLButtonElement. (vue.min.js?2.5.8:6:59895)
$n @ vue.min.js?2.5.8:6
bn @ vue.min.js?2.5.8:6
yn @ vue.min.js?2.5.8:6
_n @ vue.min.js?2.5.8:6
r @ vue.min.js?2.5.8:6
_n @ vue.min.js?2.5.8:6
(匿名) @ vue.min.js?2.5.8:6
handleClick @ antd.min.js:2
_n @ vue.min.js?2.5.8:6
r @ vue.min.js?2.5.8:6
(匿名) @ vue.min.js?2.5.8:6
browser version:Microsoft Edge v136.0.3240.64
@shishkevichd
@sh1shd commented on GitHub (May 13, 2025):
Have you tried a hard reload page with cache cleaning?
@ckun52880 commented on GitHub (May 13, 2025):
Hello, after using the cache clearing function to hard reload the page, I noticed that your operation was done under HTTP. I also tried it, and it indeed works for both HTTP and HTTPS, but it doesn't work when nginx is reverse proxying HTTPS.
@ckun52880 commented on GitHub (May 13, 2025):
I don't really understand.the following analysis of AI; I'm just a user.
The error occurred in assets/vue/vue.min.js?2.5.8
The following is a further explanation of this piece of code and the error:
And the complete stack reported by the console:
Here’s an English explanation you can share with your frontend team:
1. What That
$nFunction Is DoingIn Vue’s minified code, you’ll see an internal helper that looks like this:
qis a compile-time flag:q === trueq === falseIn development (
q === true)!qisfalse, so Vue skips thethrowand just logs the error withconsole.error(error).In production (
q === false)!qistrue, so Vue immediately doesthrow error.2. How This Relates to Your 2FA Button
Root JavaScript Error
toggleTwoFactormethod is callingRandomUtil.randomBase32String(), but that function doesn’t exist (or wasn’t imported), causing aTypeError.Development vs. Production Behavior
TypeErrorto the console but continues, so your button still works (albeit with a warning).TypeErrorvia$n, stopping the click handler and making the button appear unresponsive.3. Why It Worked When You Bypassed Nginx
q === true), which only logs and does not throw.q === false), which throws and halts execution.4. Recommended Fixes
Restore or Export the Missing Function
RandomUtil.randomBase32Stringis correctly defined in your utility module and properly imported into the component.Add a Try/Catch Around the Call
Verify Build and Deployment Pipeline
With this information, the frontend team can see that the unresponsive button is caused by a missing function in production combined with Vue’s production error-throwing behavior, rather than anything to do with Nginx.
thanks for sticking with this until the end
@shishkevichd
@ckun52880 commented on GitHub (May 14, 2025):
Please analyze this. Thank you.
@shishkevichd @MHSanaei
@MHSanaei commented on GitHub (May 14, 2025):
there is no problem!!
try with another browser