DiscordSRV

DiscordSRV

86.8k Downloads

SpelEvaluationException: EL1011E: Method call: Attempted to call method getName() on null context object

brothanb opened this issue ยท 1 comments

commented

I observed this exception while troubleshooting a lag issue when we updated DiscordSRV to 1.21.2. A check of our logs shows it in 1.21.1 as well.

[01:26:22] [Craft Scheduler Thread - 99/WARN]: [DiscordSRV] Plugin DiscordSRV v1.21.2 generated an exception while executing task 1047399
org.springframework.expression.spel.SpelEvaluationException: EL1011E: Method call: Attempted to call method getName() on null context object
	at org.springframework.expression.spel.ast.MethodReference.throwIfNotNullSafe(MethodReference.java:154) ~[?:?]
	at org.springframework.expression.spel.ast.MethodReference.getValueRef(MethodReference.java:83) ~[?:?]
	at org.springframework.expression.spel.ast.CompoundExpression.getValueRef(CompoundExpression.java:70) ~[?:?]
	at org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:91) ~[?:?]
	at org.springframework.expression.spel.ast.OpPlus.getValueInternal(OpPlus.java:83) ~[?:?]
	at org.springframework.expression.spel.ast.SpelNodeImpl.getTypedValue(SpelNodeImpl.java:117) ~[?:?]
	at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:308) ~[?:?]
	at github.scarsz.discordsrv.util.SpELExpressionBuilder.evaluate(SpELExpressionBuilder.java:73) ~[?:?]
	at github.scarsz.discordsrv.util.SpELExpressionBuilder.evaluate(SpELExpressionBuilder.java:67) ~[?:?]
	at github.scarsz.discordsrv.util.NamedValueFormatter.lambda$formatExpressions$1(NamedValueFormatter.java:98) ~[?:?]
	at github.scarsz.discordsrv.util.NamedValueFormatter.format(NamedValueFormatter.java:57) ~[?:?]
	at github.scarsz.discordsrv.util.NamedValueFormatter.formatExpressions(NamedValueFormatter.java:92) ~[?:?]
	at github.scarsz.discordsrv.modules.alerts.AlertListener.lambda$processAlert$9(AlertListener.java:437) ~[?:?]
	at github.scarsz.discordsrv.DiscordSRV.lambda$translateMessage$39(DiscordSRV.java:1851) ~[?:?]
	at java.util.Optional.map(Optional.java:215) ~[?:1.8.0_232]
	at github.scarsz.discordsrv.DiscordSRV.translateMessage(DiscordSRV.java:1851) ~[?:?]
	at github.scarsz.discordsrv.modules.alerts.AlertListener.processAlert(AlertListener.java:472) ~[?:?]
	at github.scarsz.discordsrv.modules.alerts.AlertListener.lambda$runAlertsForEvent$3(AlertListener.java:305) ~[?:?]
	at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftTask.run(CraftTask.java:99) ~[patched_1.16.4.jar:git-Paper-393]
	at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:54) ~[patched_1.16.4.jar:git-Paper-393]
	at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[patched_1.16.4.jar:git-Paper-393]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_232]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_232]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_232]
commented

This is an issue with your alerts config, not a DiscordSRV issue

Alerts are known to have degraded performance on 1.21.2, it'll be addressed soon