koishijs / webui

WebUI plugins for Koishi
https://koishi.online
GNU Affero General Public License v3.0
30 stars 15 forks source link

Bug: login插件启用时报错 #132

Closed CDN18 closed 1 year ago

CDN18 commented 1 year ago

环境

报错

2023-03-19 21:17:58 [W] mysql INSERT INTO `user` (`id`, `name`, `flag`, `authority`, `locale`, `lastCall`, `sandbox`, `eula`, `onebot`, `usage`, `timers`, `password`, `token`, `expire`, `github.accessToken`, `github.refreshToken`, `qqguild`) VALUES (0, '***', 0, 5, '', NULL, NULL, false, NULL, '{}', '{}', '*********************************************************36c', '', 0, '', '', NULL) ON DUPLICATE KEY UPDATE `name` = VALUES(`name`), `authority` = VALUES(`authority`), `password` = VALUES(`password`)
2023-03-19 21:17:58 [W] app ER_BAD_FIELD_ERROR: Unknown column 'sandbox' in 'field list'
                            at MySQLDriver.query (/var/www/koishi/node_modules/@minatojs/driver-mysql/lib/index.js:301:19)
                            at MySQLDriver.upsert (/var/www/koishi/node_modules/@minatojs/driver-mysql/lib/index.js:481:16)
                            at Executable.execute (/var/www/koishi/node_modules/@minatojs/core/lib/index.cjs:384:34)
                            at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
                            at async DatabaseService.upsert (/var/www/koishi/node_modules/@minatojs/core/lib/index.cjs:588:5)
                            at async AuthService.start (/var/www/koishi/node_modules/@koishijs/plugin-login/lib/index.js:55:5)
                            at async /var/www/koishi/node_modules/cordis/lib/index.cjs:712:7

这个错误导致login插件显示已启用但实际未启用成功,访问面板时不需任何验证。

shigma commented 1 year ago

我感觉这个报错跟 login 与 auth 无关。我更新了一下 mysql 版本,你试试新版本是否报错。

如果还报错的话补一下完整的「依赖管理」页面截图或完整的 package.json 文件。

CDN18 commented 1 year ago

更新mysql插件后不再报错,可以正常启动和登录了,感谢修复