Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event failed download after update to Protect v5.0.34 #168

Open
wssweb opened this issue Sep 30, 2024 · 13 comments
Open

Event failed download after update to Protect v5.0.34 #168

wssweb opened this issue Sep 30, 2024 · 13 comments

Comments

@wssweb
Copy link

wssweb commented Sep 30, 2024

  • Unifi Protect Backup version: 0.11.0
  • Unifi Protect version: 5.0.34 (using experimental downloader)
  • Python version: 3.12
  • Operating System: Debian
  • Are you using a docker container or native?: docker

Description

Videos are failing to download again after updating the Protect app to v5. Fails with 500, no reason given.

What I Did

2024-09-30 16:14:42 [   DEBUG   ] unifi_protect_backup.event_listener        :  Adding event 66face63032fff03e4000447 to queue (Current download queue=1)                          
2024-09-30 16:14:42 [   INFO    ] unifi_protect_backup.downloader_experimental : [66face63032fff03e4000447]  Downloading event: 66face63032fff03e4000447                           
2024-09-30 16:14:42 [   DEBUG   ] unifi_protect_backup.downloader_experimental : [66face63032fff03e4000447]  Remaining Download Queue: 0                                           
2024-09-30 16:14:42 [   DEBUG   ] unifi_protect_backup.downloader_experimental : [66face63032fff03e4000447]  Video Download Buffer: 0.0B/512.0MiB                                  
2024-09-30 16:14:42 [   DEBUG   ] unifi_protect_backup.downloader_experimental : [66face63032fff03e4000447]    Camera: Showroom                                                    
2024-09-30 16:14:42 [   DEBUG   ] unifi_protect_backup.downloader_experimental : [66face63032fff03e4000447]    Type: motion                                                        
2024-09-30 16:14:42 [   DEBUG   ] unifi_protect_backup.downloader_experimental : [66face63032fff03e4000447]    Start: 2024-09-30T10-14-21 (1727712861.494)                         
2024-09-30 16:14:42 [   DEBUG   ] unifi_protect_backup.downloader_experimental : [66face63032fff03e4000447]    End: 2024-09-30T10-14-43 (1727712883.629)                           
2024-09-30 16:14:42 [   DEBUG   ] unifi_protect_backup.downloader_experimental : [66face63032fff03e4000447]    Duration: 22.135s                                                   
2024-09-30 16:14:42 [   DEBUG   ] unifi_protect_backup.downloader_experimental : [66face63032fff03e4000447]    Sleeping (8.331082s) to ensure clip is ready to download...         
2024-09-30 16:14:51 [   DEBUG   ] unifi_protect_backup.downloader_experimental : [66face63032fff03e4000447]    Downloading video...                                                
2024-09-30 16:14:51 [  WARNING  ] unifi_protect_backup.downloader_experimental : [66face63032fff03e4000447]  Event failed download attempt 1                                       
Traceback (most recent call last):                                                                                                                                                 
  File "/usr/lib/python3.12/site-packages/unifi_protect_backup/downloader_experimental.py", line 144, in start                                                                     
    video = await self._download(event)                                                                                                                                            
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                            
  File "/usr/lib/python3.12/site-packages/unifi_protect_backup/downloader_experimental.py", line 184, in _download                                                                 
    prepared_video_file = await self._protect.prepare_camera_video(event.camera_id, event.start, event.end)                                                                        
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                        
  File "/usr/lib/python3.12/site-packages/pyunifiprotect/api.py", line 1273, in prepare_camera_video                                                                               
    return await self.api_request(                                                                                                                                                 
           ^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                 
  File "/usr/lib/python3.12/site-packages/pyunifiprotect/api.py", line 274, in api_request                                                                                         
    data = await self.api_request_raw(                                                                                                                                             
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                             
  File "/usr/lib/python3.12/site-packages/pyunifiprotect/api.py", line 249, in api_request_raw                                                                                     
    await self._os.verify_response(url, response)                                                                                                                                  
  File "/usr/lib/python3.12/site-packages/pyunifiprotect/session.py", line 348, in verify_response                                                                                 
    raise NvrError(msg % (url, response.status, reason))                                                                                                                           
pyunifiprotect.exceptions.NvrError: Request failed: /proxy/protect/api/video/prepare - Status: 500 - Reason:  
2024-09-30 16:15:34 [   DEBUG   ] unifi_protect_backup.event_listener        :  Adding event 66face9d0101ff03e400044d to queue (Current download queue=1)                          
2024-09-30 16:15:34 [   INFO    ] unifi_protect_backup.downloader_experimental : [66face9d0101ff03e400044d]  Downloading event: 66face9d0101ff03e400044d                           
2024-09-30 16:15:34 [   DEBUG   ] unifi_protect_backup.downloader_experimental : [66face9d0101ff03e400044d]  Remaining Download Queue: 0                                           
2024-09-30 16:15:34 [   DEBUG   ] unifi_protect_backup.downloader_experimental : [66face9d0101ff03e400044d]  Video Download Buffer: 0.0B/512.0MiB                                  
2024-09-30 16:15:34 [   DEBUG   ] unifi_protect_backup.downloader_experimental : [66face9d0101ff03e400044d]    Camera: Showroom                                                    
2024-09-30 16:15:34 [   DEBUG   ] unifi_protect_backup.downloader_experimental : [66face9d0101ff03e400044d]    Type: motion                                                        
2024-09-30 16:15:34 [   DEBUG   ] unifi_protect_backup.downloader_experimental : [66face9d0101ff03e400044d]    Start: 2024-09-30T10-15-18 (1727712918.958)                         
2024-09-30 16:15:34 [   DEBUG   ] unifi_protect_backup.downloader_experimental : [66face9d0101ff03e400044d]    End: 2024-09-30T10-15-34 (1727712934.962)                           
2024-09-30 16:15:34 [   DEBUG   ] unifi_protect_backup.downloader_experimental : [66face9d0101ff03e400044d]    Duration: 16.004s                                                   
2024-09-30 16:15:34 [   DEBUG   ] unifi_protect_backup.downloader_experimental : [66face9d0101ff03e400044d]    Sleeping (8.45747s) to ensure clip is ready to download...          
2024-09-30 16:15:41 [   DEBUG   ] unifi_protect_backup.event_listener        :  Adding event 66facea7024bff03e4000452 to queue (Current download queue=1)                          
2024-09-30 16:15:42 [   DEBUG   ] unifi_protect_backup.downloader_experimental : [66face9d0101ff03e400044d]    Downloading video...                                                
2024-09-30 16:15:42 [  WARNING  ] unifi_protect_backup.downloader_experimental : [66face9d0101ff03e400044d]  Event failed download attempt 1                                       
Traceback (most recent call last):                                                                                                                                                 
  File "/usr/lib/python3.12/site-packages/unifi_protect_backup/downloader_experimental.py", line 144, in start                                                                     
    video = await self._download(event)                                                                                                                                            
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                            
  File "/usr/lib/python3.12/site-packages/unifi_protect_backup/downloader_experimental.py", line 184, in _download                                                                 
    prepared_video_file = await self._protect.prepare_camera_video(event.camera_id, event.start, event.end)                                                                        
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                        
  File "/usr/lib/python3.12/site-packages/pyunifiprotect/api.py", line 1273, in prepare_camera_video                                                                               
    return await self.api_request(                                                                                                                                                 
           ^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                 
  File "/usr/lib/python3.12/site-packages/pyunifiprotect/api.py", line 274, in api_request                                                                                         
    data = await self.api_request_raw(                                                                                                                                             
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                             
  File "/usr/lib/python3.12/site-packages/pyunifiprotect/api.py", line 249, in api_request_raw                                                                                     
    await self._os.verify_response(url, response)                                                                                                                                  
  File "/usr/lib/python3.12/site-packages/pyunifiprotect/session.py", line 348, in verify_response                                                                                 
    raise NvrError(msg % (url, response.status, reason))                                                                                                                           
pyunifiprotect.exceptions.NvrError: Request failed: /proxy/protect/api/video/prepare - Status: 500 - Reason:  
2024-09-30 16:15:42 [   INFO    ] unifi_protect_backup.downloader_experimental : [66facea7024bff03e4000452]  Downloading event: 66facea7024bff03e4000452                           
2024-09-30 16:15:42 [   DEBUG   ] unifi_protect_backup.downloader_experimental : [66facea7024bff03e4000452]  Remaining Download Queue: 0                                           
2024-09-30 16:15:42 [   DEBUG   ] unifi_protect_backup.downloader_experimental : [66facea7024bff03e4000452]  Video Download Buffer: 0.0B/512.0MiB                                  
2024-09-30 16:15:42 [   DEBUG   ] unifi_protect_backup.downloader_experimental : [66facea7024bff03e4000452]    Camera: Showroom                                                    
2024-09-30 16:15:42 [   DEBUG   ] unifi_protect_backup.downloader_experimental : [66facea7024bff03e4000452]    Type: motion                                                        
2024-09-30 16:15:42 [   DEBUG   ] unifi_protect_backup.downloader_experimental : [66facea7024bff03e4000452]    Start: 2024-09-30T10-15-29 (1727712929.318)                         
2024-09-30 16:15:42 [   DEBUG   ] unifi_protect_backup.downloader_experimental : [66facea7024bff03e4000452]    End: 2024-09-30T10-15-42 (1727712942.586)                           
2024-09-30 16:15:42 [   DEBUG   ] unifi_protect_backup.downloader_experimental : [66facea7024bff03e4000452]    Duration: 13.268s                                                   
2024-09-30 16:15:42 [   DEBUG   ] unifi_protect_backup.downloader_experimental : [66facea7024bff03e4000452]    Sleeping (7.569812s) to ensure clip is ready to download...         
2024-09-30 16:15:50 [   DEBUG   ] unifi_protect_backup.downloader_experimental : [66facea7024bff03e4000452]    Downloading video...                                                
2024-09-30 16:15:50 [  WARNING  ] unifi_protect_backup.downloader_experimental : [66facea7024bff03e4000452]  Event failed download attempt 1                                       
Traceback (most recent call last):                                                                                                                                                 
  File "/usr/lib/python3.12/site-packages/unifi_protect_backup/downloader_experimental.py", line 144, in start                                                                     
    video = await self._download(event)                                                                                                                                            
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                            
  File "/usr/lib/python3.12/site-packages/unifi_protect_backup/downloader_experimental.py", line 184, in _download                                                                 
    prepared_video_file = await self._protect.prepare_camera_video(event.camera_id, event.start, event.end)                                                                        
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                        
  File "/usr/lib/python3.12/site-packages/pyunifiprotect/api.py", line 1273, in prepare_camera_video                                                                               
    return await self.api_request(                                                                                                                                                 
           ^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                 
  File "/usr/lib/python3.12/site-packages/pyunifiprotect/api.py", line 274, in api_request                                                                                         
    data = await self.api_request_raw(                                                                                                                                             
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                             
  File "/usr/lib/python3.12/site-packages/pyunifiprotect/api.py", line 249, in api_request_raw                                                                                     
    await self._os.verify_response(url, response)                                                                                                                                  
  File "/usr/lib/python3.12/site-packages/pyunifiprotect/session.py", line 348, in verify_response                                                                                 
    raise NvrError(msg % (url, response.status, reason))                                                                                                                           
pyunifiprotect.exceptions.NvrError: Request failed: /proxy/protect/api/video/prepare - Status: 500 - Reason: 
@wssweb
Copy link
Author

wssweb commented Sep 30, 2024

I noticed I stated getting login errors as well so I rebooted the NVR. Once it came back and up and I restarted the container, I started getting a few successful uploads (still get the errors above however).

2024-09-30 17:01:22 [   DEBUG   ] unifi_protect_backup.uploader              : [66fad6be02715403e4000416]  Uploaded                                                                
2024-09-30 17:01:22 [   INFO    ] unifi_protect_backup.uploader              : [66fad7fd02f35403e4000421]  Uploading event: 66fad7fd02f35403e4000421                               
2024-09-30 17:01:22 [   DEBUG   ] unifi_protect_backup.uploader              : [66fad7fd02f35403e4000421]   Remaining Upload Queue: 2 (74.7MiB)                                    
2024-09-30 17:01:22 [   DEBUG   ] unifi_protect_backup.uploader              : [66fad7fd02f35403e4000421]   Destination: unifi:wss-unifi/unifi_protect_backup/North Parking Lot/202
4-09-30/2024-09-30T10-56-31 motion.mp4                                                                         

I am going to let it run and see if its just a handful of videos it is having a problem with and let them time out to see if the issue persists.

@wssweb
Copy link
Author

wssweb commented Sep 30, 2024

After stopping the container, rebooting the NVR, logging into the web console using the local admin account (as suggested in: issue #161 ) I was able to start the docker container back up and let it run for a while.

It cleared a bunch of the events out after 10 fails. However it is now hitting a lot of new videos and failing on the first try. Only to pick them back up later in a missing event check where it will successfully upload them.

2024-09-30 17:52:19 [   DEBUG   ] unifi_protect_backup.event_listener        :  Adding event 66fae54602fb5403e400049a to queue (Current download queue=1)                          
2024-09-30 17:52:19 [   INFO    ] unifi_protect_backup.downloader_experimental : [66fae54602fb5403e400049a]  Downloading event: 66fae54602fb5403e400049a                           
2024-09-30 17:52:19 [   DEBUG   ] unifi_protect_backup.downloader_experimental : [66fae54602fb5403e400049a]  Remaining Download Queue: 0                                           
2024-09-30 17:52:19 [   DEBUG   ] unifi_protect_backup.downloader_experimental : [66fae54602fb5403e400049a]  Video Download Buffer: 0.0B/512.0MiB                                  
2024-09-30 17:52:19 [   DEBUG   ] unifi_protect_backup.downloader_experimental : [66fae54602fb5403e400049a]    Camera: North Parking Lot                                           
2024-09-30 17:52:19 [   DEBUG   ] unifi_protect_backup.downloader_experimental : [66fae54602fb5403e400049a]    Type: motion                                                        
2024-09-30 17:52:19 [   DEBUG   ] unifi_protect_backup.downloader_experimental : [66fae54602fb5403e400049a]    Start: 2024-09-30T11-52-00 (1727718720.643)                         
2024-09-30 17:52:19 [   DEBUG   ] unifi_protect_backup.downloader_experimental : [66fae54602fb5403e400049a]    End: 2024-09-30T11-52-20 (1727718740.978)                           
2024-09-30 17:52:19 [   DEBUG   ] unifi_protect_backup.downloader_experimental : [66fae54602fb5403e400049a]    Duration: 20.335s                                                   
2024-09-30 17:52:19 [   DEBUG   ] unifi_protect_backup.downloader_experimental : [66fae54602fb5403e400049a]    Sleeping (9.001853s) to ensure clip is ready to download...         
2024-09-30 17:52:28 [   DEBUG   ] unifi_protect_backup.downloader_experimental : [66fae54602fb5403e400049a]    Downloading video...                                                
2024-09-30 17:52:28 [  WARNING  ] unifi_protect_backup.downloader_experimental : [66fae54602fb5403e400049a]  Event failed download attempt 1                                       
Traceback (most recent call last):                                                                                                                                                 
  File "/usr/lib/python3.12/site-packages/unifi_protect_backup/downloader_experimental.py", line 144, in start                                                                     
    video = await self._download(event)                                                                                                                                            
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                            
  File "/usr/lib/python3.12/site-packages/unifi_protect_backup/downloader_experimental.py", line 184, in _download                                                                 
    prepared_video_file = await self._protect.prepare_camera_video(event.camera_id, event.start, event.end)                                                                        
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                        
  File "/usr/lib/python3.12/site-packages/pyunifiprotect/api.py", line 1273, in prepare_camera_video                                                                               
    return await self.api_request(                                                                                                                                                 
           ^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                 
  File "/usr/lib/python3.12/site-packages/pyunifiprotect/api.py", line 274, in api_request                                                                                         
    data = await self.api_request_raw(                                                                                                                                             
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                             
  File "/usr/lib/python3.12/site-packages/pyunifiprotect/api.py", line 249, in api_request_raw                                                                                     
    await self._os.verify_response(url, response)                                                                                                                                  
  File "/usr/lib/python3.12/site-packages/pyunifiprotect/session.py", line 348, in verify_response                                                                                 
    raise NvrError(msg % (url, response.status, reason))                                                                                                                           
pyunifiprotect.exceptions.NvrError: Request failed: /proxy/protect/api/video/prepare - Status: 500 - Reason: 

Then a few minutes later:

2024-09-30 17:55:52 [   DEBUG   ] unifi_protect_backup.missing_event_checker :  Running check for missing events...                                                                
2024-09-30 17:55:54 [  WARNING  ] unifi_protect_backup.missing_event_checker :   Found missing events, adding to backup queue                                                      
2024-09-30 17:55:54 [   INFO    ] unifi_protect_backup.downloader_experimental : [66fae54602fb5403e400049a]  Downloading event: 66fae54602fb5403e400049a                           
2024-09-30 17:55:54 [   DEBUG   ] unifi_protect_backup.downloader_experimental : [66fae54602fb5403e400049a]  Remaining Download Queue: 0                                           
2024-09-30 17:55:54 [   DEBUG   ] unifi_protect_backup.downloader_experimental : [66fae54602fb5403e400049a]  Video Download Buffer: 0.0B/512.0MiB                                  
2024-09-30 17:55:54 [   DEBUG   ] unifi_protect_backup.downloader_experimental : [66fae54602fb5403e400049a]    Camera: North Parking Lot                                           
2024-09-30 17:55:54 [   DEBUG   ] unifi_protect_backup.downloader_experimental : [66fae54602fb5403e400049a]    Type: motion                                                        
2024-09-30 17:55:54 [   DEBUG   ] unifi_protect_backup.downloader_experimental : [66fae54602fb5403e400049a]    Start: 2024-09-30T11-52-00 (1727718720.643)                         
2024-09-30 17:55:54 [   DEBUG   ] unifi_protect_backup.downloader_experimental : [66fae54602fb5403e400049a]    End: 2024-09-30T11-52-20 (1727718740.978)                           
2024-09-30 17:55:54 [   DEBUG   ] unifi_protect_backup.downloader_experimental : [66fae54602fb5403e400049a]    Duration: 20.335s                                                   
2024-09-30 17:55:54 [   DEBUG   ] unifi_protect_backup.downloader_experimental : [66fae54602fb5403e400049a]    Downloading video...                                                
2024-09-30 17:55:55 [   DEBUG   ] unifi_protect_backup.downloader_experimental : [66fae54602fb5403e400049a]    Downloaded video size: 21.4MiBs                                     
2024-09-30 17:55:55 [   DEBUG   ] unifi_protect_backup.downloader_experimental : [66fae54602fb5403e400049a]    Downloaded video length: 23.792s(+3.457s)                           
2024-09-30 17:55:55 [   DEBUG   ] unifi_protect_backup.downloader_experimental : [66fae54602fb5403e400049a]  Added to upload queue                                                 
2024-09-30 17:55:55 [   INFO    ] unifi_protect_backup.downloader_experimental : [66fae5db00eb0203e400056e]  Downloading event: 66fae5db00eb0203e400056e                           
2024-09-30 17:55:55 [   DEBUG   ] unifi_protect_backup.downloader_experimental : [66fae5db00eb0203e400056e]  Remaining Download Queue: 0                                           
2024-09-30 17:55:55 [   DEBUG   ] unifi_protect_backup.downloader_experimental : [66fae5db00eb0203e400056e]  Video Download Buffer: 21.4MiB/512.0MiB                               
2024-09-30 17:55:55 [   DEBUG   ] unifi_protect_backup.downloader_experimental : [66fae5db00eb0203e400056e]    Camera: Showroom                                                    
2024-09-30 17:55:55 [   DEBUG   ] unifi_protect_backup.downloader_experimental : [66fae5db00eb0203e400056e]    Type: motion                                                        
2024-09-30 17:55:55 [   DEBUG   ] unifi_protect_backup.downloader_experimental : [66fae5db00eb0203e400056e]    Start: 2024-09-30T11-54-28 (1727718868.975)                         
2024-09-30 17:55:55 [   DEBUG   ] unifi_protect_backup.downloader_experimental : [66fae5db00eb0203e400056e]    End: 2024-09-30T11-54-41 (1727718881.59)                            
2024-09-30 17:55:55 [   DEBUG   ] unifi_protect_backup.downloader_experimental : [66fae5db00eb0203e400056e]    Duration: 12.615s                                                   
2024-09-30 17:55:55 [   DEBUG   ] unifi_protect_backup.downloader_experimental : [66fae5db00eb0203e400056e]    Downloading video...                                                
2024-09-30 17:55:55 [   INFO    ] unifi_protect_backup.uploader              : [66fae54602fb5403e400049a]  Uploading event: 66fae54602fb5403e400049a                               
2024-09-30 17:55:55 [   DEBUG   ] unifi_protect_backup.uploader              : [66fae54602fb5403e400049a]   Remaining Upload Queue: 0 (0.0B)                                       
2024-09-30 17:55:55 [   DEBUG   ] unifi_protect_backup.uploader              : [66fae54602fb5403e400049a]   Destination: unifi:wss-unifi/unifi_protect_backup/North Parking Lot/202
4-09-30/2024-09-30T11-52-20 motion.mp4 

On the previous version of protect it had no problem getting the events on the first try. Which leads me to believe something got changed in either the new Protect version or the new OS version. At least it appears to be working still with the event check~

@wssweb
Copy link
Author

wssweb commented Oct 1, 2024

After letting it run over night it is now failing on a lot of downloads (1 in 10, if not more), and failing to re-acquire them on the event check so they never get uploaded. It seems to be any camera at random. I have checked these in the NVR and all appear to be good, none of them skip or otherwise do not play back.

@ep1cman
Copy link
Owner

ep1cman commented Oct 1, 2024

Thanks for reporting all of this. I don’t really know what’s going wrong but recent UniFi protect versions are getting increasingly unstable. Have you tried using the experimental downloader option?

@wssweb
Copy link
Author

wssweb commented Oct 1, 2024

This is running the experimental downloader (have been using it since you made it). That was basically required for the last major update they did.

@ep1cman
Copy link
Owner

ep1cman commented Oct 1, 2024

And without it I am assuming it is even worse?

@wssweb
Copy link
Author

wssweb commented Oct 1, 2024

I have not tried disabling it and using the stock version. I'll give that a test.

@wssweb
Copy link
Author

wssweb commented Oct 1, 2024

I am getting mixed results with the standard down loader. I stopped the docker container, flipped the flag for the experimental to false and started it back up. It did not go back and reacquire any of the previous known missing event. So far it is successfully uploading most of the videos on re-attempts after a failure... however it may degrade as time goes one like it did yesterday with the experimental.

The fail errors with the normal downloader are more varied however. Below are some examples I got out of the logs (this includes the successful re-attempts as well as some out right fails). I trimmed the full successful uploads from the log for brevity.

66fc1d3e028f5403e4000c38



2024-10-01 16:03:19 [   DEBUG   ] unifi_protect_backup.event_listener        :  Adding event 66fc1d3e028f5403e4000c38 to queue (Current download queue=1)
2024-10-01 16:03:22 [   INFO    ] unifi_protect_backup.downloader            : [66fc1d3e028f5403e4000c38]  Downloading event: 66fc1d3e028f5403e4000c38
2024-10-01 16:03:22 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc1d3e028f5403e4000c38]  Remaining Download Queue: 0
2024-10-01 16:03:22 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc1d3e028f5403e4000c38]  Video Download Buffer: 64.9MiB/512.0MiB
2024-10-01 16:03:22 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc1d3e028f5403e4000c38]    Camera: North Parking Lot
2024-10-01 16:03:22 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc1d3e028f5403e4000c38]    Type: motion
2024-10-01 16:03:22 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc1d3e028f5403e4000c38]    Start: 2024-10-01T10-03-04 (1727798584.562)
2024-10-01 16:03:22 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc1d3e028f5403e4000c38]    End: 2024-10-01T10-03-20 (1727798600.895)
2024-10-01 16:03:22 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc1d3e028f5403e4000c38]    Duration: 16.333s
2024-10-01 16:03:22 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc1d3e028f5403e4000c38]    Sleeping (6.306286s) to ensure clip is ready to download...
2024-10-01 16:03:28 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc1d3e028f5403e4000c38]    Downloading video...
2024-10-01 16:03:28 [  WARNING  ] unifi_protect_backup.downloader            : [66fc1d3e028f5403e4000c38]      Failed download attempt 1, retying in 1s
2024-10-01 16:03:29 [  WARNING  ] unifi_protect_backup.downloader            : [66fc1d3e028f5403e4000c38]      Failed download attempt 2, retying in 1s
2024-10-01 16:03:30 [  WARNING  ] unifi_protect_backup.downloader            : [66fc1d3e028f5403e4000c38]      Failed download attempt 3, retying in 1s
2024-10-01 16:03:31 [  WARNING  ] unifi_protect_backup.downloader            : [66fc1d3e028f5403e4000c38]      Failed download attempt 4, retying in 1s
2024-10-01 16:03:32 [  WARNING  ] unifi_protect_backup.downloader            : [66fc1d3e028f5403e4000c38]      Failed download attempt 5, retying in 1s
2024-10-01 16:03:33 [   ERROR   ] unifi_protect_backup.downloader            : [66fc1d3e028f5403e4000c38]  Download failed after 5 attempts, abandoning event 66fc1d3e028f5403e4000c38:
2024-10-01 16:03:33 [  WARNING  ] unifi_protect_backup.downloader            : [66fc1d3e028f5403e4000c38]  Event failed download attempt 1






