Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when starting #145

Closed
NdaruAjaa opened this issue Jul 2, 2023 · 5 comments
Closed

Error when starting #145

NdaruAjaa opened this issue Jul 2, 2023 · 5 comments
Assignees
Labels
Bug: Plugin side Plugin side`s bug. Status: Reproduced It will be granted to the reproduced issues.

Comments

@NdaruAjaa
Copy link

NdaruAjaa commented Jul 2, 2023

PocketMine-MP version: 5.1.3 [Protocol 589]
Git commit: 2278275505a7f9d768027673e699e6199575c8bc
PHP version: 8.1.19
OS: Linux, linux

A PLUGIN WAS INVOLVED IN THIS CRASH
BAD PLUGIN: Texter

Error: Invalid base version "", should contain at least 3 version digits
File: pmsrc/src/utils/VersionString
Line: 45
Type: InvalidArgumentException
Backtrace:
#0 plugins/Texter_v4.2.0.phar/src/jp/mcbe/fuyutsuki/Texter/task/CheckUpdateTask(50): pocketmine\utils\VersionString->__construct(string[0] )
#1 pmsrc/src/scheduler/AsyncPool(248): jp\mcbe\fuyutsuki\Texter\task\CheckUpdateTask->onCompletion()
#2 pmsrc/src/scheduler/AsyncPool(210): pocketmine\scheduler\AsyncPool->collectTasksFromWorker(int 1)
#3 pmsrc/src/Server(1786): pocketmine\scheduler\AsyncPool->collectTasks()
#4 pmsrc/src/Server(1671): pocketmine\Server->tick()
#5 pmsrc/src/Server(1063): pocketmine\Server->tickProcessor()
#6 pmsrc/src/PocketMine(334): pocketmine\Server->__construct(object pocketmine\thread\ThreadSafeClassLoader#6, object pocketmine\utils\MainLogger#3, string[16] /home/container/, string[24] /home/container/plugins/)
#7 pmsrc/src/PocketMine(357): pocketmine\server()
#8 pmsrc(11): require(string[60] phar:///home/container/PocketMine-MP.phar/src/PocketMine.php)

Code:
[36] 	private string $suffix;
[37] 
[38] 	public function __construct(
[39] 		private string $baseVersion,
[40] 		private bool $isDevBuild = false,
[41] 		private int $buildNumber = 0
[42] 	){
[43] 		preg_match('/^(\d+)\.(\d+)\.(\d+)(?:-(.*))?$/', $this->baseVersion, $matches);
[44] 		if(count($matches) < 4){
[45] 			throw new \InvalidArgumentException("Invalid base version \"$baseVersion\", should contain at least 3 version digits");
[46] 		}
[47] 
[48] 		$this->major = (int) $matches[1];
[49] 		$this->minor = (int) $matches[2];
[50] 		$this->patch = (int) $matches[3];
[51] 		$this->suffix = $matches[4] ?? "";
[52] 	}
[53] 
[54] 	public static function isValidBaseVersion(string $baseVersion) : bool{
[55] 		return preg_match('/^\d+\.\d+\.\d+(?:-(.*))?$/', $baseVersion, $matches) === 1;
@NdaruAjaa NdaruAjaa added the Status: Unreproduced It will be granted to the unreproduced issues. label Jul 2, 2023
@scamaccas
Copy link

pls fix this

@note3crafter
Copy link

same error here

@xxFLORII
Copy link
Collaborator

xxFLORII commented Jul 7, 2023

@fuyutsuki because of this, can we use "tag_name" instead of "name" from https://api.github.com/repos/fuyutsuki/Texter/releases/latest? It seems like the "name" variable is empty.

@fuyutsuki
Copy link
Owner

@xxFLORII Yes, I would be happy to modify it that way, as I dont have enough time for this project right now.

@fuyutsuki fuyutsuki added Bug: Plugin side Plugin side`s bug. Status: Reproduced It will be granted to the reproduced issues. and removed Status: Unreproduced It will be granted to the unreproduced issues. labels Jul 7, 2023
@xxFLORII
Copy link
Collaborator

xxFLORII commented Jul 7, 2023

@fuyutsuki i have pushed it into the dev/4.2 branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug: Plugin side Plugin side`s bug. Status: Reproduced It will be granted to the reproduced issues.
Projects
None yet
Development

No branches or pull requests

5 participants