nhass | Posts: 23

Object error calling EslClient.ReportService.CompletionReport for date

0 votes
eSginLive, I'm getting an object reference error when executing EslClient.ReportService.DownloadCompletionReport() for certain dates. The last couple of days I’ve received the following exception using the eSignLive api: Silanis.ESL.SDK.EslException: Could not download the completion report. Exception: Object reference not set to an instance of an object. System.NullReferenceException: Object reference not set to an instance of an object. at Silanis.ESL.SDK.Internal.HttpMethods.GetHttpJson(String apiToken, String path, String acceptType) at Silanis.ESL.SDK.RestClient.Get(String path) at Silanis.ESL.SDK.Services.ReportService.DownloadCompletionReport(DocumentPackageStatus packageStatus, DateTime from, DateTime to) --- End of inner exception stack trace --- at Silanis.ESL.SDK.Services.ReportService.DownloadCompletionReport(DocumentPackageStatus packageStatus, DateTime from, DateTime to) This exception occurs when I execute the following api call (it take about 2-3 minutes for the exception to be thrown):
CompletionReport cr = esl.ReportService.DownloadCompletionReport(DocumentPackageStatus.COMPLETED, startDate, endDate);
startDate = “01/29/2017” endDate = “02/03/2017” I also got the error when my process ran yesterday with the date parameter as follows: startDate = “01/28/2017” endDate = “02/02/2017” But when my process ran Monday with the following dates, below, it worked successful. startDate = “01/27/2017” endDate = “02/01/2017” This error seems to happen weekly, typically it happens when our process runs on Saturdays or Sundays. Can you please provide some insight into this and how to resolve it? Is there an updated APIs that I need to download that would resolve it? I using version “v2.0.50727” of the Silanis.ESL assembly. I go out to the web portal and run an advance search for completed packages for the same date range and it processes successfully, so I’m not sure how to resolve this. Any help would be much appreciated. Thanks Nathan

harishaidary | Posts: 1812

Reply to: Object error calling EslClient.ReportService.CompletionReport for date

0 votes
Hi Nathan, The error you are getting is a very generic error in .NET (not actually an eSignLive exception) and the root cause might be a number of different things. Now, the fact that you're being thrown this exception for a certain date range is very odd. Couple of questions I have for you:
  1. Have you been getting this issue only recently (past 2-3 days)?
  2. Are you using the latest version of the SDK? In other words, are you using SDK 11.0.1 for version 11 of esl (i.e. sandbox.esignlive.com / apps.esignlive.com) and SDK 10.13 for version 10 of esl (i.e. sandbox.e-signlive.com / apps.e-signlive.com)
  3. Are you using any proxies or firewalls?
  4. How are you building your DateTime objects?
  5. Does this exception only occur when retrieving reports or does it also occur for example when creating package, uploading document, etc.?
Let me know.

nhass | Posts: 23

Reply to: Object error calling EslClient.ReportService.CompletionReport for date

0 votes
Harishaidary I’m am a little puzzled because the inner exception details state the message is at “at Silanis.ESL.SDK.Internal.HttpMethods.GetHttpJson(String apiToken, String path, String acceptType)” that’s within the “Silanis.ESL.dll”. This error has been happening sporadically since we integrated the Silanis product into our system. We are still using the SDK we originally download 10.10. The error typically happens on average like once a week, but this week it happened three times so far; Sunday, Thursday, and Friday. I have also seen weeks where it does not happen. I did some testing and I believe the error is tied to the amount of data being requested. I first downloaded the 11.0.0.0 version and created a quick and dirty application using it to test the DownloadCompletionReport method. Here is what I found: Again below is the line of code which throws the error (it takes around 2 minutes for execution to even return whether success or failure):
CompletionReport cr = esl.ReportService.DownloadCompletionReport(DocumentPackageStatus.COMPLETED, startDate, endDate);
Using the following dates: startDate = 02/02/2017, endDate = 02/03/2017 - (date range of 1 day ) Succeeds startDate = 02/01/2017, endDate = 02/03/2017 - (date range of 2 days ) Succeeds startDate = 01/31/2017, endDate = 02/03/2017 - (date range of 3 days) Succeeds startDate = 01/30/2017, endDate = 02/03/2017 - (date range of 4 days) Fails startDate = 01/30/2017, endDate = 02/02/2017 - (date range of 3 days) Fails So based on my testing I’m wondering if it something to do with the amount of data on Silanis’ end which has to be bundled up and sent back; or is there some sort of timeout it’s hitting. I also noticed in the exception details the mention of JSON. Is your API creating a JSON objects? If so I’m wondering if maybe the error is due to some of our data with a special character in it which needs to be escaped. We have an automated process that runs each day calling this method and passing a date range of five days (a rolling five days), so today the date range was 01/29/2017 to 02/03/2017; tomorrow when it runs it will be 01/30/2017 to 02/04/2017. This error only occurs when retrieving the reports. Thanks Nate

harishaidary | Posts: 1812

Reply to: Object error calling EslClient.ReportService.CompletionReport for date

0 votes
Simply put, the SDKs are an abstraction of our REST API. Therefore, when you are using the esl client to make calls to the API, you are technically sending/retrieving JSON payloads. Regarding your issue, it might be related to the large amounts of data being transferred depending on how many packages you create per day. But it would also be surprising since I used to retrieve completion reports for an entire month and never had any issues. Here are my suggestions: 1. Try to use SDK 10.13. A lot of bugs have been fixed between 10.10 and 10.13 and this might resolve your problem. 2. Monitor your network using an application like Fiddler the next time you run your report to see if any actual calls go through to esignlive or have a better idea of what is going wrong. Let me know.

nhass | Posts: 23

Reply to: Object error calling EslClient.ReportService.CompletionReport for date

0 votes
Haris Just an update. I tried version 10.13 and it too had the same problem. I resolved the issue by making the date range smaller, and calling the DownloadCompletionReport method multiple times. So now instead of calling the method once with a five day date range (i.e. 02/01/2017 to 02/06/2017), I call it five times passing it five consecutive one day date ranges: Call1: 02/05/2017 to 02/06/2017 Call2: 02/04/2017 to 02/05/2017 Call3: 02/03/2017 to 02/04/2017 Call4: 02/02/2017 to 02/03/2017 Call5: 02/01/2017 to 02/02/2017 I combined the results of those five calls and continue on in my process as before. I am still a little concerned that when executing that method call of the API it takes close to 2 minutes for execution to return, even though the date range is now one day. I also tried taking a fiddle capture. Nothing stands out to me, I did attach it to this reply if you want to take a look. Regards, Nathan

Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off