66fc1df703030203e40018c5


2024-10-01 16:06:30 [   DEBUG   ] unifi_protect_backup.event_listener        :  Adding event 66fc1df703030203e40018c5 to queue (Current download queue=1)
2024-10-01 16:06:32 [   INFO    ] unifi_protect_backup.downloader            : [66fc1df703030203e40018c5]  Downloading event: 66fc1df703030203e40018c5
2024-10-01 16:06:32 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc1df703030203e40018c5]  Remaining Download Queue: 0
2024-10-01 16:06:32 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc1df703030203e40018c5]  Video Download Buffer: 15.3MiB/512.0MiB
2024-10-01 16:06:32 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc1df703030203e40018c5]    Camera: West Approach
2024-10-01 16:06:32 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc1df703030203e40018c5]    Type: motion
2024-10-01 16:06:32 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc1df703030203e40018c5]    Start: 2024-10-01T10-06-09 (1727798769.457)
2024-10-01 16:06:32 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc1df703030203e40018c5]    End: 2024-10-01T10-06-31 (1727798791.227)
2024-10-01 16:06:32 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc1df703030203e40018c5]    Duration: 21.77s
2024-10-01 16:06:32 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc1df703030203e40018c5]    Sleeping (6.638547s) to ensure clip is ready to download...
2024-10-01 16:06:38 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc1df703030203e40018c5]    Downloading video...
2024-10-01 16:06:38 [  WARNING  ] unifi_protect_backup.downloader            : [66fc1df703030203e40018c5]      Failed download attempt 1, retying in 1s
2024-10-01 16:06:39 [  WARNING  ] unifi_protect_backup.downloader            : [66fc1df703030203e40018c5]      Failed download attempt 2, retying in 1s
2024-10-01 16:06:40 [  WARNING  ] unifi_protect_backup.downloader            : [66fc1df703030203e40018c5]      Failed download attempt 3, retying in 1s
2024-10-01 16:06:42 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc1df703030203e40018c5]    Downloaded video size: 31.1MiBs
2024-10-01 16:06:42 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc1df703030203e40018c5]    Downloaded video length: 25.029s(+3.259s)
2024-10-01 16:06:42 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc1df703030203e40018c5]  Added to upload queue
2024-10-01 16:06:42 [   INFO    ] unifi_protect_backup.uploader              : [66fc1df703030203e40018c5]  Uploading event: 66fc1df703030203e40018c5
2024-10-01 16:06:42 [   DEBUG   ] unifi_protect_backup.uploader              : [66fc1df703030203e40018c5]   Remaining Upload Queue: 0 (0.0B)
2024-10-01 16:06:42 [   DEBUG   ] unifi_protect_backup.uploader              : [66fc1df703030203e40018c5]   Destination: unifi:wss-unifi/unifi_protect_backup/West Approach/2024-10-01/2024-10-01T10-06-31 motion.mp4
2024-10-01 16:06:54 [   DEBUG   ] unifi_protect_backup.uploader              : [66fc1df703030203e40018c5]  Uploaded





66fc1ef203370203e4001906


2024-10-01 16:10:32 [   DEBUG   ] unifi_protect_backup.event_listener        :  Adding event 66fc1ef203370203e4001906 to queue (Current download queue=1)
2024-10-01 16:10:32 [   INFO    ] unifi_protect_backup.downloader            : [66fc1ef203370203e4001906]  Downloading event: 66fc1ef203370203e4001906
2024-10-01 16:10:32 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc1ef203370203e4001906]  Remaining Download Queue: 0
2024-10-01 16:10:32 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc1ef203370203e4001906]  Video Download Buffer: 0.0B/512.0MiB
2024-10-01 16:10:32 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc1ef203370203e4001906]    Camera: West Approach
2024-10-01 16:10:32 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc1ef203370203e4001906]    Type: motion
2024-10-01 16:10:32 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc1ef203370203e4001906]    Start: 2024-10-01T10-10-20 (1727799020.481)
2024-10-01 16:10:32 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc1ef203370203e4001906]    End: 2024-10-01T10-10-33 (1727799033.275)
2024-10-01 16:10:32 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc1ef203370203e4001906]    Duration: 12.794s
2024-10-01 16:10:32 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc1ef203370203e4001906]    Sleeping (8.525306s) to ensure clip is ready to download...
2024-10-01 16:10:40 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc1ef203370203e4001906]    Downloading video...
2024-10-01 16:10:40 [  WARNING  ] unifi_protect_backup.downloader            : [66fc1ef203370203e4001906]      Failed download attempt 1, retying in 1s
2024-10-01 16:10:42 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc1ef203370203e4001906]    Downloaded video size: 19.5MiBs
2024-10-01 16:10:42 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc1ef203370203e4001906]    Downloaded video length: 17.125s(+4.331s)
2024-10-01 16:10:42 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc1ef203370203e4001906]  Added to upload queue
2024-10-01 16:10:45 [   INFO    ] unifi_protect_backup.uploader              : [66fc1ef203370203e4001906]  Uploading event: 66fc1ef203370203e4001906
2024-10-01 16:10:45 [   DEBUG   ] unifi_protect_backup.uploader              : [66fc1ef203370203e4001906]   Remaining Upload Queue: 0 (0.0B)
2024-10-01 16:10:45 [   DEBUG   ] unifi_protect_backup.uploader              : [66fc1ef203370203e4001906]   Destination: unifi:wss-unifi/unifi_protect_backup/West Approach/2024-10-01/2024-10-01T10-10-33 motion.mp4
2024-10-01 16:10:55 [   DEBUG   ] unifi_protect_backup.uploader              : [66fc1ef203370203e4001906]  Uploaded







