For what reason might the camera return the error "Invalid session in request data!"?

Joined
Feb 24, 2022
Messages
3
Reaction score
0
Location
Ukraine
The problem is that the error occurs intermittently
I have a Dahua HDW2230TP-AS-0280B camera. I back up the video to my server every 10 minutes. The request looks like this:
PHP:
# step 1. curl request to create a task (id)
$task = reqCam("$urlcam/cgi-bin/mediaFileFind.cgi?action=factory.create");
$id = explode("=",trim($task))[1]; / trim ID
# Step 2. set $start and $end to search for the video
reqCam("$urlcam/cgi-bin/mediaFileFind.cgi?action=findFile&object=$id&condition.Channel=1&condition.StartTime=$start&condition.EndTime=$end&condition.Types[0]=dav");
# step 3. displaying the video list
$listvideo = reqCam("$urlcam/cgi-bin/mediaFileFind.cgi?action=findNextFile&object=$id&count=100");
And this code can show about 10 (sometimes more) errors of this kind for 100 iterations:
JSON:
{"error":{"code":287637505, "message": "Invalid session in request data!"}, "result":false}
the error occurs in the second step, when I set the search parameters. There is no pattern that I can detect.

How can I fight it?
 
Top