ChatGPTNextWeb / ChatGPT-Next-Web

A cross-platform ChatGPT/Gemini UI (Web / PWA / Linux / Win / MacOS). 一键拥有你自己的跨平台 ChatGPT/Gemini 应用。
https://app.nextchat.dev/
MIT License
75.43k stars 58.87k forks source link

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

Closed xinmans closed 3 weeks ago

xinmans commented 3 weeks ago

📦 部署方式

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

📝 补充信息

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

Dogtiti commented 3 weeks ago

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

Issues-translate-bot commented 3 weeks ago

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


@xinmans Can you provide some more detailed reproduction information~

SukkaW commented 3 weeks ago
image image
SukkaW commented 3 weeks ago

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

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.