matcracker / BedcoreProtect

BedcoreProtect is a fast, efficient, data logging and anti-griefing tool for PocketMine servers. Rollback and restore any amount of damage.
https://poggit.pmmp.io/p/BedcoreProtect/
GNU General Public License v3.0
43 stars 8 forks source link

start error #70

Closed cherrychip8293 closed 1 year ago

cherrychip8293 commented 1 year ago

Issue description

Steps to reproduce the issue

  1. If you just put it in, you'll get an error

OS and versions

Plugins

Crashdump, backtrace or other files

TypeError: "_a69f162dd0d74e41750apoggit\libasynql\mysqli\MysqliThread::createFactory(): Argument #2 ($logger) must be of type pocketmine\thread\log\AttachableThreadSafeLogger, pocketmine\utils\MainLogger given, called in phar:///root/pm/plugins/BedcoreProtect-pm5.phar/src/_a69f162dd0d74e41750apoggit/libasynql/libasynql.php on line 125" (EXCEPTION) in "plugins/BedcoreProtect-pm5.phar/src/_a69f162dd0d74e41750apoggit/libasynql/mysqli/MysqliThread" at line 67 --- Stack trace ---

0 plugins/BedcoreProtect-pm5.phar/src/_a69f162dd0d74e41750apoggit/libasynql/libasynql(125): _a69f162dd0d74e41750apoggit\libasynql\mysqli\MysqliThread::createFactory(object _a69f162dd0d74e41750apoggit\libasynql\mysqli\MysqlCredentials#59054, object pocketmine\utils\MainLogger#5)

1 plugins/BedcoreProtect-pm5.phar/src/matcracker/BedcoreProtect/storage/DatabaseManager(60): _a69f162dd0d74e41750apoggit\libasynql\libasynql::create(object matcracker\BedcoreProtect\Main#58724, array[4], array[2], false)

2 plugins/BedcoreProtect-pm5.phar/src/matcracker/BedcoreProtect/Main(133): matcracker\BedcoreProtect\storage\DatabaseManager->connect()

3 pmsrc/src/plugin/PluginBase(118): matcracker\BedcoreProtect\Main->onEnable()

4 pmsrc/src/plugin/PluginManager(454): pocketmine\plugin\PluginBase->onEnableStateChange(true)

5 pmsrc/src/Server(1377): pocketmine\plugin\PluginManager->enablePlugin(object matcracker\BedcoreProtect\Main#58724)

6 pmsrc/src/Server(1023): pocketmine\Server->enablePlugins(object pocketmine\plugin\PluginEnableOrder#39158)

7 pmsrc/src/PocketMine(339): pocketmine\Server->__construct(object BaseClassLoader#4, object pocketmine\utils\MainLogger#5, string[9] /root/pm/, string[17] /root/pm/plugins/)

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

9 pmsrc(11): require(string[53] phar:///root/pm/PocketMine-MP.phar/src/PocketMine.php)

--- End of exception information ---

matcracker commented 1 year ago

I'm not able to reproduce the issue. Are you sure to have built correctly the phar with the correct version of libasynql?

cherrychip8293 commented 1 year ago

That's right. I removed the cornpig and tried running it again just in case, but the error below came out

TypeError: "pocketmine\snooze\SleeperHandler::addNotifier(): Argument #1 ($notifier) must be of type pocketmine\snooze\SleeperNotifier, Closure given, called in phar:///root/pm/plugins/BedcoreProtect-pm5.phar/src/_eec9db5ee699a874c3d5poggit/libasynql/base/SqlThreadPool.php on line 65" (EXCEPTION) in "pmsrc/vendor/pocketmine/snooze/src/SleeperHandler" at line 57 --- Stack trace ---

0 plugins/BedcoreProtect-pm5.phar/src/_eec9db5ee699a874c3d5poggit/libasynql/base/SqlThreadPool(65): pocketmine\snooze\SleeperHandler->addNotifier(object Closure#58814)

1 plugins/BedcoreProtect-pm5.phar/src/_eec9db5ee699a874c3d5poggit/libasynql/libasynql(137): _eec9db5ee699a874c3d5poggit\libasynql\base\SqlThreadPool->__construct(object Closure#58812, int 1)

2 plugins/BedcoreProtect-pm5.phar/src/matcracker/BedcoreProtect/storage/DatabaseManager(60): _eec9db5ee699a874c3d5poggit\libasynql\libasynql::create(object matcracker\BedcoreProtect\Main#58703, array[4], array[2], false)

3 plugins/BedcoreProtect-pm5.phar/src/matcracker/BedcoreProtect/Main(133): matcracker\BedcoreProtect\storage\DatabaseManager->connect()

4 pmsrc/src/plugin/PluginBase(118): matcracker\BedcoreProtect\Main->onEnable()

5 pmsrc/src/plugin/PluginManager(454): pocketmine\plugin\PluginBase->onEnableStateChange(true)

6 pmsrc/src/Server(1377): pocketmine\plugin\PluginManager->enablePlugin(object matcracker\BedcoreProtect\Main#58703)

7 pmsrc/src/Server(1023): pocketmine\Server->enablePlugins(object pocketmine\plugin\PluginEnableOrder#39158)

8 pmsrc/src/PocketMine(339): pocketmine\Server->__construct(object BaseClassLoader#4, object pocketmine\utils\MainLogger#5, string[9] /root/pm/, string[17] /root/pm/plugins/)

9 pmsrc/src/PocketMine(362): pocketmine\server()

10 pmsrc(11): require(string[53] phar:///root/pm/PocketMine-MP.phar/src/PocketMine.php)

--- End of exception information ---

cherrychip8293 commented 1 year ago

https://poggit.pmmp.io/ci/poggit/libasynql/libasynql

The version I used is the PM5 version here

cherrychip8293 commented 1 year ago

Oh, it's solved. The bin library I use was wrong I'm sorry.

matcracker commented 1 year ago

If you want I'm now proving builds for PM5 branch here: https://poggit.pmmp.io/ci/matcracker/BedcoreProtect/BedcoreProtect/dev:502