66fc1f2901f70203e400191f


2024-10-01 16:11:28 [   DEBUG   ] unifi_protect_backup.event_listener        :  Adding event 66fc1f2901f70203e400191f to queue (Current download queue=2)
2024-10-01 16:11:36 [   INFO    ] unifi_protect_backup.downloader            : [66fc1f2901f70203e400191f]  Downloading event: 66fc1f2901f70203e400191f
2024-10-01 16:11:36 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc1f2901f70203e400191f]  Remaining Download Queue: 1
2024-10-01 16:11:36 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc1f2901f70203e400191f]  Video Download Buffer: 15.0MiB/512.0MiB
2024-10-01 16:11:36 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc1f2901f70203e400191f]    Camera: Showroom
2024-10-01 16:11:36 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc1f2901f70203e400191f]    Type: motion
2024-10-01 16:11:36 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc1f2901f70203e400191f]    Start: 2024-10-01T10-11-15 (1727799075.25)
2024-10-01 16:11:36 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc1f2901f70203e400191f]    End: 2024-10-01T10-11-29 (1727799089.129)
2024-10-01 16:11:36 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc1f2901f70203e400191f]    Duration: 13.879s
2024-10-01 16:11:36 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc1f2901f70203e400191f]    Sleeping (0.191887s) to ensure clip is ready to download...
2024-10-01 16:11:36 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc1f2901f70203e400191f]    Downloading video...
2024-10-01 16:11:36 [  WARNING  ] unifi_protect_backup.downloader            : [66fc1f2901f70203e400191f]      Failed download attempt 1, retying in 1s
2024-10-01 16:11:37 [  WARNING  ] unifi_protect_backup.downloader            : [66fc1f2901f70203e400191f]      Failed download attempt 2, retying in 1s
2024-10-01 16:11:38 [  WARNING  ] unifi_protect_backup.downloader            : [66fc1f2901f70203e400191f]      Failed download attempt 3, retying in 1s
2024-10-01 16:11:39 [  WARNING  ] unifi_protect_backup.downloader            : [66fc1f2901f70203e400191f]      Failed download attempt 4, retying in 1s
2024-10-01 16:11:40 [  WARNING  ] unifi_protect_backup.downloader            : [66fc1f2901f70203e400191f]      Failed download attempt 5, retying in 1s
2024-10-01 16:11:41 [   ERROR   ] unifi_protect_backup.downloader            : [66fc1f2901f70203e400191f]  Download failed after 5 attempts, abandoning event 66fc1f2901f70203e400191f:
2024-10-01 16:11:41 [  WARNING  ] unifi_protect_backup.downloader            : [66fc1f2901f70203e400191f]  Event failed 




