Matomo 3 C# PiwikTracker.DoTrackAction throws Error

I use matomo (Piwik.Tracker) 3, which I Installed from NuGet Package Manager, on my .NET based web application. Sometimes, when I try to open a URL, I got an error:

Index was outside the bounds of the array.   at Piwik.Tracker.PiwikTracker.LoadVisitorIdCookie()
   at Piwik.Tracker.PiwikTracker.SetFirstPartyCookies()
   at Piwik.Tracker.PiwikTracker.GetRequest(Int32 idSite)
   at Piwik.Tracker.PiwikTracker.GetUrlTrackAction(String actionUrl, ActionType actionType)
   at Piwik.Tracker.PiwikTracker.DoTrackAction(String actionUrl, ActionType actionType)

I try to look at the Source Code, but I could not figure out what the cause is. I know it’s related to array and possibly to Cookies? But I still have no Idea.

How do I resolve this? Is there any other way to troubleshoot this?

Thanks in advance.