ceajs / cea

高校统一身份验证开发框架(已集成 CPDAILY 签到&查寝插件)
MIT License
90 stars 16 forks source link

报错但是签到成功 #52

Open olahzido opened 2 years ago

olahzido commented 2 years ago

OS: Almalinux 8.5 Version: Node.js v16.13.1 cea@2.5.8 yarn@1.22.18 签到报错但是今日校园看是签到成功的,令人迷惑 以下是log

[root@server config]# cea sign
✔  成功        登录成功 @user
✔  成功        已成功获取并缓存 COOKIE @user
file:///usr/local/share/.config/yarn/global/node_modules/@ceajs/check-in-helper/lib/src/index.js:189
                const signedSelectedItemValue = curSignedExtraField.extraFieldItems.find((e) => e.isSelected === true).value;
                                                                                                                      ^

TypeError: Cannot read properties of undefined (reading 'value')
    at file:///usr/local/share/.config/yarn/global/node_modules/@ceajs/check-in-helper/lib/src/index.js:189:119
    at Array.map (<anonymous>)
    at Function.fillExtra (file:///usr/local/share/.config/yarn/global/node_modules/@ceajs/check-in-helper/lib/src/index.js:186:26)
    at CheckIn.signWithForm (file:///usr/local/share/.config/yarn/global/node_modules/@ceajs/check-in-helper/lib/src/index.js:69:23)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async file:///usr/local/share/.config/yarn/global/node_modules/@ceajs/check-in-helper/lib/src/index.js:234:36
    at async Promise.all (index 10)
    at async Function.signIn (file:///usr/local/share/.config/yarn/global/node_modules/@ceajs/check-in-helper/lib/src/index.js:227:9)
    at async checkIn (file:///usr/local/share/.config/yarn/global/node_modules/@ceajs/sign-plugin/lib/src/index.js:7:22)
    at async file:///usr/local/share/.config/yarn/global/node_modules/cea/lib/src/cli.js:42:13
olahzido commented 2 years ago

找到问题了,但是也不算是bug,就是所有用户里只要有一个用户的表单变更了,就会集体报错,但是其他账号还是能签的,建议加个错误账号的回调?

beetcb commented 2 years ago

找到问题了,但是也不算是bug,就是所有用户里只要有一个用户的表单变更了,就会集体报错,但是其他账号还是能签的,建议加个错误账号的回调?

好的,之前没遇到过这个环节出错,新版本会处理一下 @Mosimita