KoenZomers / RingRecordingDownload

Console Application for Windows, Raspberry Pi, Linux and macOS which allows for downloading of Ring recorded events
Apache License 2.0
20 stars 9 forks source link

Call to session.GetDoorbotsHistory never returns #1

Closed ronwarner closed 4 years ago

ronwarner commented 4 years ago

Hello! I've downloaded this and altered it a bit to run it in Visual Studio without any command line arguments. I'm just trying to get my last 60 days of videos before they expire. At first, everything was working quite well... I downloaded the last two days' worth of videos. I stopped the program to make some adjustments, but after restarting it, it began behaving oddly.

The call to session.Authenticate().Wait() works just fine, and comes back with a token. However, calling for the history with session.GetDoorbotsHistory(startDate, endDate).Result never comes back with anything.

I thought maybe I had hit an API limit, or tried querying too much at once, so I set up some loops to make the requests for only one hour at a time; in other words, configuration.EndDate is set to startDate.AddHours(1). Even this modest call does not return.

Do you know what Ring's API limits are, or what other issues might cause this web call to hang indefinitely?

ronwarner commented 4 years ago

Just tried again and after a couple of minutes or so, the same method came back with this exception: Message: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index

Stack Trace: at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource) at KoenZomers.Ring.Api.Session.d__29.MoveNext()

Source: mscorlib

KoenZomers commented 4 years ago

Hey @ronwarner. I've made several changes today to the code. Can you see if the issue persists with the current version? If you're familiar with Fiddler, please run it while you run the tool and see if you can see some anomalies from the network traffic.

KoenZomers commented 4 years ago

Closing issue as no response received

ronwarner commented 4 years ago

Sorry I missed your reply. I did eventually get it working, but now I can't recall what the exact issue was.

KoenZomers commented 4 years ago

Thanks for letting me know that it works for you now @ronwarner!