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

联系人回复消息报错Cannot read properties of undefined (reading 'choices') #170

Closed
Ale6333499 opened this issue Apr 30, 2024 · 10 comments

Comments

@Ale6333499
Copy link

uncaughtException TypeError: Cannot read properties of undefined (reading 'choices')
at WebSocket. (file:///Users/jevon/Downloads/wechat-bot-main/src/xunfei/xunfei.js:93:33)
at callListener (/Users/jevon/Downloads/wechat-bot-main/node_modules/ws/lib/event-target.js:290:14)
at WebSocket.onMessage (/Users/jevon/Downloads/wechat-bot-main/node_modules/ws/lib/event-target.js:209:9)
at WebSocket.emit (node:events:518:28)
at Receiver.receiverOnMessage (/Users/jevon/Downloads/wechat-bot-main/node_modules/ws/lib/websocket.js:1209:20)
at Receiver.emit (node:events:518:28)
at Receiver.dataMessage (/Users/jevon/Downloads/wechat-bot-main/node_modules/ws/lib/receiver.js:594:14)
at Receiver.getData (/Users/jevon/Downloads/wechat-bot-main/node_modules/ws/lib/receiver.js:496:10)
at Receiver.startLoop (/Users/jevon/Downloads/wechat-bot-main/node_modules/ws/lib/receiver.js:167:16)
at Receiver._write (/Users/jevon/Downloads/wechat-bot-main/node_modules/ws/lib/receiver.js:94:10)

@qdhonker
Copy link

我也是这个问题,解决了吗

@Ale6333499
Copy link
Author

我也是这个问题,解决了吗

我这个是因为讯飞的API接口出的问题,我的账号没有实名认证所以调用出错了,导致返回结构体不正确继而导致这个属性未找到的错误。你可以试着排查一下。

@qdhonker
Copy link

排查到了,已经提交讯飞的实名认证,你认证完就可以调了吗

@Ale6333499
Copy link
Author

排查到了,已经提交讯飞的实名认证,你认证完就可以调了吗

是的

@qdhonker
Copy link

搞定了,感谢回复

@Ale6333499
Copy link
Author

搞定了,感谢回复
👌

@wangrongding
Copy link
Owner

👍👍

@ChaoQiezi
Copy link

认证之后还是存在报错

@mzal123
Copy link

mzal123 commented Aug 13, 2024

我也是认证之后还是报这个错,怎么解决呢

@Ale6333499
Copy link
Author

每个人的报错原因可能都不一样,建议大家试着排查一下是否api已经认证,以及是不是回复的消息结构变化了导致属性未获取到

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants