Spark Open - Error on Websocket Close (v1.10.51)
ThatProgrammerr opened this issue ยท 3 comments
I've noticed that if I open the WebSocket by doing /spark profiler open
, then navigating to another Chrome tab for a while, Chrome will sleep the tab, therefore dropping my connection to the WebSocket. This is intended behavior. What isn't expected is that once the socket is closed, errors seem to be printed to the console of my server regarding the WebSocket being closed.
This is on v1.10.51.
This will error until you run the open command again, or you stop the server to disable the plugin. Even if you run the open command again, it will eventually close the websocket and the error will start again.
Disclaimer: I'm trying to get more verbose logging due to some issues I've been having so I have -Dpaper.log-level=ALL
set in my startup flags, so if your plugin only usually reports this in this case, you may disregard this issue and let me know that's the case.
[16:13:17 INFO]: [spark] [Viewer - 3p2i26OVxDlbh0D] No clients have pinged for 30s, closing socket
[16:13:21 WARN]: [spark] Exception occurred while sending data to the socket
[16:13:21 WARN]: me.lucko.spark.lib.bytesocks.ws.exceptions.WebsocketNotConnectedException
[16:13:21 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.lib.bytesocks.ws.WebSocketImpl.send(WebSocketImpl.java:674)
[16:13:21 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.lib.bytesocks.ws.WebSocketImpl.send(WebSocketImpl.java:650)
[16:13:21 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.lib.bytesocks.ws.client.WebSocketClient.send(WebSocketClient.java:431)
[16:13:21 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.lib.bytesocks.BytesocksClientImpl$SocketImpl.send(BytesocksClientImpl.java:135)
[16:13:21 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.common.ws.ViewerSocketConnection.sendRawPacket(ViewerSocketConnection.java:171)
[16:13:21 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.common.ws.ViewerSocketConnection.sendPacket(ViewerSocketConnection.java:155)
[16:13:21 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.common.ws.ViewerSocketConnection.sendPacket(ViewerSocketConnection.java:134)
[16:13:21 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.common.ws.ViewerSocket.sendUpdatedStatistics(ViewerSocket.java:187)
[16:13:21 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.common.sampler.AbstractSampler.sendStatisticsToSocket(AbstractSampler.java:167)
[16:13:21 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.common.sampler.async.AsyncSampler.lambda$attachSocket$2(AsyncSampler.java:209)
[16:13:21 WARN]: at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
[16:13:21 WARN]: at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
[16:13:21 WARN]: at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
[16:13:21 WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
[16:13:21 WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
[16:13:21 WARN]: at java.base/java.lang.Thread.run(Thread.java:833)
[16:13:31 WARN]: [spark] Exception occurred while sending data to the socket
[16:13:31 WARN]: me.lucko.spark.lib.bytesocks.ws.exceptions.WebsocketNotConnectedException
[16:13:31 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.lib.bytesocks.ws.WebSocketImpl.send(WebSocketImpl.java:674)
[16:13:31 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.lib.bytesocks.ws.WebSocketImpl.send(WebSocketImpl.java:650)
[16:13:31 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.lib.bytesocks.ws.client.WebSocketClient.send(WebSocketClient.java:431)
[16:13:31 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.lib.bytesocks.BytesocksClientImpl$SocketImpl.send(BytesocksClientImpl.java:135)
[16:13:31 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.common.ws.ViewerSocketConnection.sendRawPacket(ViewerSocketConnection.java:171)
[16:13:31 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.common.ws.ViewerSocketConnection.sendPacket(ViewerSocketConnection.java:155)
[16:13:31 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.common.ws.ViewerSocketConnection.sendPacket(ViewerSocketConnection.java:134)
[16:13:31 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.common.ws.ViewerSocket.sendUpdatedStatistics(ViewerSocket.java:187)
[16:13:31 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.common.sampler.AbstractSampler.sendStatisticsToSocket(AbstractSampler.java:167)
[16:13:31 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.common.sampler.async.AsyncSampler.lambda$attachSocket$2(AsyncSampler.java:209)
[16:13:31 WARN]: at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
[16:13:31 WARN]: at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
[16:13:31 WARN]: at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
[16:13:31 WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
[16:13:31 WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
[16:13:31 WARN]: at java.base/java.lang.Thread.run(Thread.java:833)
[16:13:41 WARN]: [spark] Exception occurred while sending data to the socket
[16:13:41 WARN]: me.lucko.spark.lib.bytesocks.ws.exceptions.WebsocketNotConnectedException
[16:13:41 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.lib.bytesocks.ws.WebSocketImpl.send(WebSocketImpl.java:674)
[16:13:41 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.lib.bytesocks.ws.WebSocketImpl.send(WebSocketImpl.java:650)
[16:13:41 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.lib.bytesocks.ws.client.WebSocketClient.send(WebSocketClient.java:431)
[16:13:41 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.lib.bytesocks.BytesocksClientImpl$SocketImpl.send(BytesocksClientImpl.java:135)
[16:13:41 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.common.ws.ViewerSocketConnection.sendRawPacket(ViewerSocketConnection.java:171)
[16:13:41 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.common.ws.ViewerSocketConnection.sendPacket(ViewerSocketConnection.java:155)
[16:13:41 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.common.ws.ViewerSocketConnection.sendPacket(ViewerSocketConnection.java:134)
[16:13:41 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.common.ws.ViewerSocket.sendUpdatedStatistics(ViewerSocket.java:187)
[16:13:41 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.common.sampler.AbstractSampler.sendStatisticsToSocket(AbstractSampler.java:167)
[16:13:41 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.common.sampler.async.AsyncSampler.lambda$attachSocket$2(AsyncSampler.java:209)
[16:13:41 WARN]: at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
[16:13:41 WARN]: at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
[16:13:41 WARN]: at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
[16:13:41 WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
[16:13:41 WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
[16:13:41 WARN]: at java.base/java.lang.Thread.run(Thread.java:833)
[16:13:51 WARN]: [spark] Exception occurred while sending data to the socket
[16:13:51 WARN]: me.lucko.spark.lib.bytesocks.ws.exceptions.WebsocketNotConnectedException
[16:13:51 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.lib.bytesocks.ws.WebSocketImpl.send(WebSocketImpl.java:674)
[16:13:51 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.lib.bytesocks.ws.WebSocketImpl.send(WebSocketImpl.java:650)
[16:13:51 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.lib.bytesocks.ws.client.WebSocketClient.send(WebSocketClient.java:431)
[16:13:51 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.lib.bytesocks.BytesocksClientImpl$SocketImpl.send(BytesocksClientImpl.java:135)
[16:13:51 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.common.ws.ViewerSocketConnection.sendRawPacket(ViewerSocketConnection.java:171)
[16:13:51 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.common.ws.ViewerSocketConnection.sendPacket(ViewerSocketConnection.java:155)
[16:13:51 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.common.ws.ViewerSocketConnection.sendPacket(ViewerSocketConnection.java:134)
[16:13:51 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.common.ws.ViewerSocket.sendUpdatedStatistics(ViewerSocket.java:187)
[16:13:51 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.common.sampler.AbstractSampler.sendStatisticsToSocket(AbstractSampler.java:167)
[16:13:51 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.common.sampler.async.AsyncSampler.lambda$attachSocket$2(AsyncSampler.java:209)
[16:13:51 WARN]: at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
[16:13:51 WARN]: at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
[16:13:51 WARN]: at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
[16:13:51 WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
[16:13:51 WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
[16:13:51 WARN]: at java.base/java.lang.Thread.run(Thread.java:833)
[16:14:01 WARN]: [spark] Exception occurred while sending data to the socket
[16:14:01 WARN]: me.lucko.spark.lib.bytesocks.ws.exceptions.WebsocketNotConnectedException
[16:14:01 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.lib.bytesocks.ws.WebSocketImpl.send(WebSocketImpl.java:674)
[16:14:01 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.lib.bytesocks.ws.WebSocketImpl.send(WebSocketImpl.java:650)
[16:14:01 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.lib.bytesocks.ws.client.WebSocketClient.send(WebSocketClient.java:431)
[16:14:01 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.lib.bytesocks.BytesocksClientImpl$SocketImpl.send(BytesocksClientImpl.java:135)
[16:14:01 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.common.ws.ViewerSocketConnection.sendRawPacket(ViewerSocketConnection.java:171)
[16:14:01 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.common.ws.ViewerSocketConnection.sendPacket(ViewerSocketConnection.java:155)
[16:14:01 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.common.ws.ViewerSocketConnection.sendPacket(ViewerSocketConnection.java:134)
[16:14:01 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.common.ws.ViewerSocket.sendUpdatedStatistics(ViewerSocket.java:187)
[16:14:01 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.common.sampler.AbstractSampler.sendStatisticsToSocket(AbstractSampler.java:167)
[16:14:01 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.common.sampler.async.AsyncSampler.lambda$attachSocket$2(AsyncSampler.java:209)
[16:14:01 WARN]: at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
[16:14:01 WARN]: at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
[16:14:01 WARN]: at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
[16:14:01 WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
[16:14:01 WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
[16:14:01 WARN]: at java.base/java.lang.Thread.run(Thread.java:833)
[16:14:11 WARN]: [spark] Exception occurred while sending data to the socket
[16:14:11 WARN]: me.lucko.spark.lib.bytesocks.ws.exceptions.WebsocketNotConnectedException
[16:14:11 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.lib.bytesocks.ws.WebSocketImpl.send(WebSocketImpl.java:674)
[16:14:11 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.lib.bytesocks.ws.WebSocketImpl.send(WebSocketImpl.java:650)
[16:14:11 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.lib.bytesocks.ws.client.WebSocketClient.send(WebSocketClient.java:431)
[16:14:11 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.lib.bytesocks.BytesocksClientImpl$SocketImpl.send(BytesocksClientImpl.java:135)
[16:14:11 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.common.ws.ViewerSocketConnection.sendRawPacket(ViewerSocketConnection.java:171)
[16:14:11 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.common.ws.ViewerSocketConnection.sendPacket(ViewerSocketConnection.java:155)
[16:14:11 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.common.ws.ViewerSocketConnection.sendPacket(ViewerSocketConnection.java:134)
[16:14:11 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.common.ws.ViewerSocket.sendUpdatedStatistics(ViewerSocket.java:187)
[16:14:11 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.common.sampler.AbstractSampler.sendStatisticsToSocket(AbstractSampler.java:167)
[16:14:11 WARN]: at spark-1.10.51-bukkit.jar//me.lucko.spark.common.sampler.async.AsyncSampler.lambda$attachSocket$2(AsyncSampler.java:209)
[16:14:11 WARN]: at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
[16:14:11 WARN]: at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
[16:14:11 WARN]: at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
[16:14:11 WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
[16:14:11 WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
[16:14:11 WARN]: at java.base/java.lang.Thread.run(Thread.java:833)
Should be fixed by the above commit (should show up on the downloads page shortly)
Please could you confirm if fixed?
I will await the build and test it right away! I will also use the new issue template if anything else comes up.
Can confirm that after closing, no massive stack traces are sent to the console. Seems to have done the job!
[16:43:30 INFO]: [spark] [Viewer - rYl0ZGsZmuTaldO] Client connected: clientId=74f3-9a7f, keyhash=11d709, desc=Chrome on Windows
[16:46:20 INFO]: [spark] [Viewer - rYl0ZGsZmuTaldO] No clients have pinged for 30s, closing socket