aadnk / ProtocolLib

Provides read and write access to the Minecraft protocol with Bukkit.
GNU General Public License v2.0
288 stars 92 forks source link

Exception during update check while running in read only docker environment #187

Open Exceptionflug opened 3 years ago

Exceptionflug commented 3 years ago

Describe the bug A massive exception get's printed every time the server starts.

To Reproduce Steps to reproduce the behavior:

  1. Create a minecraft server inside an docker image with ProtocolLib installed. The plugin directory needs to be inside the image and must not be in a volume.
  2. Start the server and enjoy the exception.

Expected behavior Normal startup or a minimal log message, that automatic update checks have failed.

Screenshots Part of Server Log: http://paste.cytooxien.de/xifayujofi.md

Version Info /protocol dump:

[12:12:37 ERROR]: [ProtocolLib] Failed to create dump:
java.io.IOException: Read-only file system

But it is ProtocolLib 4.6.0 downloaded from spigotmc.org ;)

Additional context Maybe add an option to completely disable update checks.

MiniDigger commented 3 years ago

not sure this is really an issue. you deny the plugin to write to its own config file, of course that will lead to unexpected behavior. I bet any other plugin behaves the same way here.

I mean, it would be possible to more gracefully handle this here with a writeable check https://github.com/dmulloy2/ProtocolLib/blob/master/src/main/java/com/comphenix/protocol/ProtocolConfig.java#L134 but any bukkit plugin expects its data folder to be writeable...

Exceptionflug commented 3 years ago

Not in that use case. I would really like to let the plugin write it's file, but this is not possible without adding a volume to the plugin folder which I can't do since this is a Pterodactyl managed container.