Hello good evening, I have a small problem.
I explain my problem a bit: I have 2 servers and one of the two is already connected and does not give an error, but the second is the one that gives me that error. I would greatly appreciate your help.
And Excuse the English, but I'm using the google translator.
This is what crashdumps tells me:
Error: json_decode(): Argument #1 ($json) must be of type string, null given
File: plugins/RankSystem_dev-30.phar/src/IvanCraft623/RankSystem/provider/UserData
Line: 88
Type: TypeError
Backtrace:
#0 plugins/RankSystem_dev-30.phar/src/IvanCraft623/RankSystem/provider/UserData(88): json_decode(null, true)
#1 plugins/RankSystem_dev-30.phar/src/IvanCraft623/RankSystem/provider/libasynql(73): IvanCraft623\RankSystem\provider\UserData::jsonDeserialize(array[3])
#2 plugins/RankSystem_dev-30.phar/src/IvanCraft623/RankSystem/libs/poggit/libasynql/base/DataConnectorImpl(174): IvanCraft623\RankSystem\provider\libasynql->IvanCraft623\RankSystem\provider{closure}(array[1], array[3])
#3 plugins/RankSystem_dev-30.phar/src/IvanCraft623/RankSystem/libs/poggit/libasynql/base/DataConnectorImpl(181): IvanCraft623\RankSystem\libs\poggit\libasynql\base\DataConnectorImpl::IvanCraft623\RankSystem\libs\poggit\libasynql\base{closure}(object IvanCraft623\RankSystem\libs\poggit\libasynql\result\SqlSelectResult#30592)
#4 plugins/RankSystem_dev-30.phar/src/IvanCraft623/RankSystem/libs/poggit/libasynql/base/DataConnectorImpl(239): IvanCraft623\RankSystem\libs\poggit\libasynql\base\DataConnectorImpl::IvanCraft623\RankSystem\libs\poggit\libasynql\base{closure}(array[1])
#5 plugins/RankSystem_dev-30.phar/src/IvanCraft623/RankSystem/libs/poggit/libasynql/base/SqlThreadPool(112): IvanCraft623\RankSystem\libs\poggit\libasynql\base\DataConnectorImpl->IvanCraft623\RankSystem\libs\poggit\libasynql\base{closure}(array[1])
#6 plugins/RankSystem_dev-30.phar/src/IvanCraft623/RankSystem/libs/poggit/libasynql/base/DataConnectorImpl(323): IvanCraft623\RankSystem\libs\poggit\libasynql\base\SqlThreadPool->readResults(array[1])
#7 plugins/RankSystem_dev-30.phar/src/IvanCraft623/RankSystem/libs/poggit/libasynql/base/SqlThreadPool(65): IvanCraft623\RankSystem\libs\poggit\libasynql\base\DataConnectorImpl->checkResults()
#8 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(123): IvanCraft623\RankSystem\libs\poggit\libasynql\base\SqlThreadPool->IvanCraft623\RankSystem\libs\poggit\libasynql\base{closure}()
#9 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(82): pocketmine\snooze\SleeperHandler->processNotifications()
#10 pmsrc/src/Server(1703): pocketmine\snooze\SleeperHandler->sleepUntil(float 1655364152.709)
#11 pmsrc/src/Server(1063): pocketmine\Server->tickProcessor()
#12 pmsrc/src/PocketMine(304): pocketmine\Server->__construct(object BaseClassLoader#2, object pocketmine\utils\MainLogger#3, string[23] D:\1-Helorum_1VS1Games, string[31] D:\1-Helorum_1VS1Games\plugins)
#13 pmsrc/src/PocketMine(327): pocketmine\server()
#14 pmsrc(11): require(string[67] phar://D:/1-Helorum_1VS1Games/PocketMine-MP.phar/src/PocketMine.php)
Code:
[79] * ranks: string,
[80] * permissions: string,
[81] * generationTime: ?int
[82] * } $data
[83] */
[84] public static function jsonDeserialize(array $data) : UserData {
[85] return new UserData(
[86] (string) $data["name"],
[87] (array) (json_decode($data["ranks"], true)),
[88] (array) (json_decode($data["permissions"], true)),
[89] (int) ($data["generationTime"] ?? time())
[90] );
[91] }
[92] }