Mictrack MT710 (Tlt2h protocol) WiFi NullPointerException

ADABmana year ago

Traccar version 5.9
First device ever tested Mictrack MT710 was not working with Traccar, log file filled with NullPointerException errors. After troubleshooting I disabled AGPS and LBS on the device. Once it had GPS fix it reported just fine. This also happens with MT700 devices.

Turning AGPS and LBS back on the log file shows this:

2023-11-14 17:58:32  INFO: [Ta8f50bf9] connected
2023-11-14 17:58:32  INFO: [Ta8f50bf9: tlt2h < 154.43.164.62] 23383632323535303631383235383936234d54373130233030303023544f57454423310d0a2333392324574946492c3031353235392e30302c412c2d34372c3734383343324442433042302c2d34382c3736383343324142433042302c2d34382c3736383343323942433042302c2d34382c3736383343324342433042302c2d34382c3736383343324242433042302c3135313132332a37340d0a23230d0a
2023-11-14 17:58:32 DEBUG: Event received
2023-11-14 17:58:32 DEBUG: Event decoded 1
2023-11-14 17:58:32  INFO: [Ta8f50bf9] error - 
java.lang.NullPointerException
        at org.traccar.handler.FilterHandler.filterFuture(FilterHandler.java:132)
        at org.traccar.handler.FilterHandler.filter(FilterHandler.java:215)
        at org.traccar.handler.FilterHandler.channelRead(FilterHandler.java:283)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
        at org.traccar.handler.RemoteAddressHandler.channelRead(RemoteAddressHandler.java:53)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
        at org.traccar.BaseDataHandler.channelRead(BaseDataHandler.java:29)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
        at org.traccar.BaseDataHandler.channelRead(BaseDataHandler.java:29)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
        at org.traccar.handler.TimeHandler.channelRead(TimeHandler.java:71)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
        at org.traccar.ExtendedObjectDecoder.channelRead(ExtendedObjectDecoder.java:86)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
        at org.traccar.WrapperContext.fireChannelRead(WrapperContext.java:102)
        at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
        at org.traccar.WrapperInboundHandler.channelRead(WrapperInboundHandler.java:57)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
        at org.traccar.WrapperContext.fireChannelRead(WrapperContext.java:102)
        at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346)
        at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:318)
        at org.traccar.WrapperInboundHandler.channelRead(WrapperInboundHandler.java:57)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
        at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:93)
        at org.traccar.handler.StandardLoggingHandler.channelRead(StandardLoggingHandler.java:44)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
        at org.traccar.handler.NetworkMessageHandler.channelRead(NetworkMessageHandler.java:37)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
        at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
        at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
        at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)
        at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788)
        at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724)
        at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650)
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.base/java.lang.Thread.run(Thread.java:829)

2023-11-14 17:58:32  INFO: [Ta8f50bf9] disconnected

Looking at Github issue tracker, there has been a few NullPointerException issues with Tlt2h. Is this another one, or am I missing something?

Anton Tananaeva year ago
ADABmana year ago

Issue solved thanks.

ADABmana year ago

There is some other noise in the log file still even though it seems Geolocation is working for WiFi data.

2023-11-16 22:56:50  INFO: [Tc83283b6: tlt2h < 154.43.164.62] 23383632323535303631383235383936234d54373130233030303023544f57454423310d0a2334312324574946492c3036353634382e30302c412c2d33372c3736383343324342433042302c2d33372c3736383343324242433042302c2d33372c3736383343323942433042302c2d33372c3734383343324442433042302c2d33372c3736383343324142433042302c3137313132332a37320d0a23230d0a
2023-11-16 22:56:50  WARN: Geolocation network error - HTTP 404 Not Found - NotFoundException (...)
2023-11-16 22:56:50  INFO: [Tc83283b6] id: 862255061825896, time: 2023-11-14 17:48:22, lat: 49.xxxxx, lon: -120.xxxxx, course: 105.7

I am using Google:

<entry key='geolocation.enable'>true</entry>
<entry key='geolocation.type'>google</entry>
<entry key='geolocation.key'>xxxx</entry>

Ful stack trace:

2023-11-16 23:04:21  INFO: [Tc8647658] connected
2023-11-16 23:04:21  INFO: [Tc8647658: tlt2h < 154.43.164.62] 23383632323535303631383235383936234d5437313023303030302346554c4c23310d0a2334312324574946492c3037303431322e30302c412c2d33362c3736383343324142433042302c2d33362c3736383343324342433042302c2d33372c3736383343324242433042302c2d33372c3736383343323942433042302c2d33372c3734383343324442433042302c3137313132332a37420d0a23230d0a
2023-11-16 23:04:21  WARN: Geolocation network error - 
jakarta.ws.rs.client.ResponseProcessingException: jakarta.ws.rs.NotFoundException: HTTP 404 Not Found
    at org.glassfish.jersey.client.JerseyInvocation.convertToException(JerseyInvocation.java:971)
    at org.glassfish.jersey.client.JerseyInvocation.access$700(JerseyInvocation.java:82)
    at org.glassfish.jersey.client.JerseyInvocation$1.completed(JerseyInvocation.java:863)
    at org.glassfish.jersey.client.ClientRuntime.processResponse(ClientRuntime.java:232)
    at org.glassfish.jersey.client.ClientRuntime.access$200(ClientRuntime.java:62)
    at org.glassfish.jersey.client.ClientRuntime$2.lambda$response$0(ClientRuntime.java:176)
    at org.glassfish.jersey.internal.Errors$1.call(Errors.java:248)
    at org.glassfish.jersey.internal.Errors$1.call(Errors.java:244)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:292)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:274)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:244)
    at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:288)
    at org.glassfish.jersey.client.ClientRuntime$2.response(ClientRuntime.java:176)
    at org.glassfish.jersey.client.internal.HttpUrlConnector.apply(HttpUrlConnector.java:283)
    at org.glassfish.jersey.client.ClientRuntime.lambda$createRunnableForAsyncProcessing$6(ClientRuntime.java:185)
    at org.glassfish.jersey.internal.Errors$1.call(Errors.java:248)
    at org.glassfish.jersey.internal.Errors$1.call(Errors.java:244)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:292)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:274)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:244)
    at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:288)
    at org.glassfish.jersey.client.ClientRuntime.lambda$createRunnableForAsyncProcessing$7(ClientRuntime.java:159)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: jakarta.ws.rs.NotFoundException: HTTP 404 Not Found
    at org.glassfish.jersey.client.JerseyInvocation.convertToException(JerseyInvocation.java:948)
    ... 26 more

2023-11-16 23:04:21  INFO: [Tc8647658] id: 862255061825896, time: 2023-11-14 17:48:22, lat: 49.xxxxx, lon: -120.xxxxx, course: 105.7
Anton Tananaeva year ago

That's an error coming from your geolocation provider.

ADABmana year ago

The fix did work for the MT710 device with WiFi data, but the MT700 device still has an issue with WiFi data:

2023-11-21 23:04:57  INFO: [T88a7db7b] connected
2023-11-21 23:04:57  INFO: [T88a7db7b: tlt2h < 154.43.164.63] 23383632323535303631393833313636234d543730304e57233030303023544f57454423310d0a233435303224574946492c3035313535302e30302c412c2d35302c3736383343324342433042302c2d35312c3736383343323942433042302c2d35312c3736383343324242433042302c2d35312c3734383343324442433042302c2d35312c3736383343324142433042302c3232313132332a37380d0a23230d0a
2023-11-21 23:04:57  INFO: [T88a7db7b] error - 
java.lang.NullPointerException
    at org.traccar.protocol.Tlt2hProtocolDecoder.decode(Tlt2hProtocolDecoder.java:213)
    at org.traccar.ExtendedObjectDecoder.channelRead(ExtendedObjectDecoder.java:75)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
    at org.traccar.WrapperContext.fireChannelRead(WrapperContext.java:102)
    at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
    at org.traccar.WrapperInboundHandler.channelRead(WrapperInboundHandler.java:57)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
    at org.traccar.WrapperContext.fireChannelRead(WrapperContext.java:102)
    at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346)
    at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:318)
    at org.traccar.WrapperInboundHandler.channelRead(WrapperInboundHandler.java:57)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
    at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:93)
    at org.traccar.handler.StandardLoggingHandler.channelRead(StandardLoggingHandler.java:44)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
    at org.traccar.handler.NetworkMessageHandler.channelRead(NetworkMessageHandler.java:37)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
    at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
    at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)
    at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650)
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)
    at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
    at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
    at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
    at java.base/java.lang.Thread.run(Thread.java:829)

2023-11-21 23:04:57  INFO: [T88a7db7b] disconnected

For reference: https://www.mictrack.com/downloads/protocols/Mictrack_Communication_Protocol_For_MT700_V1.0.pdf

Anton Tananaeva year ago
ADABmana year ago

Confirmed fixed, thanks again.