nofx icon indicating copy to clipboard operation
nofx copied to clipboard

[BUG] 🔴 [Critical] Frontend login failure and real-time page freeze / 前端登錄失敗與實時頁面卡死

Open the-dev-z opened this issue 1 year ago • 1 comments

Issue #1: 前端登錄失敗與實時頁面卡死 / Frontend Login Failure and Real-time Page Freeze

🐛 問題描述 / Bug Description

中文

拉取最新 dev 分支後,用戶遇到以下問題:

  1. 首頁正常加載
  2. 點擊「實時」頁面後應用程序卡死
  3. 嘗試登錄時失敗並顯示錯誤信息

English

After pulling the latest dev branch, users experience:

  1. Homepage loads normally
  2. Clicking "Real-time" (实时) page causes the application to freeze
  3. Login attempts fail with error message

📋 重現步驟 / Steps to Reproduce

中文

  1. 拉取最新 dev 分支:git pull origin dev
  2. 啟動應用:go run main.go 和 cd web && npm run dev
  3. 打開首頁 - 正常運行
  4. 點擊「實時」導航
  5. 結果:頁面無響應
  6. 嘗試使用正確憑證登錄
  7. 結果:登錄失敗

English

  1. Pull latest dev branch: git pull origin dev
  2. Start the application: go run main.go and cd web && npm run dev
  3. Open homepage - works fine
  4. Click "Real-time" (实时) navigation
  5. Result: Page becomes unresponsive
  6. Try to login with valid credentials
  7. Result: Login fails

🎯 預期行為 / Expected Behavior

中文

  • 實時頁面應正常加載
  • 使用正確憑證應該能成功登錄

English

  • Real-time page should load normally
  • Login should succeed with correct credentials

❌ 實際行為 / Actual Behavior

中文

  • 實時頁面凍結/掛起
  • 登錄失敗(登录失败)

English

  • Real-time page freezes/hangs
  • Login fails (登录失败)

🌍 環境信息 / Environment

  • 分支 / Branch: dev (latest)
  • 提交 / Commit: e0f1950 or later
  • 瀏覽器 / Browser: Not specified
  • 報告者 / Reporter: Skilling (Community user)

🔍 可能原因 / Possible Causes

中文

根據最近的提交,問題可能與以下相關:

  1. PR #537 - Google Authenticator 密碼重置功能

    • 提交:db68689
    • 可能引入了登錄流程的破壞性變更
  2. PR #533 - 前端 linting 修復

    • 提交:eb515d7
    • 可能存在不完整的錯誤處理
  3. PR #522 - 還原系統提示更改

    • 提交:0f98e06
    • 可能影響實時數據處理

English

Based on recent commits, the issue may be related to:

  1. PR #537 - Google Authenticator password reset feature

    • Commit: db68689
    • May have introduced breaking changes to login flow
  2. PR #533 - Frontend linting fixes

    • Commit: eb515d7
    • May have incomplete error handling
  3. PR #522 - Revert of system prompt changes

    • Commit: 0f98e06
    • May affect real-time data processing

🔧 建議調查方向 / Suggested Investigation

中文

  • [ ] 檢查瀏覽器控制台是否有 JavaScript 錯誤
  • [ ] 檢查後端日誌是否有身份驗證錯誤
  • [ ] 審查 PR #537(Google Authenticator)中的更改
  • [ ] 測試啟用/禁用 2FA 的情況

English

  • [ ] Check browser console for JavaScript errors
  • [ ] Check backend logs for authentication errors
  • [ ] Review changes in PR #537 (Google Authenticator)
  • [ ] Test with/without 2FA enabled

📎 相關問題 / Related Issues

None yet


🏷️ 標籤 / Labels

bug, critical, frontend, authentication, needs-investigation


👥 報告者 / Reporter

社區用戶 / Community User: Skilling

報告時間 / Reported: 2025-11-05


💡 調試建議 / Debug Suggestions

中文

# 1. 切換到 upstream-dev 測試
git checkout upstream-dev
go run main.go

# 2. 查看瀏覽器控制台
# 打開開發者工具 > Console > 查找錯誤

# 3. 查看後端日誌
# 啟動時觀察終端輸出

# 4. 嘗試禁用 Google Authenticator(如果已啟用)
# 檢查配置文件中的 2FA 設置

English

# 1. Switch to upstream-dev for testing
git checkout upstream-dev
go run main.go

# 2. Check browser console
# Open DevTools > Console > Look for errors

# 3. Check backend logs
# Watch terminal output during startup

# 4. Try disabling Google Authenticator (if enabled)
# Check 2FA settings in config files

📊 優先級 / Priority

🔴 Critical - Blocks normal application usage

the-dev-z avatar Nov 05 '25 15:11 the-dev-z

✅ 此問題已在 upstream/dev 修復

相關提交:8c61dab - fix: resolve login redirect loop issue 相關 PR: #422

同時也修復了未授權 API 調用問題(提交 e0b383c)。

the-dev-z avatar Nov 09 '25 02:11 the-dev-z