pushy icon indicating copy to clipboard operation
pushy copied to clipboard

NPE in ApnsClientHandler.onStreamError

Open janzar opened this issue 6 years ago • 2 comments

Hi, have upgraded to pushy version 0.13.11 about a week ago. Seems that yesterday there were some problems with connections to Apple servers and lot of NPE in stacktraces:

java.lang.NullPointerException
	at com.eatthepath.pushy.apns.ApnsClientHandler.onStreamError(ApnsClientHandler.java:475)
	at io.netty.handler.codec.http2.Http2ConnectionHandler.onError(Http2ConnectionHandler.java:634)
	at io.netty.handler.codec.http2.DefaultHttp2ConnectionEncoder.writeHeaders0(DefaultHttp2ConnectionEncoder.java:270)
	at io.netty.handler.codec.http2.DefaultHttp2ConnectionEncoder.writeHeaders(DefaultHttp2ConnectionEncoder.java:167)
	at io.netty.handler.codec.http2.DecoratingHttp2FrameWriter.writeHeaders(DecoratingHttp2FrameWriter.java:53)
	at io.netty.handler.codec.http2.DecoratingHttp2FrameWriter.writeHeaders(DecoratingHttp2FrameWriter.java:53)
	at io.netty.handler.codec.http2.StreamBufferingEncoder.writeHeaders(StreamBufferingEncoder.java:153)
	at io.netty.handler.codec.http2.StreamBufferingEncoder.writeHeaders(StreamBufferingEncoder.java:141)
	at com.eatthepath.pushy.apns.ApnsClientHandler.writePushNotification(ApnsClientHandler.java:208)
	at com.eatthepath.pushy.apns.ApnsClientHandler.write(ApnsClientHandler.java:176)
	at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717)
	at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:764)
	at io.netty.channel.AbstractChannelHandlerContext$WriteTask.run(AbstractChannelHandlerContext.java:1104)
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.lang.Thread.run(Thread.java:745)

janzar avatar Apr 29 '20 07:04 janzar

Hm, seems that duplicate of #767 ?

janzar avatar Apr 29 '20 07:04 janzar

Hm, seems that duplicate of #767 ?

Yes, I think it is. I'll close this issue since we already have a fix merged. Thanks for the report!

jchambers avatar Apr 29 '20 11:04 jchambers