66fc1ef203370203e4001906


2024-10-01 16:10:32 [   DEBUG   ] unifi_protect_backup.event_listener        :  Adding event 66fc1ef203370203e4001906 to queue (Current download queue=1)
2024-10-01 16:10:32 [   INFO    ] unifi_protect_backup.downloader            : [66fc1ef203370203e4001906]  Downloading event: 66fc1ef203370203e4001906
2024-10-01 16:10:32 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc1ef203370203e4001906]  Remaining Download Queue: 0
2024-10-01 16:10:32 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc1ef203370203e4001906]  Video Download Buffer: 0.0B/512.0MiB
2024-10-01 16:10:32 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc1ef203370203e4001906]    Camera: West Approach
2024-10-01 16:10:32 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc1ef203370203e4001906]    Type: motion
2024-10-01 16:10:32 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc1ef203370203e4001906]    Start: 2024-10-01T10-10-20 (1727799020.481)
2024-10-01 16:10:32 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc1ef203370203e4001906]    End: 2024-10-01T10-10-33 (1727799033.275)
2024-10-01 16:10:32 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc1ef203370203e4001906]    Duration: 12.794s
2024-10-01 16:10:32 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc1ef203370203e4001906]    Sleeping (8.525306s) to ensure clip is ready to download...
2024-10-01 16:10:40 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc1ef203370203e4001906]    Downloading video...
2024-10-01 16:10:40 [  WARNING  ] unifi_protect_backup.downloader            : [66fc1ef203370203e4001906]      Failed download attempt 1, retying in 1s
2024-10-01 16:10:42 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc1ef203370203e4001906]    Downloaded video size: 19.5MiBs
2024-10-01 16:10:42 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc1ef203370203e4001906]    Downloaded video length: 17.125s(+4.331s)
2024-10-01 16:10:42 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc1ef203370203e4001906]  Added to upload queue
2024-10-01 16:10:45 [   INFO    ] unifi_protect_backup.uploader              : [66fc1ef203370203e4001906]  Uploading event: 66fc1ef203370203e4001906
2024-10-01 16:10:45 [   DEBUG   ] unifi_protect_backup.uploader              : [66fc1ef203370203e4001906]   Remaining Upload Queue: 0 (0.0B)
2024-10-01 16:10:45 [   DEBUG   ] unifi_protect_backup.uploader              : [66fc1ef203370203e4001906]   Destination: unifi:wss-unifi/unifi_protect_backup/West Approach/2024-10-01/2024-10-01T10-10-33 motion.mp4
2024-10-01 16:10:55 [   DEBUG   ] unifi_protect_backup.uploader              : [66fc1ef203370203e4001906]  Uploaded




66fc21cd02be0203e40019a6


2024-10-01 16:22:49 [   DEBUG   ] unifi_protect_backup.event_listener        :  Adding event 66fc21cd02be0203e40019a6 to queue (Current download queue=1)                                            
2024-10-01 16:22:49 [   INFO    ] unifi_protect_backup.downloader            : [66fc21cd02be0203e40019a6]  Downloading event: 66fc21cd02be0203e40019a6                                               
2024-10-01 16:22:49 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc21cd02be0203e40019a6]  Remaining Download Queue: 0                                                               
2024-10-01 16:22:49 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc21cd02be0203e40019a6]  Video Download Buffer: 0.0B/512.0MiB                                                      
2024-10-01 16:22:49 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc21cd02be0203e40019a6]    Camera: West Approach                                                                   
2024-10-01 16:22:49 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc21cd02be0203e40019a6]    Type: motion                                                                            
2024-10-01 16:22:49 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc21cd02be0203e40019a6]    Start: 2024-10-01T10-22-31 (1727799751.41)                                              
2024-10-01 16:22:49 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc21cd02be0203e40019a6]    End: 2024-10-01T10-22-50 (1727799770.038)                                               
2024-10-01 16:22:49 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc21cd02be0203e40019a6]    Duration: 18.628s                                                                       
2024-10-01 16:22:49 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc21cd02be0203e40019a6]    Sleeping (8.344799s) to ensure clip is ready to download...                             
2024-10-01 16:22:57 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc21cd02be0203e40019a6]    Downloading video...                                                                    
2024-10-01 16:22:57 [  WARNING  ] unifi_protect_backup.downloader            : [66fc21cd02be0203e40019a6]      Failed download attempt 1, retying in 1s                                              
Traceback (most recent call last):                                                                                                                                                                   
  File "/usr/lib/python3.12/site-packages/unifi_protect_backup/downloader.py", line 185, in _download                                                                                                
    assert isinstance(video, bytes)                                                                                                                                                                  
           ^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                  
AssertionError                                                                                                                                                                                       
2024-10-01 16:22:58 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc21cd02be0203e40019a6]    Downloaded video size: 1.1MiBs                                                          
2024-10-01 16:22:58 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc21cd02be0203e40019a6]    Downloaded video length: 22.196s(+3.568s)                                               
2024-10-01 16:22:58 [   DEBUG   ] unifi_protect_backup.downloader            : [66fc21cd02be0203e40019a6]  Added to upload queue                                                                     
2024-10-01 16:22:58 [   INFO    ] unifi_protect_backup.uploader              : [66fc21cd02be0203e40019a6]  Uploading event: 66fc21cd02be0203e40019a6                                                 
2024-10-01 16:22:58 [   DEBUG   ] unifi_protect_backup.uploader              : [66fc21cd02be0203e40019a6]   Remaining Upload Queue: 0 (0.0B)                                                         
2024-10-01 16:22:58 [   DEBUG   ] unifi_protect_backup.uploader              : [66fc21cd02be0203e40019a6]   Destination: unifi:wss-unifi/unifi_protect_backup/West Approach/2024-10-01/2024-10-01T10-
22-50 motion.mp4                                                                                                                                                                                     
2024-10-01 16:23:01 [   DEBUG   ] unifi_protect_backup.uploader              : [66fc21cd02be0203e40019a6]  Uploaded               

@Swallowtail23
Copy link

