This morning, today's new video stream was up and running, but it had not been added to the CrowCam Archives playlist. Also, the video's categoryId and thumbnail had not been set. The Synology system log had these entries in it:
Info 2024-03-26 06:50:21 CrowCam Controller - New video is live. Video ID: S3-gbu35KFA Status: active Key: xxxx-xxxx-xxxx-xxxx.
Error 2024-03-26 06:50:21 CrowCam Controller - Error setting categoryId to 15. Output was {
Clearly the code where it sets the thumbnail, categoryId and adds it to the playlist has failed somehow. I looked at the video, and indeed, the thumbnail, categoryId and the playlist were not yet set on this video. Those are the last two things that the CreateNewStream function does, and so it created the video but then failed those last few steps.
Unfortunately, a bug in the log message has prevented me from seeing the details of the error that caused this issue. Still, there's stuff we can do.
To do:
There is a copy/paste bug in the message that says "Error setting categoryId to..." - The place where it adds to the playlist simply repeats the categoryId error message. It should be a unique message.
The output error from the JSON has linefeeds in it, but the Synology log stops at the first linefeed. The error message should wrap up the JSON so that it's readable in the Synology log.
The code in CrowCam.sh where it tries to fix the secret name/key should also be fixing up the thumbnail, the categoryId and the playlist, every time. That way, if this failure occurs during CreateNewStream (which only happens once) then it will have a chance to fix the problem every five minutes, each time CrowCam.sh runs.
This morning, today's new video stream was up and running, but it had not been added to the CrowCam Archives playlist. Also, the video's categoryId and thumbnail had not been set. The Synology system log had these entries in it:
Clearly the code where it sets the thumbnail, categoryId and adds it to the playlist has failed somehow. I looked at the video, and indeed, the thumbnail, categoryId and the playlist were not yet set on this video. Those are the last two things that the CreateNewStream function does, and so it created the video but then failed those last few steps.
Unfortunately, a bug in the log message has prevented me from seeing the details of the error that caused this issue. Still, there's stuff we can do.
To do: