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

Yunzai V3老婆设置荧之后无法返回老婆照片 #123

Closed
persudo opened this issue Aug 10, 2022 · 8 comments
Closed

Yunzai V3老婆设置荧之后无法返回老婆照片 #123

persudo opened this issue Aug 10, 2022 · 8 comments

Comments

@persudo
Copy link

persudo commented Aug 10, 2022

账号选的妹妹,绑定Cookie,老婆设置其他正常,设置荧之后老婆照片不能返回
有公共查询Cookie
Windows和Linux下都失败
Yunzai commit 0384ac2c861a547c41a08b1ad811850547c2f719
Miao-plugin commit 909fea7

[YzBot][17:50:11.604][INFO] recv from: [Private: xxx(friend)] 老婆设置荧
[YzBot][17:50:11.708][TRAC] send:MessageSvc.PbDeleteMsg seq:370
[YzBot][17:50:11.724][MARK] [米游社查询][uid:xxx][使用已绑定ck:xxx]
[YzBot][17:50:11.731][TRAC] send:MessageSvc.PbSendMsg seq:371
[YzBot][17:50:11.732][MARK] [miao-plugin][dispatch] 老婆设置荧 处理完成 21ms
[YzBot][17:50:11.743][TRAC] recv:MessageSvc.PbDeleteMsg seq:370
[YzBot][17:50:11.955][TRAC] recv:MessageSvc.PbSendMsg seq:371
[YzBot][17:50:11.956][INFO] succeed to send: [Private(xxx)] 老婆已经设置:荧
[YzBot][17:50:19.136][TRAC] recv:MessageSvc.PushNotify seq:-250717964
[YzBot][17:50:19.137][TRAC] send:MessageSvc.PbGetMsg seq:372
[YzBot][17:50:19.248][TRAC] recv:MessageSvc.PbGetMsg seq:372
[YzBot][17:50:19.249][INFO] recv from: [Private: xxx(friend)] 老婆照片
[YzBot][17:50:19.321][TRAC] send:MessageSvc.PbDeleteMsg seq:373
[YzBot][17:50:19.359][TRAC] recv:MessageSvc.PbDeleteMsg seq:373
[YzBot][17:50:19.846][MARK] [米游社接口][character][xxx] 515ms
[YzBot][17:40:20.373][MARK] [米游社查询][uid:xxx][使用已绑定ck:xxx]
[YzBot][17:40:20.377][MARK] [miao-plugin][dispatch] 老婆设置荧 处理完成 5ms
[YzBot][17:40:20.607][INFO] succeed to send: [Private(xxx)] 老婆已经设置:荧
[YzBot][17:40:28.484][INFO] recv from: [Private: xxx(friend)] 老婆照片
[YzBot][17:40:33.273][MARK] [米游社接口][character][xxx] 4720ms
[YzBot][17:40:36.851][INFO] recv from: [Private: xxx(friend)] #老婆照片
[YzBot][17:40:37.292][MARK] [米游社接口][character][xxx] 359ms

设置其他正常

[YzBot][17:53:14.290][INFO] recv from: [Private: xxx(friend)] 老婆设置神里
[YzBot][17:53:14.354][TRAC] send:MessageSvc.PbDeleteMsg seq:387
[YzBot][17:53:14.356][MARK] [米游社查询][uid:xxx][使用已绑定ck:xxx]
[YzBot][17:53:14.359][TRAC] send:MessageSvc.PbSendMsg seq:388
[YzBot][17:53:14.360][MARK] [miao-plugin][dispatch] 老婆设置神里 处理完成 5ms
[YzBot][17:53:14.390][TRAC] recv:MessageSvc.PbDeleteMsg seq:387
[YzBot][17:53:14.572][TRAC] recv:MessageSvc.PbSendMsg seq:388
[YzBot][17:53:14.573][INFO] succeed to send: [Private(xxx)] 老婆已经设置:神里绫华
[YzBot][17:53:21.034][TRAC] recv:MessageSvc.PushNotify seq:-241386409
[YzBot][17:53:21.036][TRAC] send:MessageSvc.PbGetMsg seq:389
[YzBot][17:53:21.157][TRAC] recv:MessageSvc.PbGetMsg seq:389
[YzBot][17:53:21.160][INFO] recv from: [Private: xxx(friend)] 老婆照片
[YzBot][17:53:21.235][TRAC] send:MessageSvc.PbDeleteMsg seq:390

@UID-503058116
Copy link

我设置的同样是荧,但一切返回正常:
根据您目前的描述,我暂时无法确定您的问题所在。

Snipaste:原神·takoya服务器等13个会话:2022-08-12:02-10-49

Snipaste:原神·takoya服务器等13个会话:2022-08-12:02-11-06

Snipaste:原神·takoya服务器等13个会话:2022-08-12:02-11-17

或许这只是个独特问题,在某种特殊情况下触发。
我的服务器配置是:Windows 10 企业版 LTSC 2016,4GB 内存,Intel Celeron J1800;Redis 是自己编译的 x86 版本,启动脚本是:

cd C:\Users\Administrator\Desktop\RedisServer\Redis

redis-server.exe redis.windows.conf

pause

Yunzai V3 服务端截图:

Snipaste:Snipper - Snipaste:2022-08-12:02-20-49

建议您创建一个虚拟机环境,并且在其中运行 Yunzai,检查该问题是否重现。
同时建议您检查 "\Yunzai-Bot\plugins\miao-plugin\resources\character-img\荧" 目录下是否有照片,以及该文件夹的权限设置。正常情况下应该如图所示:

Snipaste:荧:2022-08-12:02-33-55

建议您以管理员身份启动 Windows 终端,再执行 node app 指令。最后重复一遍,我暂时无法确定您的问题所在。希望您可以提供更多问题细节,谢谢!
希望能帮助您解决问题。

@persudo
Copy link
Author

persudo commented Aug 12, 2022

@UID-503058116 我清空了数据库,重新Clone了一份新的yunzai和miao-plugin,可以确定是特定Cookie会触发这个bug

@persudo
Copy link
Author

persudo commented Aug 12, 2022

@UID-503058116 无法获取profile数据时候,会出现这个问题
image

@persudo
Copy link
Author

persudo commented Aug 12, 2022

@UID-503058116 但是在mysInfo.js当中,MysInfo.get 是可以获取到 10000007 这个角色的
image

@persudo
Copy link
Author

persudo commented Aug 12, 2022

@UID-503058116 plugins\miao-plugin\apps\character\avatar-card.js 这个文件里面renderAvatar这个函数,没有profile数据的时候,在42行char.checkAvatars(avatars)调用之前,char.id是10000007

image

调用char.checkAvatars(avatars)之后char.id就变成空字符串,这个时候44行avatars[char.id]就是undefined,||后面{ id: char.id, name: char.name, detail: false }这个对象的id又是空字符串,这个对象赋值给avatar之后进入renderCard函数

image

let char = Character.get(avatar)这个地方avatar的id是空的,char就是false,下面直接return掉了,导致这个bug

image

@persudo
Copy link
Author

persudo commented Aug 12, 2022

如需cookie我可以提供,谢谢

@47479380
Copy link
Contributor

破案了,这个文件少了个id,如果你展示了萤,就会和这个json合并,然后id就空字符串

@yoimiya-kokomi
Copy link
Owner

多谢各位,id已经补充~

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

4 participants