2024-10-02T08:47:32.865646333+10:00 stderr F 2024-10-01 22:47:32 [  WARNING  ] unifi_protect_backup.downloader            : [66fc7bf601cfda03e40085a1]      Failed download attempt 2, retying in 1s
2024-10-02T08:47:32.865646333+10:00 stderr F Traceback (most recent call last):
2024-10-02T08:47:32.865646333+10:00 stderr F   File "/usr/lib/python3.12/site-packages/unifi_protect_backup/downloader.py", line 185, in _download
2024-10-02T08:47:32.865646333+10:00 stderr F     assert isinstance(video, bytes)
2024-10-02T08:47:32.865646333+10:00 stderr F            ^^^^^^^^^^^^^^^^^^^^^^^^
2024-10-02T08:47:32.865646333+10:00 stderr F AssertionError
2024-10-02T08:47:33.904580895+10:00 stderr F 2024-10-01 22:47:33 [  WARNING  ] unifi_protect_backup.downloader            : [66fc7bf601cfda03e40085a1]      Failed download attempt 3, retying in 1s
2024-10-02T08:47:33.904580895+10:00 stderr F Traceback (most recent call last):
2024-10-02T08:47:33.904580895+10:00 stderr F   File "/usr/lib/python3.12/site-packages/unifi_protect_backup/downloader.py", line 185, in _download
2024-10-02T08:47:33.904580895+10:00 stderr F     assert isinstance(video, bytes)
2024-10-02T08:47:33.904580895+10:00 stderr F            ^^^^^^^^^^^^^^^^^^^^^^^^
2024-10-02T08:47:33.904580895+10:00 stderr F AssertionError
2024-10-02T08:47:34.956652324+10:00 stderr F 2024-10-01 22:47:34 [  WARNING  ] unifi_protect_backup.downloader            : [66fc7bf601cfda03e40085a1]      Failed download attempt 4, retying in 1s
2024-10-02T08:47:34.956652324+10:00 stderr F Traceback (most recent call last):
2024-10-02T08:47:34.956652324+10:00 stderr F   File "/usr/lib/python3.12/site-packages/unifi_protect_backup/downloader.py", line 185, in _download
2024-10-02T08:47:34.956652324+10:00 stderr F     assert isinstance(video, bytes)
2024-10-02T08:47:34.956652324+10:00 stderr F            ^^^^^^^^^^^^^^^^^^^^^^^^
2024-10-02T08:47:34.956652324+10:00 stderr F AssertionError
2024-10-02T08:47:36.002039866+10:00 stderr F 2024-10-01 22:47:36 [  WARNING  ] unifi_protect_backup.downloader            : [66fc7bf601cfda03e40085a1]      Failed download attempt 5, retying in 1s
2024-10-02T08:47:36.002039866+10:00 stderr F Traceback (most recent call last):
2024-10-02T08:47:36.002039866+10:00 stderr F   File "/usr/lib/python3.12/site-packages/unifi_protect_backup/downloader.py", line 185, in _download
2024-10-02T08:47:36.002039866+10:00 stderr F     assert isinstance(video, bytes)
2024-10-02T08:47:36.002039866+10:00 stderr F            ^^^^^^^^^^^^^^^^^^^^^^^^
2024-10-02T08:47:36.002039866+10:00 stderr F AssertionError
2024-10-02T08:47:37.003336185+10:00 stderr F 2024-10-01 22:47:37 [   ERROR   ] unifi_protect_backup.downloader            : [66fc7bf601cfda03e40085a1]  Download failed after 5 attempts, abandoning event 66fc7bf601cfda03e40085a1:
2024-10-02T08:47:37.003719519+10:00 stderr F 2024-10-01 22:47:37 [  WARNING  ] unifi_protect_backup.downloader            : [66fc7bf601cfda03e40085a1]  Event failed download attempt 1
2024-10-02T08:47:37.003719519+10:00 stderr F Traceback (most recent call last):
2024-10-02T08:47:37.003719519+10:00 stderr F   File "/usr/lib/python3.12/site-packages/unifi_protect_backup/downloader.py", line 145, in start
2024-10-02T08:47:37.003719519+10:00 stderr F     assert video is not None
2024-10-02T08:47:37.003719519+10:00 stderr F            ^^^^^^^^^^^^^^^^^
2024-10-02T08:47:37.003719519+10:00 stderr F AssertionError
2024-10-02T08:50:53.154329867+10:00 stderr F 2024-10-01 22:50:53 [   DEBUG   ] unifi_protect_backup.missing_event_checker :  Running check for missing events...
2024-10-02T08:56:07.830137275+10:00 stderr F 2024-10-01 22:56:07 [   DEBUG   ] unifi_protect_backup.missing_event_checker :  Running check for missing events...

Similar issue here - not all videos, but probably 3 or 4 times a day across 10 relatively busy cameras.

Running Protect 5.0.34.

@Swallowtail23
Copy link

Note in addition to above, event 66fc7bf601cfda03e40085a1 was picked up later by missing events check and successfully uploaded.

@wssweb
Copy link
Author

wssweb commented Oct 2, 2024

I let mine run over night and interestingly when I filter the log for the ones that fully fail and abandon the event, I get 8 fails an hour... they fail roughly in the same time frame as well.

2024-10-02 06:00:30 [   ERROR   ] unifi_protect_backup.downloader            : [66fad272037eff03e40004a0]  Download failed after 5 attempts, abandoning event 66fad272037eff03e40004a0:
2024-10-02 06:08:09 [   ERROR   ] unifi_protect_backup.downloader            : [66fad237031eff03e4000491]  Download failed after 5 attempts, abandoning event 66fad237031eff03e4000491:
2024-10-02 06:15:57 [   ERROR   ] unifi_protect_backup.downloader            : [66fad24a03d1ff03e4000496]  Download failed after 5 attempts, abandoning event 66fad24a03d1ff03e4000496:
2024-10-02 06:23:43 [   ERROR   ] unifi_protect_backup.downloader            : [66fad3f2037fff03e40004bd]  Download failed after 5 attempts, abandoning event 66fad3f2037fff03e40004bd:
2024-10-02 06:31:26 [   ERROR   ] unifi_protect_backup.downloader            : [66fad3f1012aff03e40004bc]  Download failed after 5 attempts, abandoning event 66fad3f1012aff03e40004bc:
2024-10-02 06:39:06 [   ERROR   ] unifi_protect_backup.downloader            : [66fad43c00c0ff03e40004e0]  Download failed after 5 attempts, abandoning event 66fad43c00c0ff03e40004e0:
2024-10-02 06:46:56 [   ERROR   ] unifi_protect_backup.downloader            : [66fad4260024ff03e40004d7]  Download failed after 5 attempts, abandoning event 66fad4260024ff03e40004d7:
2024-10-02 06:54:31 [   ERROR   ] unifi_protect_backup.downloader            : [66fad48100bfff03e40004f5]  Download failed after 5 attempts, abandoning event 66fad48100bfff03e40004f5:
2024-10-02 07:02:07 [   ERROR   ] unifi_protect_backup.downloader            : [66fad46402a5ff03e40004e8]  Download failed after 5 attempts, abandoning event 66fad46402a5ff03e40004e8:
2024-10-02 07:09:42 [   ERROR   ] unifi_protect_backup.downloader            : [66fad4c6015bff03e40004fc]  Download failed after 5 attempts, abandoning event 66fad4c6015bff03e40004fc:
2024-10-02 07:17:18 [   ERROR   ] unifi_protect_backup.downloader            : [66fad442034aff03e40004e1]  Download failed after 5 attempts, abandoning event 66fad442034aff03e40004e1:
2024-10-02 07:24:53 [   ERROR   ] unifi_protect_backup.downloader            : [66fad45b03bfff03e40004e7]  Download failed after 5 attempts, abandoning event 66fad45b03bfff03e40004e7:
2024-10-02 07:32:28 [   ERROR   ] unifi_protect_backup.downloader            : [66fad512027cff03e4000507]  Download failed after 5 attempts, abandoning event 66fad512027cff03e4000507:
2024-10-02 07:40:03 [   ERROR   ] unifi_protect_backup.downloader            : [66fad5460128ff03e400050d]  Download failed after 5 attempts, abandoning event 66fad5460128ff03e400050d:
2024-10-02 07:47:39 [   ERROR   ] unifi_protect_backup.downloader            : [66fad57a01a4ff03e4000514]  Download failed after 5 attempts, abandoning event 66fad57a01a4ff03e4000514:
2024-10-02 07:55:18 [   ERROR   ] unifi_protect_backup.downloader            : [66fad42001cbff03e40004d2]  Download failed after 5 attempts, abandoning event 66fad42001cbff03e40004d2:
2024-10-02 08:02:53 [   ERROR   ] unifi_protect_backup.downloader            : [66fad57002d1ff03e4000512]  Download failed after 5 attempts, abandoning event 66fad57002d1ff03e4000512:
2024-10-02 08:10:28 [   ERROR   ] unifi_protect_backup.downloader            : [66fad41b02d7ff03e40004c9]  Download failed after 5 attempts, abandoning event 66fad41b02d7ff03e40004c9:
2024-10-02 08:18:04 [   ERROR   ] unifi_protect_backup.downloader            : [66fad414013dff03e40004c8]  Download failed after 5 attempts, abandoning event 66fad414013dff03e40004c8:
2024-10-02 08:25:39 [   ERROR   ] unifi_protect_backup.downloader            : [66fad4ff02ddff03e4000502]  Download failed after 5 attempts, abandoning event 66fad4ff02ddff03e4000502:
2024-10-02 08:33:14 [   ERROR   ] unifi_protect_backup.downloader            : [66facc390039ff03e40003f0]  Download failed after 5 attempts, abandoning event 66facc390039ff03e40003f0:
2024-10-02 08:40:50 [   ERROR   ] unifi_protect_backup.downloader            : [66facd520127ff03e4000424]  Download failed after 5 attempts, abandoning event 66facd520127ff03e4000424:
2024-10-02 08:48:25 [   ERROR   ] unifi_protect_backup.downloader            : [66facd7f0209ff03e400042f]  Download failed after 5 attempts, abandoning event 66facd7f0209ff03e400042f:
2024-10-02 08:56:00 [   ERROR   ] unifi_protect_backup.downloader            : [66facea7024bff03e4000452]  Download failed after 5 attempts, abandoning event 66facea7024bff03e4000452:
2024-10-02 09:03:35 [   ERROR   ] unifi_protect_backup.downloader            : [66fad0a6028cff03e4000470]  Download failed after 5 attempts, abandoning event 66fad0a6028cff03e4000470:
2024-10-02 09:11:10 [   ERROR   ] unifi_protect_backup.downloader            : [66facd1e02d8ff03e400041e]  Download failed after 5 attempts, abandoning event 66facd1e02d8ff03e400041e:
2024-10-02 09:18:46 [   ERROR   ] unifi_protect_backup.downloader            : [66face63032fff03e4000447]  Download failed after 5 attempts, abandoning event 66face63032fff03e4000447:
2024-10-02 09:26:21 [   ERROR   ] unifi_protect_backup.downloader            : [66facda30119ff03e4000434]  Download failed after 5 attempts, abandoning event 66facda30119ff03e4000434:
2024-10-02 09:33:56 [   ERROR   ] unifi_protect_backup.downloader            : [66facd0500c5ff03e4000418]  Download failed after 5 attempts, abandoning event 66facd0500c5ff03e4000418:
2024-10-02 09:41:31 [   ERROR   ] unifi_protect_backup.downloader            : [66fad0f40152ff03e4000476]  Download failed after 5 attempts, abandoning event 66fad0f40152ff03e4000476:
2024-10-02 09:49:07 [   ERROR   ] unifi_protect_backup.downloader            : [66facce8027fff03e4000411]  Download failed after 5 attempts, abandoning event 66facce8027fff03e4000411:
2024-10-02 09:56:42 [   ERROR   ] unifi_protect_backup.downloader            : [66face9d0101ff03e400044d]  Download failed after 5 attempts, abandoning event 66face9d0101ff03e400044d:
2024-10-02 10:04:17 [   ERROR   ] unifi_protect_backup.downloader            : [66facd6f008cff03e4000429]  Download failed after 5 attempts, abandoning event 66facd6f008cff03e4000429:
2024-10-02 10:11:52 [   ERROR   ] unifi_protect_backup.downloader            : [66fad03d0212ff03e4000464]  Download failed after 5 attempts, abandoning event 66fad03d0212ff03e4000464:
2024-10-02 10:19:28 [   ERROR   ] unifi_protect_backup.downloader            : [66faccdd02c7ff03e400040c]  Download failed after 5 attempts, abandoning event 66faccdd02c7ff03e400040c:
2024-10-02 10:27:03 [   ERROR   ] unifi_protect_backup.downloader            : [66face0a0017ff03e4000441]  Download failed after 5 attempts, abandoning event 66face0a0017ff03e4000441:
2024-10-02 10:34:38 [   ERROR   ] unifi_protect_backup.downloader            : [66fad05b0128ff03e400046a]  Download failed after 5 attempts, abandoning event 66fad05b0128ff03e400046a:
2024-10-02 10:42:14 [   ERROR   ] unifi_protect_backup.downloader            : [66facc9401a8ff03e40003fc]  Download failed after 5 attempts, abandoning event 66facc9401a8ff03e40003fc:
2024-10-02 10:49:49 [   ERROR   ] unifi_protect_backup.downloader            : [66facff8020dff03e400045e]  Download failed after 5 attempts, abandoning event 66facff8020dff03e400045e:
2024-10-02 10:57:24 [   ERROR   ] unifi_protect_backup.downloader            : [66facc5002a0ff03e40003f1]  Download failed after 5 attempts, abandoning event 66facc5002a0ff03e40003f1:
2024-10-02 11:04:59 [   ERROR   ] unifi_protect_backup.downloader            : [66facca60021ff03e4000401]  Download failed after 5 attempts, abandoning event 66facca60021ff03e4000401:
2024-10-02 11:12:35 [   ERROR   ] unifi_protect_backup.downloader            : [66faccc002b3ff03e4000406]  Download failed after 5 attempts, abandoning event 66faccc002b3ff03e4000406:
2024-10-02 11:20:10 [   ERROR   ] unifi_protect_backup.downloader            : [66facde700c5ff03e400043b]  Download failed after 5 attempts, abandoning event 66facde700c5ff03e400043b:
2024-10-02 11:27:45 [   ERROR   ] unifi_protect_backup.downloader            : [66fad1fb018eff03e400048a]  Download failed after 5 attempts, abandoning event 66fad1fb018eff03e400048a:
2024-10-02 11:35:20 [   ERROR   ] unifi_protect_backup.downloader            : [66fad19a0360ff03e4000483]  Download failed after 5 attempts, abandoning event 66fad19a0360ff03e4000483:
2024-10-02 11:42:56 [   ERROR   ] unifi_protect_backup.downloader            : [66fad3ef02abff03e40004bb]  Download failed after 5 attempts, abandoning event 66fad3ef02abff03e40004bb:
2024-10-02 11:50:31 [   ERROR   ] unifi_protect_backup.downloader            : [66fad293023aff03e40004aa]  Download failed after 5 attempts, abandoning event 66fad293023aff03e40004aa:
2024-10-02 11:58:06 [   ERROR   ] unifi_protect_backup.downloader            : [66fad2b50290ff03e40004b0]  Download failed after 5 attempts, abandoning event 66fad2b50290ff03e40004b0:
2024-10-02 12:05:41 [   ERROR   ] unifi_protect_backup.downloader            : [66fad1340164ff03e400047c]  Download failed after 5 attempts, abandoning event 66fad1340164ff03e400047c:
2024-10-02 12:13:17 [   ERROR   ] unifi_protect_backup.downloader            : [66fad23600c3ff03e4000490]  Download failed after 5 attempts, abandoning event 66fad23600c3ff03e4000490:
2024-10-02 12:20:52 [   ERROR   ] unifi_protect_backup.downloader            : [66fad27d0074ff03e40004a5]  Download failed after 5 attempts, abandoning event 66fad27d0074ff03e40004a5:
2024-10-02 12:28:27 [   ERROR   ] unifi_protect_backup.downloader            : [66facbf403e4ff03e40003ea]  Download failed after 5 attempts, abandoning event 66facbf403e4ff03e40003ea:
2024-10-02 12:36:02 [   ERROR   ] unifi_protect_backup.downloader            : [66fad272037eff03e40004a0]  Download failed after 5 attempts, abandoning event 66fad272037eff03e40004a0:
2024-10-02 12:43:38 [   ERROR   ] unifi_protect_backup.downloader            : [66fad237031eff03e4000491]  Download failed after 5 attempts, abandoning event 66fad237031eff03e4000491:
2024-10-02 12:51:14 [   ERROR   ] unifi_protect_backup.downloader            : [66fad24a03d1ff03e4000496]  Download failed after 5 attempts, abandoning event 66fad24a03d1ff03e4000496:
2024-10-02 12:58:49 [   ERROR   ] unifi_protect_backup.downloader            : [66fad3f2037fff03e40004bd]  Download failed after 5 attempts, abandoning event 66fad3f2037fff03e40004bd:
2024-10-02 13:06:24 [   ERROR   ] unifi_protect_backup.downloader            : [66fad3f1012aff03e40004bc]  Download failed after 5 attempts, abandoning event 66fad3f1012aff03e40004bc:
2024-10-02 13:13:59 [   ERROR   ] unifi_protect_backup.downloader            : [66fad43c00c0ff03e40004e0]  Download failed after 5 attempts, abandoning event 66fad43c00c0ff03e40004e0:
2024-10-02 13:21:35 [   ERROR   ] unifi_protect_backup.downloader            : [66fad4260024ff03e40004d7]  Download failed after 5 attempts, abandoning event 66fad4260024ff03e40004d7:
2024-10-02 13:29:10 [   ERROR   ] unifi_protect_backup.downloader            : [66fad48100bfff03e40004f5]  Download failed after 5 attempts, abandoning event 66fad48100bfff03e40004f5:
2024-10-02 13:36:45 [   ERROR   ] unifi_protect_backup.downloader            : [66fad46402a5ff03e40004e8]  Download failed after 5 attempts, abandoning event 66fad46402a5ff03e40004e8:
2024-10-02 13:44:20 [   ERROR   ] unifi_protect_backup.downloader            : [66fad4c6015bff03e40004fc]  Download failed after 5 attempts, abandoning event 66fad4c6015bff03e40004fc:
2024-10-02 13:51:56 [   ERROR   ] unifi_protect_backup.downloader            : [66fad442034aff03e40004e1]  Download failed after 5 attempts, abandoning event 66fad442034aff03e40004e1:
2024-10-02 13:59:31 [   ERROR   ] unifi_protect_backup.downloader            : [66fad45b03bfff03e40004e7]  Download failed after 5 attempts, abandoning event 66fad45b03bfff03e40004e7:
2024-10-02 14:07:07 [   ERROR   ] unifi_protect_backup.downloader            : [66fad512027cff03e4000507]  Download failed after 5 attempts, abandoning event 66fad512027cff03e4000507:

@wssweb
Copy link
Author

wssweb commented Oct 2, 2024

It is also creating a massive download que

2024-10-02 15:02:29 [  WARNING  ] unifi_protect_backup.missing_event_checker :   Found missing events, adding to backup queue
2024-10-02 15:03:14 [  WARNING  ] unifi_protect_backup.downloader            : [66facc390039ff03e40003f0]      Failed download attempt 2, retying in 1s
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/unifi_protect_backup/downloader.py", line 185, in _download
    assert isinstance(video, bytes)
           ^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError
2024-10-02 15:04:45 [  WARNING  ] unifi_protect_backup.downloader            : [66facc390039ff03e40003f0]      Failed download attempt 3, retying in 1s
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/unifi_protect_backup/downloader.py", line 185, in _download
    assert isinstance(video, bytes)
           ^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError
2024-10-02 15:05:45 [   DEBUG   ] unifi_protect_backup.event_listener        :  Adding event 66fd606201590203e4002ea7 to queue (Current download queue=283)
2024-10-02 15:06:01 [   DEBUG   ] unifi_protect_backup.event_listener        :  Adding event 66fd614f00270203e4002eb0 to queue (Current download queue=284)
2024-10-02 15:06:05 [   DEBUG   ] unifi_protect_backup.event_listener        :  Adding event 66fd615003c50203e4002eb1 to queue (Current download queue=285)
2024-10-02 15:06:11 [   DEBUG   ] unifi_protect_backup.event_listener        :  Adding event 66fd615c036e5403e400147f to queue (Current download queue=286)
2024-10-02 15:06:17 [  WARNING  ] unifi_protect_backup.downloader            : [66facc390039ff03e40003f0]      Failed download attempt 4, retying in 1s
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/unifi_protect_backup/downloader.py", line 185, in _download
    assert isinstance(video, bytes)
           ^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError
2024-10-02 15:06:39 [   DEBUG   ] unifi_protect_backup.event_listener        :  Adding event 66fd617303df0203e4002ebc to queue (Current download queue=287)
2024-10-02 15:06:48 [   DEBUG   ] unifi_protect_backup.event_listener        :  Adding event 66fd6183022c5403e4001485 to queue (Current download queue=288)
2024-10-02 15:06:58 [   DEBUG   ] unifi_protect_backup.event_listener        :  Adding event 66fd618b02700203e4002ec1 to queue (Current download queue=289)
2024-10-02 15:07:02 [   DEBUG   ] unifi_protect_backup.event_listener        :  Adding event 66fd616902f20203e4002ebb to queue (Current download queue=290)
2024-10-02 15:07:29 [   DEBUG   ] unifi_protect_backup.missing_event_checker :  Running check for missing events...
2024-10-02 15:07:36 [   DEBUG   ] unifi_protect_backup.event_listener        :  Adding event 66fd61b1036f5403e400148b to queue (Current download queue=291)
2024-10-02 15:07:40 [   DEBUG   ] unifi_protect_backup.event_listener        :  Adding event 66fd61a4020a0203e4002ecb to queue (Current download queue=292)
2024-10-02 15:07:48 [  WARNING  ] unifi_protect_backup.downloader            : [66facc390039ff03e40003f0]      Failed download attempt 5, retying in 1s
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/unifi_protect_backup/downloader.py", line 185, in _download
    assert isinstance(video, bytes)
           ^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError
2024-10-02 15:07:49 [   ERROR   ] unifi_protect_backup.downloader            : [66facc390039ff03e40003f0]  Download failed after 5 attempts, abandoning event 66facc390039ff03e40003f0:
2024-10-02 15:07:49 [  WARNING  ] unifi_protect_backup.downloader            : [66facc390039ff03e40003f0]  Event failed download attempt 1
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/unifi_protect_backup/downloader.py", line 145, in start
    assert video is not None
           ^^^^^^^^^^^^^^^^^
AssertionError
2024-10-02 15:07:49 [   INFO    ] unifi_protect_backup.downloader            : [66facd520127ff03e4000424]  Downloading event: 66facd520127ff03e4000424
2024-10-02 15:07:49 [   DEBUG   ] unifi_protect_backup.downloader            : [66facd520127ff03e4000424]  Remaining Download Queue: 291
2024-10-02 15:07:49 [   DEBUG   ] unifi_protect_backup.downloader            : [66facd520127ff03e4000424]  Video Download Buffer: 0.0B/512.0MiB
2024-10-02 15:07:49 [   DEBUG   ] unifi_protect_backup.downloader            : [66facd520127ff03e4000424]    Camera: Showroom
2024-10-02 15:07:49 [   DEBUG   ] unifi_protect_backup.downloader            : [66facd520127ff03e4000424]    Type: motion
2024-10-02 15:07:49 [   DEBUG   ] unifi_protect_backup.downloader            : [66facd520127ff03e4000424]    Start: 2024-09-30T10-09-48 (1727712588.073)
2024-10-02 15:07:49 [   DEBUG   ] unifi_protect_backup.downloader            : [66facd520127ff03e4000424]    End: 2024-09-30T10-10-01 (1727712601.903)
2024-10-02 15:07:49 [   DEBUG   ] unifi_protect_backup.downloader            : [66facd520127ff03e4000424]    Duration: 13.83s
2024-10-02 15:07:49 [   DEBUG   ] unifi_protect_backup.downloader            : [66facd520127ff03e4000424]    Downloading video...
2024-10-02 15:07:59 [   DEBUG   ] unifi_protect_backup.event_listener        :  Adding event 66fd61c401930203e4002ed1 to queue (Current download queue=292)
2024-10-02 15:08:27 [   DEBUG   ] unifi_protect_backup.event_listener        :  Adding event 66fd61e002160203e4002ed7 to queue (Current download queue=293)

@ep1cman
Copy link
Owner

ep1cman commented Oct 2, 2024

I’m really not sure how to approach resolving this other than retrying like the tool already does. This assertion error occurs when UniFi protects simply returns an empty response instead of the requested video. I suspect it’s simply unable to process the video in time.

The experimental downloaded used a slightly different approach (that the web ui now uses) that first asks UniFi protect to generate the video locally and then downloads it as a secondary step.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants