trekcc-ops / gemp-stccg

2 stars 0 forks source link

Help > PC Errata tab throws a server-side Null Pointer Exception #38

Open andrewd18 opened 1 month ago

andrewd18 commented 1 month ago

Steps to Reproduce

  1. Uncomment the hall.comm.getErrata callback function inside GameHall.js.
  2. Log into GEMP.
  3. Select Help tab.
  4. Select PC Eratta tab.

Expected outcome

I'm not sure what the PC Eratta tab is supposed to do, but probably not throw a 500 server error. :stuck_out_tongue:

Actual outcome

The server logs throw this error:

00:44:13.177 [nioEventLoopGroup-3-12] ERROR com.gempukku.stccg.async.GempukkuHttpRequestHandler - Error response for /gemp-stccg-server/hall/errata/json
java.lang.NullPointerException: Cannot invoke "com.gempukku.stccg.cards.blueprints.CardBlueprint.getFullName()" because "blueprint" is null
    at com.gempukku.stccg.cards.CardBlueprintLibrary.getErrata(CardBlueprintLibrary.java:294) ~[web.jar:?]
    at com.gempukku.stccg.async.handler.HallRequestHandler.getErrataInfo(HallRequestHandler.java:352) ~[web.jar:?]
    at com.gempukku.stccg.async.handler.HallRequestHandler.handleRequest(HallRequestHandler.java:70) ~[web.jar:?]
    at com.gempukku.stccg.async.handler.RootUriRequestHandler.handleRequest(RootUriRequestHandler.java:71) ~[web.jar:?]
    at com.gempukku.stccg.async.GempukkuHttpRequestHandler.channelRead0(GempukkuHttpRequestHandler.java:80) ~[web.jar:?]
    at com.gempukku.stccg.async.GempukkuHttpRequestHandler.channelRead0(GempukkuHttpRequestHandler.java:34) ~[web.jar:?]
    at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:99) ~[web.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[web.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[web.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[web.jar:?]
    at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) ~[web.jar:?]
    at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) ~[web.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442) ~[web.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[web.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[web.jar:?]
    at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) ~[web.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[web.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[web.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[web.jar:?]
    at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:436) ~[web.jar:?]
    at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346) ~[web.jar:?]
    at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:318) ~[web.jar:?]
    at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:251) ~[web.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442) ~[web.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[web.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[web.jar:?]
    at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1357) ~[web.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440) ~[web.jar:?]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[web.jar:?]
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:868) ~[web.jar:?]
    at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166) ~[web.jar:?]
    at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788) ~[web.jar:?]
    at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724) ~[web.jar:?]
    at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650) ~[web.jar:?]
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562) ~[web.jar:?]
    at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[web.jar:?]
    at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[web.jar:?]
    at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[web.jar:?]
    at java.lang.Thread.run(Thread.java:1583) [?:?]
datanoh commented 1 month ago

"PC" in this context is the Players Council. This has to do with effectively rolling back changes the LotR Players Council has made to card definitions since Decipher ran things.

I didn't knowingly break this, but it was never a focus to keep it working. I'm not sure there's appetite in our game to toggle the errata off and on, and I wouldn't be surprised if we needed to implement a somewhat different system anyway.

andrewd18 commented 1 month ago

Oh, that makes sense. I can see a world where players want to play a "sealed as-written" tournament, or play with errata from a specific era like PAQ or DS9... but I also think that's a very long way off for us. :laughing:

Maybe as an MVP or low-effort target we could have tabs for 1E, 2E, and Tribbles that dynamically load their recent errata pages? :thinking:

datanoh commented 1 month ago

Agreed. Looking at the code base more, it does look like we're missing some pieces that kept the errata feature going. I'd recommend removing it along with the merchant.

eberlems commented 1 month ago

There is one folder on trekcc with a typo eratta, but it should be errata. Can that be corrected here?