Avoid crashing on invalid @Plugin annotations #373
Comments
@Minecrell can you look into this? @kmecpp What plugins? |
Two of my own plugins. It's possible I screwed something up but there's nothing about them in the stacktrace so I wouldn't know what the issue is |
@kmecpp Can you share the JAR of your plugins? For some reason, it's confused about something in the |
Here are the jars. Note that the |
That sounds suspicious. If you generate this automatically, you should only set the plugin ID in the To be exact however, the problem here is that you generate the @Plugin(
id = "enjinnews",
name = "EnjinNews",
version = "1.0",
description = "",
authors = {"kmecpp"},
dependencies = {"spongeapi@7.0.0", "Osmium"},
url = ""
) it should be something like: @Plugin(
id = "enjinnews",
name = "EnjinNews",
version = "1.0",
authors = {"kmecpp"},
dependencies = {
@Dependency(id = "spongeapi", version = "7.0.0"),
@Dependency(id = "Osmium"), // Note: Upper case plugin ID cannot exist
}
) ... but as already mentioned this isn't necessary if you have it in |
Ahh thank you! Just saved me a lot of head banging |
Additional suggestion: Consider using https://github.com/SpongePowered/plugin-meta to generate the That way you don't need to know how the |
Thanks for the suggestion! I will take a look |
Should an invalid dependencies specification in a plugin crash the server? Can we add a sanity check + error message? |
@Plugin(
id = "enjinnews",
name = "EnjinNews",
version = "1.0",
description = "",
authors = {"kmecpp"},
dependencies = {"spongeapi@7.0.0", "Osmium"},
url = ""
) This is a compile-time error. IMO the |
@ImMorpheus Yes, it was caused by generating bytecode directly in an invalid way. Nevertheless, SV should do more validation here and specifically say that plugin X is invalid, instead of crashing the whole server. |
Tried to launch my server after adding a Sponge plugin that depended on another Sponge plugin and the server crashed. Is this a Sponge issues?
The text was updated successfully, but these errors were encountered: