HereAuth
HereAuth copied to clipboard
MySQLLoadPlayerTask: Task crashed
@SOF3, @PEMapModder A very interesting bug, similar to #73. It is displayed for the reason of disconnecting via timeout.
Warning: Error while sending QUERY packet. PID=18336 in /root/*******/plugins/HereAuth-master/src/HereAuth/Database/MySQL/MySQLSavePlayerTask.php on line 38
[Tesseract] [18:25:38] INFO> opkiler22789 вышел из игры
[Tesseract] [18:25:38] INFO> opkiler22789[/95.46.157.19:19132] отключился: timeout
[Tesseract] [18:26:07] CRITICAL> Error: "Call to a member function fetch_assoc() on boolean" (EXCEPTION) in "/plugins/HereAuth-master/src/HereAuth/Database/MySQL/MySQLLoadPlayerTask" at line 40
[Tesseract] [18:26:07] INFO> opkiler22789[/95.46.157.19:19132] вошел с id сущности -6712286032986211513 на (2, world, 256, 65)
[Tesseract] [18:26:07] CRITICAL> Could not execute asynchronous task MySQLLoadPlayerTask: Task crashed
Accordingly, authorization is lost
Situations are even more interesting ... It's enough for one player to disconnect through timeout. And all the rest will pass without authorization
[Tesseract] [18:48:56] CRITICAL> Error: "Call to a member function fetch_assoc() on boolean" (EXCEPTION) in "/plugins/HereAuth-master/src/HereAuth/Database/MySQL/MySQLLoadPlayerTask" at line 40
[Tesseract] [18:48:56] INFO> phx[/95.46.157.19:1024] вошел с id сущности 4709938578854418348 на (2, world, 215.7194, 64)
[Tesseract] [18:48:56] CRITICAL> Could not execute asynchronous task MySQLLoadPlayerTask: Task crashed
[Tesseract] [18:48:58] INFO> [EssentialsPE] Running
[Tesseract] [18:48:58] INFO> phx присоединился к игре
[Tesseract] [18:49:26] INFO> phx вышел из игры
[Tesseract] [18:49:26] INFO> phx[/95.46.157.19:1024] отключился: client disconnect
[Tesseract] [18:49:28] INFO> opkiler22789 вышел из игры
[Tesseract] [18:49:28] INFO> opkiler22789[/95.46.157.19:19132] отключился: timeout
[Tesseract] [18:49:34] CRITICAL> Error: "Call to a member function fetch_assoc() on boolean" (EXCEPTION) in "/plugins/HereAuth-master/src/HereAuth/Database/MySQL/MySQLLoadPlayerTask" at line 40
[Tesseract] [18:49:34] INFO> phx[/95.46.157.19:1024] вошел с id сущности 4709938578854418348 на (3, world, 215.7194, 64)
[Tesseract] [18:49:34] CRITICAL> Could not execute asynchronous task MySQLLoadPlayerTask: Task crashed
Maybe it's because you are using Tesseract
@Matthww, What do you propose to put then? It's not difficult for me to test
This issue is valid. HereAuth is responsible for checking whether the query succeeded and outputting the error. Nothing to do with the server software.
HereAuth working fine for me
This issue happens when there is something wrong with your database connection, e.g. permissions, wrong login config, etc. HereAuth is not responsible for actually fixing such problems, but it is responsible for gracefully reporting such problems to the user.
@SOF3 ...or not. MySQLiResult returns boolean when the result does not exist.
@Muqsit, @SOF3, I can provide values in the config
@musqit it must be an error. A SELECT query never returns a true, and only returns a false when there is an error.
How many times have I spelt @Muqsit wrongly as @musqit :P
@SOF3 True (that's what I meant). If this error can be produced in one task, it can be produced elsewhere too. For example, MySQLRenamePlayerTask - it has the same structuring and no fallback as to if the result returns false.
A simple although not-too-graceful way to resolve this issue (but not your real issue) is to add a line ``if($result === false){ echo $db->error; $this->setResult(false); return; }`. It will not stop you from crashing, but it will at least display an error message for you.
Decision: Repeat every 20-30 seconds:
public function fixdb(){
$sql = $this->db()->query("SELECT * FROM `table` LIMIT 1");
$data = $sql->fetch_assoc();
$sql->free();
}
Thus stop waiting for the mysql server https://i.stack.imgur.com/UkZTG.gif
Why not mysqli::ping()?
Not really relevant to this issue anyway?
@SOF3 This is her decision 😐. The solution is not one of the best, but I have not found another
A little update. (This was my fault: I linked the plugin (.phar) files of the main server to a second server (both; the main and the second server were running at the same time). It was solved after copying the .phar files rather than linking them).
Warning: mysqli::query(): MySQL server has gone away in phar:////plugins/HereAuth_v1.0-Dev.phar/src/HereAuth/Database/MySQL/MySQLLoadPlayerTask.php on line 39
Warning: mysqli::query(): Error reading result set's header in phar:////plugins/HereAuth_v1.0-Dev.phar/src/HereAuth/Database/MySQL/MySQLLoadPlayerTask.php on line 39
[12:33:13] [Asynchronous Worker #2 thread/CRITICAL]: Error: "Call to a member function fetch_assoc() on boolean" (EXCEPTION) in "/plugins/HereAuth_v1.0-Dev.phar/src/HereAuth/Database/MySQL/MySQLLoadPlayerTask" at line 40
[12:33:13] [Server thread/CRITICAL]: Could not execute asynchronous task MySQLLoadPlayerTask: Task crashed
[12:33:15] [Asynchronous Worker #2 thread/CRITICAL]: Error: "Call to a member function fetch_assoc() on boolean" (EXCEPTION) in "/plugins/HereAuth_v1.0-Dev.phar/src/HereAuth/Database/MySQL/MySQLLoadPlayerTask" at line 40
[12:33:15] [Server thread/CRITICAL]: Could not execute asynchronous task MySQLLoadPlayerTask: Task crashed
[12:33:16] [Server thread/NOTICE]: Deleted 0 trash worlds.
Warning: mysqli::query(): MySQL server has gone away in phar:////plugins/HereAuth_v1.0-Dev.phar/src/HereAuth/Database/MySQL/MySQLLoadPlayerTask.php on line 39
Warning: mysqli::query(): Error reading result set's header in phar:////plugins/HereAuth_v1.0-Dev.phar/src/HereAuth/Database/MySQL/MySQLLoadPlayerTask.php on line 39
[12:34:20] [Asynchronous Worker #1 thread/CRITICAL]: Error: "Call to a member function fetch_assoc() on boolean" (EXCEPTION) in "/plugins/HereAuth_v1.0-Dev.phar/src/HereAuth/Database/MySQL/MySQLLoadPlayerTask" at line 40
[12:34:20] [Server thread/CRITICAL]: Could not execute asynchronous task MySQLLoadPlayerTask: Task crashed
What, linking?
@SOF3 Yeah, linking (ln -s) one .phar file into every server's plugin folder.
I suspect that you're actually using different versions of HereAuth.