-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
1.21.1: Failed parsing view condition for component! -> Issue with boolean return? #2916
Comments
Another error: Type: FORMAT
Key: "is_player"
Value: |-
checkPlayer();
function checkPlayer() {
var val = "{luckperms_inherits_group_player}";
if (val == "yes") {
return true;
} else {
return false;
}
}
Sender_Condition: ""
Sender_Permission: "" 16:35:24] [Async Chat Thread - #164/INFO]: [ChatControl] -------------------------------------------------------------------------------------------
[16:35:24] [Async Chat Thread - #164/INFO]: [ChatControl] Error parsing Sender_Condition in format!
[16:35:24] [Async Chat Thread - #164/INFO]: [ChatControl] Format: chat.yml
[16:35:24] [Async Chat Thread - #164/INFO]: [ChatControl] Option: real
[16:35:24] [Async Chat Thread - #164/INFO]: [ChatControl] Line: !{is_player}
[16:35:24] [Async Chat Thread - #164/INFO]: [ChatControl] Sender: darifo
[16:35:24] [Async Chat Thread - #164/INFO]: [ChatControl] Variables: [channel, message_uuid, message_is_denied_silently, message, sender]
[16:35:24] [Async Chat Thread - #164/INFO]: [ChatControl] Error: Report: Error parsing JavaScript! Line: 1. Error: <eval>:1:11 Expected : but found }
[16:35:24] [Async Chat Thread - #164/INFO]: [ChatControl] !{is_player}
[16:35:24] [Async Chat Thread - #164/INFO]: [ChatControl] ^ in <eval> at line number 1 at column number 11
[16:35:24] [Async Chat Thread - #164/INFO]: [ChatControl]
[16:35:24] [Async Chat Thread - #164/INFO]: [ChatControl] Check that Sender_Conditon is a JavaScript
[16:35:24] [Async Chat Thread - #164/INFO]: [ChatControl] code returning a valid Boolean!
[16:35:24] [Async Chat Thread - #164/INFO]: [ChatControl] -------------------------------------------------------------------------------------------
[16:35:24] [Async Chat Thread - #164/ERROR]: Could not pass event AsyncChatEvent to ChatControl v11.0.3-BETA
org.mineacademy.chatcontrol.lib.exception.FoScriptException: Report: Error parsing JavaScript! Line: 1. Error: <eval>:1:11 Expected : but found }
!{is_player}
^ in <eval> at line number 1 at column number 11
at ChatControl-11.0.3-BETA.jar/org.mineacademy.chatcontrol.lib.model.JavaScriptExecutor.run(JavaScriptExecutor.java:330) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.mineacademy.chatcontrol.lib.model.JavaScriptExecutor.run(JavaScriptExecutor.java:216) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.mineacademy.chatcontrol.lib.model.JavaScriptExecutor.run(JavaScriptExecutor.java:156) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.mineacademy.chatcontrol.model.Format$Part.build(Format.java:343) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.mineacademy.chatcontrol.model.Format.build(Format.java:153) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.mineacademy.chatcontrol.model.Channel.sendMessage(Channel.java:627) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.mineacademy.chatcontrol.model.Channel.sendMessage(Channel.java:542) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.mineacademy.chatcontrol.listener.chat.ChatHandler.handle0(ChatHandler.java:225) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.mineacademy.chatcontrol.listener.chat.ChatHandler.handle(ChatHandler.java:49) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.mineacademy.chatcontrol.listener.chat.AdventureChatListener.execute(AdventureChatListener.java:61) ~[ChatControl-11.0.3-BETA.jar:?]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:1.21.1-2329-803bf62]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[purpur-1.21.1.jar:1.21.1-2329-803bf62]
at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:131) ~[purpur-1.21.1.jar:1.21.1-2329-803bf62]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:630) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
at io.papermc.paper.adventure.ChatProcessor.post(ChatProcessor.java:378) ~[purpur-1.21.1.jar:1.21.1-2329-803bf62]
at io.papermc.paper.adventure.ChatProcessor.processModern(ChatProcessor.java:151) ~[purpur-1.21.1.jar:1.21.1-2329-803bf62]
at io.papermc.paper.adventure.ChatProcessor.process(ChatProcessor.java:106) ~[purpur-1.21.1.jar:1.21.1-2329-803bf62]
at net.minecraft.server.network.ServerGamePacketListenerImpl.chat(ServerGamePacketListenerImpl.java:2493) ~[purpur-1.21.1.jar:1.21.1-2329-803bf62]
at net.minecraft.server.network.ServerGamePacketListenerImpl.broadcastChatMessage(ServerGamePacketListenerImpl.java:2609) ~[purpur-1.21.1.jar:1.21.1-2329-803bf62]
at net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleChat$13(ServerGamePacketListenerImpl.java:2257) ~[purpur-1.21.1.jar:1.21.1-2329-803bf62]
at net.minecraft.util.FutureChain.lambda$append$1(FutureChain.java:25) ~[purpur-1.21.1.jar:1.21.1-2329-803bf62]
at java.base/java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:718) ~[?:?]
at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482) ~[?:?]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
Caused by: javax.script.ScriptException: <eval>:1:11 Expected : but found }
!{is_player}
^ in <eval> at line number 1 at column number 11
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.api.scripting.NashornScriptEngine.throwAsScriptException(NashornScriptEngine.java:463) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.api.scripting.NashornScriptEngine.compileImpl(NashornScriptEngine.java:530) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.api.scripting.NashornScriptEngine.compileImpl(NashornScriptEngine.java:517) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:395) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:151) ~[ChatControl-11.0.3-BETA.jar:?]
at java.scripting/javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:262) ~[java.scripting:?]
at ChatControl-11.0.3-BETA.jar/org.mineacademy.chatcontrol.lib.model.JavaScriptExecutor.run(JavaScriptExecutor.java:272) ~[ChatControl-11.0.3-BETA.jar:?]
... 26 more
Caused by: org.openjdk.nashorn.internal.runtime.ParserException: <eval>:1:11 Expected : but found }
!{is_player}
^
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.internal.parser.AbstractParser.error(AbstractParser.java:293) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.internal.parser.AbstractParser.error(AbstractParser.java:278) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.internal.parser.AbstractParser.expectDontAdvance(AbstractParser.java:349) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.internal.parser.AbstractParser.expect(AbstractParser.java:336) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.internal.parser.Parser.propertyAssignment(Parser.java:3198) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.internal.parser.Parser.objectLiteral(Parser.java:2977) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.internal.parser.Parser.primaryExpression(Parser.java:2777) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.internal.parser.Parser.memberExpression(Parser.java:3598) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.internal.parser.Parser.leftHandSideExpression(Parser.java:3382) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.internal.parser.Parser.unaryExpression(Parser.java:4397) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.internal.parser.Parser.unaryExpression(Parser.java:4377) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.internal.parser.Parser.expression(Parser.java:4568) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.internal.parser.Parser.conditionalExpression(Parser.java:4720) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.internal.parser.Parser.assignmentExpression(Parser.java:4659) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.internal.parser.Parser.expression(Parser.java:4537) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.internal.parser.Parser.expressionStatement(Parser.java:1840) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.internal.parser.Parser.statement(Parser.java:1146) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.internal.parser.Parser.sourceElements(Parser.java:900) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.internal.parser.Parser.program(Parser.java:835) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.internal.parser.Parser.parse(Parser.java:322) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.internal.parser.Parser.parse(Parser.java:282) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.internal.runtime.Context.compile(Context.java:1484) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.internal.runtime.Context.compileScript(Context.java:1451) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.internal.runtime.Context.compileScript(Context.java:761) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.api.scripting.NashornScriptEngine.compileImpl(NashornScriptEngine.java:528) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.api.scripting.NashornScriptEngine.compileImpl(NashornScriptEngine.java:517) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:395) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:151) ~[ChatControl-11.0.3-BETA.jar:?]
at java.scripting/javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:262) ~[java.scripting:?]
at ChatControl-11.0.3-BETA.jar/org.mineacademy.chatcontrol.lib.model.JavaScriptExecutor.run(JavaScriptExecutor.java:272) ~[ChatControl-11.0.3-BETA.jar:?]
... 26 more |
Hey there! I can't reproduce the JS error. Can you please ZIP me your /chc debug? |
2024-12-22-2.log |
Got it, I will have more time to sit with this after holidays, thanks for your understanding. |
Thanks, it's happening quite often and once it broke the whole chat format, so I'll prob wait for the fix until trying to update again |
Should be fixed in todays version, let me know below if you will still experience it. Also you can now just use this instead of having to have a custom variable:
|
Bohužel stále 😅 @kangarko 14:11:28] [AsyncNotifyKeyedQueue - 28/INFO]: Second position set to (61, 63, 15) (1).
[14:11:29] [Async Chat Thread - #112/INFO]: [ChatControl] -------------------------------------------------------------------------------------------
[14:11:29] [Async Chat Thread - #112/INFO]: [ChatControl] Failed parsing view condition for component!
[14:11:29] [Async Chat Thread - #112/INFO]: [ChatControl]
[14:11:29] [Async Chat Thread - #112/INFO]: [ChatControl] The view condition must be a JavaScript code that returns a boolean!
[14:11:29] [Async Chat Thread - #112/INFO]: [ChatControl] Component: {
[14:11:29] [Async Chat Thread - #112/INFO]: [ChatControl] "Condition": "{pack_check}",
[14:11:29] [Async Chat Thread - #112/INFO]: [ChatControl] "Component": "<click:suggest_command:'/msg2 xchengnlx '><hover:show_text:'xchengnlx ❤17<br>Rank: <br>Level: 2<br>--*---------------*--<br><br> ▎ Player Statistics<br> ▎ Money: $34k<br> ▎ Exp: 5 Lvls<br> ▎ KDR: 1.25<br><br>Time Played: 15 h<br><br>(Click to message)'>"
[14:11:29] [Async Chat Thread - #112/INFO]: [ChatControl] }
[14:11:29] [Async Chat Thread - #112/INFO]: [ChatControl] Line: {pack_check}
[14:11:29] [Async Chat Thread - #112/INFO]: [ChatControl] Error: Report: Error parsing JavaScript! Invalid or unparsed variable! Line: 1. Error: ReferenceError: "pack_check" is not defined in <eval> at line number 1 |
Vyzera to tak, ze {pack_check} je neplatna variable, skus nastavit Performance.Support_Variables_In_Variables na true v dalsej verzii a napis ci to stale robi. Ako casto sa to deje? Ja som to bol schopny reprodukovat iba na inom serveri na proxy, na serveri ktory nepodporuje danu premennu. |
V této verzi jsem to už měl nastavené a dělá to poměrně často. Viz zaslaný log. Možná to zkusím předělat jak jsi navrhoval do: Receiver_Variable: "{luckperms_inherits_group_....} yes" |
Napis ako to pojde v dalsom release, vdaka. |
Stále se to děje ale asi už výrazně méně. Mám ti poslat celý /chc debug? Ale nevím přesně jak to replikovat, vypadá to, že je to random. |
latest.log Ale spíš to vypadá, že to neregistruje ani, že ten pack_check nebo is_player atd.. existují občas: Nebo mám případně zapnout nějaký debug v settings? Pomůže nám něco? |
A btw zkoušel jsem Sender_Variable a Receiver_Variable, ale vypadá to, že tam nefunguje "!" negace?
toto funguje |
Ospravedlnujem sa za neskoru odpoved, prosim otestuj dalsiu verziu, upravil som tie chybove hlasky aby boli viac informativne a dufam ze uz v dalsej verzii to opravim. |
Are you using MySQL?
No
Are you using a proxy?
No
"/version ChatControlRed" - plugin version
11.0.3
Optional: Error log
No response
ZIP of "/chc debug"
No response
Steps to reproduce
Hello, I have:
and I use it in my format:
and now I received this error:
also there's Not Secure prefix, is it ok? In console
The text was updated successfully, but these errors were encountered: