Skip to content
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

Intermittent NullPointerException during upgrade for polling to websocket #34

Closed
cbdwan opened this issue May 6, 2021 · 2 comments
Closed

Comments

@cbdwan
Copy link

cbdwan commented May 6, 2021

Occasionally getting this NPE during the upgrade from polling to websockt, it looks like it happens if the upgrade is happening just after a poll request has been done and before the next one comes in to set the mPollRequest.

Dont have a reproducible testcase for this.

This with version 1.3.5.

java.lang.NullPointerException: null
at io.socket.engineio.server.transport.Polling.send(Polling.java:82) ~[engine.io-server-1.3.5.jar:?]
at io.socket.engineio.server.EngineIoSocket.lambda$upgrade$4(EngineIoSocket.java:174) ~[engine.io-server-1.3.5.jar:?]
at io.socket.emitter.Emitter.emit(Emitter.java:117) ~[engine.io-client-1.0.0.jar:?]
at io.socket.engineio.server.Transport.onPacket(Transport.java:87) ~[engine.io-server-1.3.5.jar:?]
at io.socket.engineio.server.Transport.onData(Transport.java:96) ~[engine.io-server-1.3.5.jar:?]
at io.socket.engineio.server.transport.WebSocket.lambda$new$0(WebSocket.java:25) ~[engine.io-server-1.3.5.jar:?]
at io.socket.emitter.Emitter.emit(Emitter.java:117) ~[engine.io-client-1.0.0.jar:?]
at com.bcdfx.web.ws.EngineIoEndpoint$1.onMessage(EngineIoEndpoint.java:67) ~[classes/:4.8.0]
at com.bcdfx.web.ws.EngineIoEndpoint$1.onMessage(EngineIoEndpoint.java:63) ~[classes/:4.8.0]
at org.apache.tomcat.websocket.WsFrameBase.sendMessageText(WsFrameBase.java:394) [tomcat-websocket.jar:8.5.49]
at org.apache.tomcat.websocket.server.WsFrameServer.sendMessageText(WsFrameServer.java:119) [tomcat-websocket.jar:8.5.49]
at org.apache.tomcat.websocket.WsFrameBase.processDataText(WsFrameBase.java:495) [tomcat-websocket.jar:8.5.49]
at org.apache.tomcat.websocket.WsFrameBase.processData(WsFrameBase.java:294) [tomcat-websocket.jar:8.5.49]
at org.apache.tomcat.websocket.WsFrameBase.processInputBuffer(WsFrameBase.java:133) [tomcat-websocket.jar:8.5.49]
at org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:82) [tomcat-websocket.jar:8.5.49]
at org.apache.tomcat.websocket.server.WsFrameServer.doOnDataAvailable(WsFrameServer.java:171) [tomcat-websocket.jar:8.5.49]
at org.apache.tomcat.websocket.server.WsFrameServer.notifyDataAvailable(WsFrameServer.java:151) [tomcat-websocket.jar:8.5.49]
at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:148) [tomcat-websocket.jar:8.5.49]
at org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:54) [tomcat-coyote.jar:8.5.49]
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:59) [tomcat-coyote.jar:8.5.49]
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:810) [tomcat-coyote.jar:8.5.49]
at org.apache.tomcat.util.net.Nio2Endpoint$SocketProcessor.doRun(Nio2Endpoint.java:1783) [tomcat-coyote.jar:8.5.49]
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-coyote.jar:8.5.49]
at org.apache.tomcat.util.net.AbstractEndpoint.processSocket(AbstractEndpoint.java:1082) [tomcat-coyote.jar:8.5.49]
at org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper$2.completed(Nio2Endpoint.java:569) [tomcat-coyote.jar:8.5.49]
at org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper$2.completed(Nio2Endpoint.java:547) [tomcat-coyote.jar:8.5.49]
at org.apache.tomcat.util.net.SecureNio2Channel$1.completed(SecureNio2Channel.java:969) [tomcat-coyote.jar:8.5.49]
at org.apache.tomcat.util.net.SecureNio2Channel$1.completed(SecureNio2Channel.java:898) [tomcat-coyote.jar:8.5.49]
at sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:127) [?:?]
at sun.nio.ch.Invoker$2.run(Invoker.java:219) [?:?]
at sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:112) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) [?:?]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:8.5.49]
at java.lang.Thread.run(Thread.java:832) [?:?]

@trinopoty
Copy link
Collaborator

I've noticed this as well. A fix is on the way.

@trinopoty
Copy link
Collaborator

Can you update to v5.0.0 of the library and check if this issue is still there. v5 is fully backwards compatible with v1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants