ceajs / cea

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

签到模板匹配逻辑不兼容出错 #49

Closed olahzido closed 2 years ago

olahzido commented 2 years ago

OS: Almalinux 8.5 Version: Node.js v16.8.0 cea@2.5.8 签到不可用 查寝应该是正常的 file:///usr/local/share/.config/yarn/global/node_modules/@ceajs/check-in-helper/lib/src/index.js:206 extraFieldItemValue: normal.content, ^

TypeError: Cannot read properties of undefined (reading 'content') at file:///usr/local/share/.config/yarn/global/node_modules/@ceajs/check-in-helper/lib/src/index.js:206:49 at Array.map () 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 11) 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

beetcb commented 2 years ago

方便提供下签到的表单问题吗? 目前怀疑是对 API 响应的某些字段断言导致的问题,进一步可能需要抓包一下表单 @Mosimita

https://github.com/ceajs/cea/blob/d22b13f2ad1ec9892e34fff2d0d19ee744661b10/src/plugins/check-in-helper/src/index.ts#L318-L334

olahzido commented 2 years ago

卸载重装又正常了,怪事,不过能用就关issue了,好像是多个账号只要有一个表单不匹配就会集体报错不签