Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] v2.15.0 "message": "Cannot read properties of undefined (reading 'map')" #5378

Closed
xinmans opened this issue Sep 7, 2024 · 4 comments · Fixed by #5383
Closed

[Bug] v2.15.0 "message": "Cannot read properties of undefined (reading 'map')" #5378

xinmans opened this issue Sep 7, 2024 · 4 comments · Fixed by #5383
Assignees
Labels
bug Something isn't working question Further information is requested

Comments

@xinmans
Copy link

xinmans commented Sep 7, 2024

📦 部署方式

Docker

📌 软件版本

v2.15.0

💻 系统环境

Ubuntu

📌 系统版本

20.4

🌐 浏览器

Chrome

📌 浏览器版本

版本 127.0.6533.73(正式版本) (64 位)

🐛 问题描述

chatgpt3.5-turbo的接口,提交prompt后返回报错
"message": "Cannot read properties of undefined (reading 'map')"

📷 复现步骤

No response

🚦 期望结果

No response

📝 补充信息

回滚到上一个版本,正常。

@xinmans xinmans added the bug Something isn't working label Sep 7, 2024
@Dogtiti
Copy link
Member

Dogtiti commented Sep 7, 2024

@xinmans 可以提供一些更详细的复现信息吗~

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


@xinmans Can you provide some more detailed reproduction information~

@Dogtiti Dogtiti added the question Further information is requested label Sep 7, 2024
@SukkaW
Copy link
Contributor

SukkaW commented Sep 7, 2024

image image

@SukkaW
Copy link
Contributor

SukkaW commented Sep 7, 2024

useChatStore.getState().currentSession().mask?.plugin as string[],

https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/blame/2ff292cbfa35de63d9382ac13effe15830893d20/app/client/platforms/openai.ts#L247

@lloydzhou Git blame shows that you introduce the bug. useChatStore.getState().currentSession().mask?.plugin can definitely be undefined, yet you deliberately ignore it using as string[], causing the bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants