1

Surprised by Error 1 with SDK

Тема: Surprised by Error 1 with SDK

I have a problem working on a session with is constantly making request,
but once in a while there is a Error 1 and all the system comes down
until session get reset.

I have no idea why im getting Error 1 "Invalid session" , network looks good and no extra info is given

https://sdk.wialon.com/wiki/en/sidebar/ … ors/errors

Has someone got this error behavior before? How can i fix this?

So far im going to implement a recreate session on Error 1 but is a last resort,
also i dont want to loss data

PD: this error can happen at any time, 12-48 hrs okay and then error 1 and usually dies at night between 11pm-6am (GMT-7) some times there is a "hst-api.wialon.com/193.193.165.206:80 timed out" or "cant find host hst-api.wialon.com" then comes error 1

2

Surprised by Error 1 with SDK

Re: Surprised by Error 1 with SDK

Good day!

The session is valid during 5 minuets, if there is not any API request to server. To hold session you can execute periodically request avl_evts, for example every 2 sec.

If there is other problem please describe full requests which execute from your side.

Diana Cheley
Wialon Hosting Expert
Gurtam
3

Surprised by Error 1 with SDK

(25/03/2020 03:07:40 отредактировано ricardo.lgr)

Re: Surprised by Error 1 with SDK

Hi good day you too!

Actually i do something similar executing avl_evts periodically, not exactly every 2 seconds but everytime i get an answer.

For example:
      Every 2 seconds the code is trying to request avl_evts but will only fire it when the previous request has been finished
      Also timeout is set to 30 segs, if timeout is throw avl_evts would be requested again.

I guess session wont die with an inactivity issue this way, i had a session that was keep alive for 72hrs until Error 1 stop it


If there is anything i could say to help with this issue, ill try to answer as fast as i can. Thank you



PD: After setting up the session and data_flags, avl_evts is the only request i do

4

Surprised by Error 1 with SDK

Re: Surprised by Error 1 with SDK

Good day!
Such way is also possible, it does not need to keep session with avl_evts request, it can be other requests which sends to server, the main is time without requests  no more than 5 min.
Also when working with Wialon, your IP address should not be changed within a session. So maybe you get Error1 (invalid session) when IP has been changed or just Internet Connection has been closed or reconnected, so the previous session is not valid yet.  May be some other network issue.

Diana Cheley
Wialon Hosting Expert
Gurtam