ClickedTran / GiftCode

Plugin for creating and using giftcode for PocketMine-MP
GNU General Public License v3.0
6 stars 2 forks source link

crash on join #2

Closed GamerMJay closed 9 months ago

GamerMJay commented 9 months ago

[13:35:54.442] [Server thread/EMERGENCY]: Crash occurred while handling a packet from session: GamerMJayy [13:35:54.454] [Server thread/CRITICAL]: Error: "Call to a member function getParameters() on array" (EXCEPTION) in "pmsrc/vendor/pocketmine/bedrock-protocol/src/AvailableCommandsPacket" at line 533 --- Stack trace ---

0 pmsrc/vendor/pocketmine/bedrock-protocol/src/DataPacket(84): pocketmine\network\mcpe\protocol\AvailableCommandsPacket->encodePayload(object pocketmine\network\mcpe\protocol\serializer\PacketSerializer#195563)

1 pmsrc/src/network/mcpe/NetworkSession(502): pocketmine\network\mcpe\protocol\DataPacket->encode(object pocketmine\network\mcpe\protocol\serializer\PacketSerializer#195563)

2 pmsrc/src/network/mcpe/NetworkSession(483): pocketmine\network\mcpe\NetworkSession::encodePacketTimed(object pocketmine\network\mcpe\protocol\serializer\PacketSerializer#195563, object pocketmine\network\mcpe\protocol\AvailableCommandsPacket#161024)

3 plugins/GiftCode_dev-33.phar/src/ClickedTran/GiftCode/libs/CortexPE/Commando/PacketHooker(84): pocketmine\network\mcpe\NetworkSession->sendDataPacket(object pocketmine\network\mcpe\protocol\AvailableCommandsPacket#161024)

4 plugins/GiftCode_dev-33.phar/src/ClickedTran/GiftCode/libs/CortexPE/Commando/libs/muqsit/simplepackethandler/interceptor/PacketInterceptorListener(86): ClickedTran\GiftCode\libs\CortexPE\Commando\PacketHooker::ClickedTran\GiftCode\libs\CortexPE\Commando{closure}(object pocketmine\network\mcpe\protocol\AvailableCommandsPacket#161024, object pocketmine\network\mcpe\NetworkSession#51800)

5 pmsrc/src/event/RegisteredListener(61): ClickedTran\GiftCode\libs\CortexPE\Commando\libs\muqsit\simplepackethandler\interceptor\PacketInterceptorListener->ClickedTran\GiftCode\libs\CortexPE\Commando\libs\muqsit\simplepackethandler\interceptor{closure}(object pocketmine\event\server\DataPacketSendEvent#161140)

6 pmsrc/src/event/Event(63): pocketmine\event\RegisteredListener->callEvent(object pocketmine\event\server\DataPacketSendEvent#161140)

7 pmsrc/src/network/mcpe/NetworkSession(473): pocketmine\event\Event->call()

8 plugins/MultiWorld_dev-281.phar/src/czechpmdevs/multiworld/libs/CortexPE/Commando/PacketHooker(81): pocketmine\network\mcpe\NetworkSession->sendDataPacket(object pocketmine\network\mcpe\protocol\AvailableCommandsPacket#161024)

9 plugins/MultiWorld_dev-281.phar/src/czechpmdevs/multiworld/libs/CortexPE/Commando/libs/muqsit/simplepackethandler/interceptor/PacketInterceptorListener(83): czechpmdevs\multiworld\libs\CortexPE\Commando\PacketHooker::czechpmdevs\multiworld\libs\CortexPE\Commando{closure}(object pocketmine\network\mcpe\protocol\AvailableCommandsPacket#161024, object pocketmine\network\mcpe\NetworkSession#51800)

10 pmsrc/src/event/RegisteredListener(61): czechpmdevs\multiworld\libs\CortexPE\Commando\libs\muqsit\simplepackethandler\interceptor\PacketInterceptorListener->czechpmdevs\multiworld\libs\CortexPE\Commando\libs\muqsit\simplepackethandler\interceptor{closure}(object pocketmine\event\server\DataPacketSendEvent#161022)

11 pmsrc/src/event/Event(63): pocketmine\event\RegisteredListener->callEvent(object pocketmine\event\server\DataPacketSendEvent#161022)

12 pmsrc/src/network/mcpe/NetworkSession(473): pocketmine\event\Event->call()

13 pmsrc/src/network/mcpe/NetworkSession(1026): pocketmine\network\mcpe\NetworkSession->sendDataPacket(object pocketmine\network\mcpe\protocol\AvailableCommandsPacket#161024)

14 pmsrc/src/network/mcpe/handler/PreSpawnPacketHandler(126): pocketmine\network\mcpe\NetworkSession->syncAvailableCommands()

15 pmsrc/src/network/mcpe/NetworkSession(329): pocketmine\network\mcpe\handler\PreSpawnPacketHandler->setUp()

16 pmsrc/src/network/mcpe/NetworkSession(843): pocketmine\network\mcpe\NetworkSession->setHandler(object pocketmine\network\mcpe\handler\PreSpawnPacketHandler#173266)

17 pmsrc/src/network/mcpe/NetworkSession(280): pocketmine\network\mcpe\NetworkSession->beginSpawnSequence()

18 pmsrc/src/promise/Promise(46): pocketmine\network\mcpe\NetworkSession->onPlayerCreated(object pocketmine\player\Player#181078)

19 pmsrc/src/network/mcpe/NetworkSession(243): pocketmine\promise\Promise->onCompletion(object Closure#198228, object Closure#198230)

20 pmsrc/src/network/mcpe/NetworkSession(838): pocketmine\network\mcpe\NetworkSession->createPlayer()

21 pmsrc/src/network/mcpe/handler/ResourcePacksPacketHandler(144): pocketmine\network\mcpe\NetworkSession->pocketmine\network\mcpe{closure}()

22 pmsrc/vendor/pocketmine/bedrock-protocol/src/ResourcePackClientResponsePacket(61): pocketmine\network\mcpe\handler\ResourcePacksPacketHandler->handleResourcePackClientResponse(object pocketmine\network\mcpe\protocol\ResourcePackClientResponsePacket#198233)

23 pmsrc/src/network/mcpe/NetworkSession(448): pocketmine\network\mcpe\protocol\ResourcePackClientResponsePacket->handle(object pocketmine\network\mcpe\handler\ResourcePacksPacketHandler#181118)

24 pmsrc/src/network/mcpe/NetworkSession(386): pocketmine\network\mcpe\NetworkSession->handleDataPacket(object pocketmine\network\mcpe\protocol\ResourcePackClientResponsePacket#198233, string[4] ....)

25 pmsrc/src/network/mcpe/raklib/RakLibInterface(219): pocketmine\network\mcpe\NetworkSession->handleEncoded(string[7] c.a..)

26 pmsrc/vendor/pocketmine/raklib-ipc/src/RakLibToUserThreadMessageReceiver(40): pocketmine\network\mcpe\raklib\RakLibInterface->onPacketReceive(int 0, string[16] ./.@.c..&8<z.<P.)

27 pmsrc/src/network/mcpe/raklib/RakLibInterface(111): raklib\server\ipc\RakLibToUserThreadMessageReceiver->handle(object pocketmine\network\mcpe\raklib\RakLibInterface#198303)

28 pmsrc/src/TimeTrackingSleeperHandler(58): pocketmine\network\mcpe\raklib\RakLibInterface->pocketmine\network\mcpe\raklib{closure}()

29 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(120): pocketmine\TimeTrackingSleeperHandler->pocketmine{closure}()

30 pmsrc/src/TimeTrackingSleeperHandler(77): pocketmine\snooze\SleeperHandler->processNotifications()

31 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(79): pocketmine\TimeTrackingSleeperHandler->processNotifications()

32 pmsrc/src/Server(1690): pocketmine\snooze\SleeperHandler->sleepUntil(float 1705844153.8303)

33 pmsrc/src/Server(1065): pocketmine\Server->tickProcessor()

34 pmsrc/src/PocketMine(341): pocketmine\Server->__construct(object pocketmine\thread\ThreadSafeClassLoader#6, object pocketmine\utils\MainLogger#3, string[18] D:\PocketMine\PM5\, string[26] D:\PocketMine\PM5\plugins)

35 pmsrc/src/PocketMine(364): pocketmine\server()

36 pmsrc(11): require(string[62] phar://D:/PocketMine/PM5/PocketMine-MP.phar/src/PocketMine.php)

--- End of exception information ---

ClickedTran commented 9 months ago

Dear @GamerMJay ,

This may be due to Commando's PacketHandler, try loading the build: https://poggit.pmmp.io/r/231699/GiftCode_dev-38.phar Test it and see if it still has that error.

GamerMJay commented 9 months ago

Oh hello, sorry for the late reply. The plugin now works at server startup, but when creating a GiftCode via /gifttcode the server crashes

[14:37:49.807] [Server thread/CRITICAL]: TypeError: "pocketmine\utils\Config::exists(): Argument #1 ($k) must be of type string, int given, called in phar://D:/PocketMine/PM5/plugins/GiftCode_dev-38.phar/src/ClickedTran/GiftCode/task/TaskManager.php on line 23" (EXCEPTION) in "pmsrc/src/utils/Config" at line 436 --- Stack trace ---

0 plugins/GiftCode_dev-38.phar/src/ClickedTran/GiftCode/task/TaskManager(23): pocketmine\utils\Config->exists(int 1)

1 pmsrc/src/scheduler/TaskHandler(113): ClickedTran\GiftCode\task\TaskManager->onRun()

2 pmsrc/src/scheduler/TaskScheduler(137): pocketmine\scheduler\TaskHandler->run()

3 pmsrc/src/plugin/PluginManager(533): pocketmine\scheduler\TaskScheduler->mainThreadHeartbeat(int 861)

4 pmsrc/src/Server(1798): pocketmine\plugin\PluginManager->tickSchedulers(int 861)

5 pmsrc/src/Server(1687): pocketmine\Server->tick()

6 pmsrc/src/Server(1065): pocketmine\Server->tickProcessor()

7 pmsrc/src/PocketMine(341): pocketmine\Server->__construct(object pocketmine\thread\ThreadSafeClassLoader#6, object pocketmine\utils\MainLogger#3, string[18] D:\PocketMine\PM5\, string[26] D:\PocketMine\PM5\plugins)

8 pmsrc/src/PocketMine(364): pocketmine\server()

9 pmsrc(11): require(string[62] phar://D:/PocketMine/PM5/PocketMine-MP.phar/src/PocketMine.php)

--- End of exception information ---

ClickedTran commented 9 months ago

Dear @GamerMJay , Can you show me the command as you type it?

GamerMJay commented 9 months ago

Ah... my mistake it does work