Dropbox plugin times out when uploading large screenshots

Description

When uploading “large” screenshot (~1.5MB) to Dropbox on slow connection, the connection times out.
Small screenshots (~100kB) on slow connection and large screenshots (>3MB) on fast connection work fine.

Here's log:

2015-05-27 21:38:04,421 [Greenshot] INFO - [Greenshot.Helpers.CaptureHelper] Calling processor TitleFix
2015-05-27 21:38:04,421 [Greenshot] INFO - [Greenshot.Helpers.CaptureHelper] Calling destination Save directly (using preferred file output settings)
2015-05-27 21:38:04,421 [Greenshot] INFO - [Greenshot.Destinations.FileDestination] Creating new filename
2015-05-27 21:38:05,312 [Greenshot] INFO - [GreenshotPlugin.Core.ImageOutput] Image with format Format24bppRgb has 140062 colors
2015-05-27 21:38:12,765 [Greenshot] INFO - [Greenshot.Helpers.CaptureHelper] Calling destination Copy to clipboard
2015-05-27 21:38:13,312 [Greenshot] INFO - [GreenshotPlugin.Core.ImageOutput] Image with format Format24bppRgb has 140062 colors
2015-05-27 21:38:20,515 [Greenshot] INFO - [Greenshot.Helpers.CaptureHelper] Calling destination Upload to Dropbox
2015-05-27 21:38:21,828 [Dropbox Plugin] INFO - [GreenshotPlugin.Core.ImageOutput] Image with format Format24bppRgb has 140062 colors
2015-05-27 21:38:21,828 [Dropbox Plugin] WARN - [GreenshotPlugin.Core.ImageOutput] Using memorystream prevent an issue with saving to a non seekable stream.
2015-05-27 21:38:30,734 [Dropbox Plugin] ERROR - [GreenshotPlugin.Core.NetworkHelper] WebException:
System.Net.WebException: The operation has timed out
at System.Net.HttpWebRequest.GetResponse()
at GreenshotPlugin.Core.NetworkHelper.GetResponseAsString(HttpWebRequest webRequest, Boolean alsoReturnContentOnError)
2015-05-27 21:38:30,765 [Dropbox Plugin] ERROR - [GreenshotPlugin.Core.OAuthSession] Couldn't retrieve response:
System.Net.WebException: The operation has timed out
at System.Net.HttpWebRequest.GetResponse()
at GreenshotPlugin.Core.NetworkHelper.GetResponseAsString(HttpWebRequest webRequest, Boolean alsoReturnContentOnError)
at GreenshotPlugin.Core.OAuthSession.MakeRequest(HTTPMethod method, String requestURL, IDictionary`2 headers, IDictionary`2 parameters, IBinaryContainer postData)
2015-05-27 21:38:30,765 [Dropbox Plugin] ERROR - [GreenshotDropboxPlugin.DropboxUtils] Upload error:
System.Net.WebException: The operation has timed out
at System.Net.HttpWebRequest.GetResponse()
at GreenshotPlugin.Core.NetworkHelper.GetResponseAsString(HttpWebRequest webRequest, Boolean alsoReturnContentOnError)
at GreenshotPlugin.Core.OAuthSession.MakeRequest(HTTPMethod method, String requestURL, IDictionary`2 headers, IDictionary`2 parameters, IBinaryContainer postData)
at GreenshotPlugin.Core.OAuthSession.MakeOAuthRequest(HTTPMethod method, String signUrl, String requestURL, IDictionary`2 headers, IDictionary`2 parametersToSign, IDictionary`2 additionalParameters, IBinaryContainer postData)
at GreenshotDropboxPlugin.DropboxUtils.UploadToDropbox(ISurface surfaceToUpload, SurfaceOutputSettings outputSettings, String filename)
2015-05-27 21:38:30,765 [Dropbox Plugin] ERROR - [GreenshotPlugin.Controls.PleaseWaitForm] invoke error:
System.Net.WebException: The operation has timed out
at System.Net.HttpWebRequest.GetResponse()
at GreenshotPlugin.Core.NetworkHelper.GetResponseAsString(HttpWebRequest webRequest, Boolean alsoReturnContentOnError)
at GreenshotPlugin.Core.OAuthSession.MakeRequest(HTTPMethod method, String requestURL, IDictionary`2 headers, IDictionary`2 parameters, IBinaryContainer postData)
at GreenshotPlugin.Core.OAuthSession.MakeOAuthRequest(HTTPMethod method, String signUrl, String requestURL, IDictionary`2 headers, IDictionary`2 parametersToSign, IDictionary`2 additionalParameters, IBinaryContainer postData)
at GreenshotDropboxPlugin.DropboxUtils.UploadToDropbox(ISurface surfaceToUpload, SurfaceOutputSettings outputSettings, String filename)
at GreenshotDropboxPlugin.DropboxPlugin.<>c_DisplayClass9.<Upload>b_6()
at GreenshotPlugin.Controls.PleaseWaitForm.<>c_DisplayClass2.<ShowAndWait>b_0()
2015-05-27 21:38:30,781 [Greenshot] ERROR - [GreenshotDropboxPlugin.DropboxPlugin] System.Net.WebException: The operation has timed out
at GreenshotPlugin.Controls.PleaseWaitForm.ShowAndWait(String title, String text, ThreadStart waitDelegate)
at GreenshotDropboxPlugin.DropboxPlugin.Upload(ICaptureDetails captureDetails, ISurface surfaceToUpload, String& uploadUrl)

Environment

Windows XP Professional SP3
2Mbps upload

Activity

Show:
Robin Krom
October 5, 2015, 5:34 AM

With Greenshot 1.2.6.12 we increased the general timeout to 100 seconds.
For 2.x we will add a setting to the UI, until then here are the steps to change the timeout:

Assignee

Unassigned

Reporter

David Jagoš

Affects versions

Components

Priority

Major

Labels

None
Configure