Closed
Description
Hey there!
I'm working on an android/ios app game working with this library and a node.js backend also working with socket.io. On the ios app, everything works well, but my analytics tool shows me that in android there are a lot of users facing a fatal exception. Here it is:
Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.Object.toString()' on a null object reference
at io.socket.client.Socket.onevent(Unknown Source)
at io.socket.client.Socket.connect(Unknown Source)
at io.socket.client.Socket.open(Unknown Source)
at io.socket.client.Socket$2$2.call(Unknown Source)
at io.socket.emitter.Emitter.on(Unknown Source)
at io.socket.client.Manager.emitAll(Unknown Source)
at io.socket.client.Manager.reconnection(Unknown Source)
at io.socket.client.Manager$7.call(Unknown Source)
at io.socket.emitter.Emitter.on(Unknown Source)
at io.socket.parser.Parser$Decoder.add(Unknown Source)
at io.socket.client.Manager.emitAll(Unknown Source)
at io.socket.client.Manager.reconnection(Unknown Source)
at io.socket.client.Manager$2.call(Unknown Source)
at io.socket.emitter.Emitter.on(Unknown Source)
at io.socket.engineio.client.Socket.open(Unknown Source)
at io.socket.engineio.client.Socket.open(Unknown Source)
at io.socket.engineio.client.Socket$5.call(Unknown Source)
at io.socket.emitter.Emitter.on(Unknown Source)
at io.socket.engineio.client.Transport.onError(Unknown Source)
at io.socket.engineio.client.transports.Polling.pause(Unknown Source)
at io.socket.engineio.client.transports.Polling$2.call(Unknown Source)
at io.socket.engineio.parser.Parser.encodePacket(Unknown Source)
at io.socket.engineio.client.transports.Polling.pause(Unknown Source)
at io.socket.engineio.client.transports.Polling.pause(Unknown Source)
at io.socket.engineio.client.transports.PollingXHR$5$1.run(Unknown Source)
at io.socket.thread.EventThread$2.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:762)
I'm using version 1.7.4 on node.js backend, version 0.9.0 from this library. I tried many things getting rid of this exception, but nothing seems to work like using this library in a singleton or in a service.
Is there anyone facing this problem too?
If you need more code examples of the project or want to have a look on the app (it's in the stores), let me know.