OF-DL icon indicating copy to clipboard operation
OF-DL copied to clipboard

HttpClient.Timeout while scanning for paid messages

Open branchblitz opened this issue 2 years ago • 1 comments

Hi, so I configured the downloader to only scrape paid posts and paid messages. When it gets to Getting Paid Messages this is the error I get:

Exception caught: The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing.

StackTrace: at System.Net.Http.HttpClient.HandleFailure(Exception e, Boolean telemetryStarted, HttpResponseMessage response, CancellationTokenSource cts, CancellationToken cancellationToken, CancellationTokenSource pendingRequestsCts) at System.Net.Http.HttpClient.Send(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken cancellationToken) at OF_DL.Helpers.APIHelper.GetDynamicHeaders(String path, String queryParams, Auth auth) at OF_DL.Helpers.APIHelper.BuildHttpRequestMessage(Dictionary`2 getParams, String endpoint, Auth auth) at OF_DL.Helpers.APIHelper.BuildHeaderAndExecuteRequests(Dictionary`2 getParams, String endpoint, Auth auth, HttpClient client) at OF_DL.Helpers.APIHelper.GetPaidMessages(String endpoint, String folder, String username, Auth auth, Config config)

Inner Exception: Exception caught: A task was canceled.

StackTrace:

I tried setting timeout in the config.json to 500: "Timeout": 500, but this doesn't seem to change anything. All the other checks on startup are going through without any error, I also created the blob and key files. Any ideas?

branchblitz avatar Dec 01 '23 17:12 branchblitz

You can try to increase the timeout in config.json but I have no idea what causes this error, I've never seen it when I've been scraping.

sim0n00ps avatar Dec 02 '23 20:12 sim0n00ps