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

PluginManager::isCompatibleAPI() Does not properly evaluate plugin declared API version number. #2335

Closed
95CivicSi opened this issue Jul 27, 2018 · 2 comments
Labels
Category: Core Related to internal functionality Resolution: Fixed

Comments

@95CivicSi
Copy link
Contributor

Issue description

When attempting to load a plugin that declares a patch level specific number, PocketMine-MP will fail to properly evaluate that number if the plugin declares a lower minor level version than the current server version.

Example: Attempting to load a plugin which declares api: 3.0.7 on PocketMine-MP 3.1.1 will result with the plugin not being loaded and an error message given.
Could not load plugin <plugin_name>: Incompatible API version (plugin requires one of: 3.0.7)

  • Expected result: Any plugin declaring a patch level requirement, should load if the minor level requirement is exceeded, regardless of the patch level requirement.
    Examples:

    • 3.0.0 plugin loads on Server 3.1.1
    • 3.0.1 plugin loads on Server 3.1.1
    • 3.0.2 plugin loads on Server 3.1.1
    • 3.0.3 plugin loads on Server 3.1.1
  • Actual result: What actually happened? Plugins declaring a patch level requirement will not load if the declared patch level is higher than the server patch level, and the minor level of the server is higher than the plugin declared minor level.
    Examples:

    • 3.0.0 plugin loads on Server 3.1.1
    • 3.0.1 plugin loads on Server 3.1.1
    • 3.0.2 plugin does not load on Server 3.1.1
    • 3.0.3 plugin does not load on Server 3.1.1

Steps to reproduce the issue

  1. Attempt to start a PocketMine-MP server with a plugin that declares a specific patch level.
  2. Make sure the server version has a minor level, higher than the minor level declared by the plugin.
  3. Make sure the server version has a patch level lower than the patch level declared by the plugin.
    4 Plugin will fail to load.

OS and versions

  • PocketMine-MP: 3.0.0 - 3.1.1
  • PHP: 7.2.5
  • Server OS: Windows 10, Linux, Mac
  • Game version: NA

Plugins

  • Test on a clean server without plugins: is the issue reproducible without any plugins loaded?

If the issue is not reproducible without plugins:

  • Have you asked for help on our forums before creating an issue?
  • Can you provide sample, minimal reproducing code for the issue? If so, paste it in the bottom section
  • Paste your list of plugins here (use the 'plugins' command in PocketMine-MP)

Crashdump, backtrace or other files

  • Do not paste crashdumps into an issue - please use our Crash Archive at https://crash.pmmp.io for submitting crash reports to not spam the issue tracker. Add links to your reports in the Crash Archive here.
  • Please use gist or anything else to add other files and add links here
  • ...
@SOF3 SOF3 closed this as completed Jul 27, 2018
@SOF3 SOF3 added the Resolution: Works As Intended Behaviour is intended and will not be altered label Jul 27, 2018
@SOF3 SOF3 reopened this Jul 27, 2018
@SOF3 SOF3 added Category: Core Related to internal functionality Status: Debugged Cause of the bug has been found, but not fixed and removed Resolution: Works As Intended Behaviour is intended and will not be altered labels Jul 27, 2018
@dktapps
Copy link
Member

dktapps commented Jul 27, 2018

oh... so 3.0.7 would only load on 3.1.7 and up, 3.2.7 and up, etc?

that's a rather amusing bug.

@95CivicSi
Copy link
Contributor Author

Lol, I don't know if I would describe it as amusing, but otherwise, your statement is correct.

@dktapps dktapps closed this as completed Jul 27, 2018
@dktapps dktapps added Resolution: Fixed and removed Status: Debugged Cause of the bug has been found, but not fixed labels Jul 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Core Related to internal functionality Resolution: Fixed
Projects
None yet
Development

No branches or pull requests

3 participants