NullPointerException (AsyncSocketServlet:54 < ...)

Joysticka year ago

Does anyone know what could cause a /api/socket - NullPointerException (AsyncSocketServlet:54 < ...) error?
I use Teltonika devices and get the error quite frequently but cannot really see any issues when looking at devices in the web app.

Anton Tananaeva year ago

I think the error indicates that you don't have a session.

Joysticka year ago

Thanks Anton, do you know what might be causing it?
It seems to appear in the log file every minute.

Anton Tananaeva year ago

It means someone left web app and it keeps trying to reconnect every minute.

mbodea2007a year ago

Hi, I'm seeing this too:

 WARN: /api/socket - Cannot invoke "java.lang.Long.longValue()" because the return value of "javax.servlet.http.HttpSession.getAttribute(String)" is null - NullPointerException (AsyncSocketServlet:54 < ...)

Is there a fix?
Thx.

Anton Tananaeva year ago

Why do you need to fix it?

mbodea2007a year ago

i'ts just a warning indeed, should we leave it as it is ?
with lots of mobile app users, wouldn't this fill the log?
Thx

Anton Tananaeva year ago

It shouldn't happen more than once per session, so shouldn't be a problem.