chatgpt-web-dev / chatgpt-web

A third-party ChatGPT Web UI page built with Express and Vue3, through the official OpenAI completion API. / 用 Express 和 Vue3 搭建的第三方 ChatGPT 前端页面, 基于 OpenAI 官方 completion API.
https://chatgpt-web.dev
MIT License
1.6k stars 440 forks source link

更新 feat: add usage limit code后出现错误 #436

Closed richsense closed 5 months ago

richsense commented 6 months ago

出现 错误 : auth middleware getUserId err from token undefined Cannot read properties of undefined (reading 'replace')

richsense commented 6 months ago

尝试完全重新 fork和deploy 后错误依然出现

Urmi10799 commented 6 months ago

yes, getting this error on log: error: 2024/02/22 - 04:21:40 | auth middleware getUserId error from token: undefined (as i'm using custom logger). Error is coming from: service/src/middleware/auth.ts

This error happens when no user is logged in and after logout. Then it shows error 500 page

BobDu commented 6 months ago

Use no login mode?

BobDu commented 6 months ago

@ccjaread 看起来可能是破坏了单用户非登录模式下的使用。是否可以协助排查一下呢?

Urmi10799 commented 6 months ago

Use no login mode?

No. while using login mode this error happens. Suppose I already logged into account and then logout, this error throws at console shows error 500 page. Another is while trying to access localhost:3002 , it throws error and shows error 500 page. Only works if user is already logged in.