LuckPerms

LuckPerms

41.4k Downloads

Javadoc is missing throws tag for API methods

AuroraLS3 opened this issue ยท 2 comments

commented

Describe the issue

MinimalApiProvider throws an exception on getTrackManager

LuckPerms javadoc does not have a throws that indicates this behavior
https://github.com/lucko/LuckPerms/blob/95d2832884ac10020e7eec13c54f01381bce186d/api/src/main/java/net/luckperms/api/LuckPerms.java#L106-L114

Exception:

java.lang.UnsupportedOperationException: API is not fully loaded yet - current implementation is minimal.
	at me.lucko.luckperms.common.api.MinimalApiProvider.exception(MinimalApiProvider.java:72) ~[MinimalApiProvider.class:?]
	at me.lucko.luckperms.common.api.MinimalApiProvider.getTrackManager(MinimalApiProvider.java:93) ~[MinimalApiProvider.class:?]
	at com.djrapitops.extension.LuckPermsExtension.tracks(LuckPermsExtension.java:201) ~[LuckPermsExtension.class:?]
	at sun.reflect.GeneratedMethodAccessor37.invoke(Unknown Source) ~[?:?]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_212]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_212]
	at com.djrapitops.plan.extension.implementation.providers.Parameters$ServerParameters.usingOn(Parameters.java:63) ~[Parameters$ServerParameters.class:?]
	at com.djrapitops.plan.extension.implementation.providers.MethodWrapper.callMethod(MethodWrapper.java:46) ~[MethodWrapper.class:?]
	at com.djrapitops.plan.extension.implementation.providers.gathering.TableProviderValueGatherer.lambda$null$3(TableProviderValueGatherer.java:82) ~[TableProviderValueGatherer.class:?]
	at com.djrapitops.plan.extension.implementation.providers.gathering.TableProviderValueGatherer.getMethodResult(TableProviderValueGatherer.java:119) ~[TableProviderValueGatherer.class:?]
	at com.djrapitops.plan.extension.implementation.providers.gathering.TableProviderValueGatherer.gatherTableDataOfProvider(TableProviderValueGatherer.java:103) ~[TableProviderValueGatherer.class:?]
	at com.djrapitops.plan.extension.implementation.providers.gathering.TableProviderValueGatherer.gatherTableDataOfServer(TableProviderValueGatherer.java:86) ~[TableProviderValueGatherer.class:?]
	at com.djrapitops.plan.extension.implementation.providers.gathering.ProviderValueGatherer.updateValues(ProviderValueGatherer.java:162) ~[ProviderValueGatherer.class:?]
	at com.djrapitops.plan.extension.ExtensionServiceImplementation.updateServerValues(ExtensionServiceImplementation.java:198) ~[ExtensionServiceImplementation.class:?]
	... 1010 more

There is a possible regression bug related to this exception, users have been reporting that the issue begun with v5.0.92 after updating from Luckperms v5.0.50
plan-player-analytics/Plan#1359

commented

The important part of that exception is

API is not fully loaded yet

The MinimalApiProvider is only in use for the period of time between LuckPerms starting to load & LuckPerms fully enabling.

So it seems like either the full LP enable process hasn't happened yet, or something stopped the LP enable process from completing.

commented

The MinimalApiProvider has been removed in this commit: fbac03e

This is unlikely to fix the issue, but should make the cause more visible (as now the API just won't be available at all)