Anankke / SSPanel-UIM

Multi-purpose proxy service management system
MIT License
9.42k stars 3.4k forks source link

[BUG]dev版本 无法添加节点 #1558

Closed ghost closed 2 years ago

ghost commented 2 years ago

请将 [ ] 替换为 [x] 。Please relpace [ ] with [x] .

Environment 环境 Your OS info, PHP/MySQL version and so on... 你的操作系统信息、PHP/MySQL 版本、以及其它所有可能相关的信息。 dev版本是php8.0 MySQL 10.4.14-MariaDB Commit The commit you on. 你当前的 SSPanel UIM 位于哪条 commit。 7046d60b52c5e4acb8c6d0f6a5e5e4bced66b8b3 Bug The bug information. 请描述你遇到的 Bug。 更新到最新版本之后无法添加节点。 控制台报错。 Uncaught ReferenceError: JSONEditor is not defined Reproduce Steps to reproduce the bug. 请逐步描述如何复现 Bug。

Expected behavior What you expected to happen. 请描述你预期的行为。

Logs If applicable, add your PHP logs here. 如果需要,请在这里粘贴 PHP Log。

Addition Additional context here. 如有可能,请提供更多相关资料。

ghost commented 2 years ago

在数据库中添加了,一个v2ray 节点,查看节点列表,该节点报错。 Slim Application Error The application could not run because of the following error:

Details Type: TypeError Message: App\Models\Node::getArgs(): Return value must be of type array, null returned File: /www/wwwroot/dev.fanqiangvpnnet.xyz/src/Models/Node.php Line: 286 Trace

0 /www/wwwroot/dev.fanqiangvpnnet.xyz/src/Utils/Tools.php(327): App\Models\Node->getArgs()

1 /www/wwwroot/dev.fanqiangvpnnet.xyz/src/Models/Node.php(389): App\Utils\Tools::v2Array()

2 /www/wwwroot/dev.fanqiangvpnnet.xyz/src/Controllers/User/NodeController.php(114): App\Models\Node->getV2RayItem()

3 [internal function]: App\Controllers\User\NodeController->userNodeInfo()

4 /www/wwwroot/dev.fanqiangvpnnet.xyz/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(41): call_user_func()

5 /www/wwwroot/dev.fanqiangvpnnet.xyz/vendor/slim/slim/Slim/Route.php(344): Slim\Handlers\Strategies\RequestResponse->__invoke()

6 /www/wwwroot/dev.fanqiangvpnnet.xyz/src/Middleware/Auth.php(21): Slim\Route->__invoke()

7 [internal function]: App\Middleware\Auth->__invoke()

8 /www/wwwroot/dev.fanqiangvpnnet.xyz/vendor/slim/slim/Slim/DeferredCallable.php(43): call_user_func_array()

9 [internal function]: Slim\DeferredCallable->__invoke()

10 /www/wwwroot/dev.fanqiangvpnnet.xyz/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(67): call_user_func()

11 /www/wwwroot/dev.fanqiangvpnnet.xyz/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(116): Slim\Route->Slim{closure}()

12 /www/wwwroot/dev.fanqiangvpnnet.xyz/vendor/slim/slim/Slim/Route.php(316): Slim\Route->callMiddlewareStack()

13 /www/wwwroot/dev.fanqiangvpnnet.xyz/vendor/slim/slim/Slim/App.php(438): Slim\Route->run()

14 /www/wwwroot/dev.fanqiangvpnnet.xyz/vendor/zeuxisoo/slim-whoops/src/Zeuxisoo/Whoops/Provider/Slim/WhoopsMiddleware.php(70): Slim\App->__invoke()

15 [internal function]: Zeuxisoo\Whoops\Provider\Slim\WhoopsMiddleware->__invoke()

16 /www/wwwroot/dev.fanqiangvpnnet.xyz/vendor/slim/slim/Slim/DeferredCallable.php(43): call_user_func_array()

17 [internal function]: Slim\DeferredCallable->__invoke()

18 /www/wwwroot/dev.fanqiangvpnnet.xyz/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(67): call_user_func()

19 /www/wwwroot/dev.fanqiangvpnnet.xyz/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(116): Slim\App->Slim{closure}()

20 /www/wwwroot/dev.fanqiangvpnnet.xyz/vendor/slim/slim/Slim/App.php(332): Slim\App->callMiddlewareStack()

21 /www/wwwroot/dev.fanqiangvpnnet.xyz/vendor/slim/slim/Slim/App.php(293): Slim\App->process()

22 /www/wwwroot/dev.fanqiangvpnnet.xyz/public/index.php(41): Slim\App->run()

23 {main}

AutisticShark commented 2 years ago

Fixed in https://github.com/Anankke/SSPanel-Uim/commit/43c3ae843975d9102eceeb73c39deac3c63cabbd

fireinrain commented 2 years ago

我也是部署了dev分支 也是在添加节点步骤 无法添加节点 image

AutisticShark commented 2 years ago

開 debug 看看 500 請求裏面是什麽報錯?

fireinrain commented 2 years ago

開 debug 看看 500 請求裏面是什麽報錯?

谢谢提醒 看到解决了

cyanogenic commented 2 years ago

我这里出现了同样的问题 请求里出现 SQLSTATE[HY000]: General error: 1364 Field 'load' doesn't have a default value 当前的commit是e8778e4 看上去是因为迁移里的load字段没有默认值