Bug 30847 - Error on Publishing to Google Play (Task Cancelled at Google.Apis.Upload.ResumableUpload`1.<UploadAsync>d__0.MoveNext())
Summary: Error on Publishing to Google Play (Task Cancelled at Google.Apis.Upload.Resu...
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Android Add-in ()
Version: 5.9
Hardware: PC Windows
: Normal normal
Target Milestone: 5.10 (C6)
Assignee: Greg Munn
URL:
: 31808 ()
Depends on:
Blocks:
 
Reported: 2015-06-05 11:25 UTC by Christopher Drosos
Modified: 2015-10-15 14:25 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
IDE Log (35.80 KB, application/octet-stream)
2015-06-05 11:25 UTC, Christopher Drosos
Details
AndroidTools (20.69 KB, application/octet-stream)
2015-06-05 11:26 UTC, Christopher Drosos
Details
Components (541 bytes, application/octet-stream)
2015-06-05 11:26 UTC, Christopher Drosos
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Christopher Drosos 2015-06-05 11:25:19 UTC
I cannot Upload to Android Store, i get Task Cancelled:
Xamarin Version 5.9.3 b1
Comment 1 Christopher Drosos 2015-06-05 11:25:49 UTC
Created attachment 11482 [details]
IDE Log
Comment 2 Christopher Drosos 2015-06-05 11:26:17 UTC
Created attachment 11483 [details]
AndroidTools
Comment 3 Christopher Drosos 2015-06-05 11:26:32 UTC
Created attachment 11484 [details]
Components
Comment 4 Christopher Drosos 2015-06-05 11:28:15 UTC
Publishing to Ad Hoc works and the apk is uploaded to Google Play successfully
Comment 5 Christopher Drosos 2015-06-05 11:31:51 UTC
=== Xamarin Studio ===

Version 5.9.3 (build 1)
Installation UUID: 9d3a0355-f416-4968-8bf9-39ecf2392823
Runtime:
	Microsoft .NET 4.0.30319.34209
	GTK+ 2.24.22 (MS-Windows theme)
	GTK# 2.12.26

=== Xamarin.Android ===

Version: 5.1.3 (Business Edition)
Android SDK: C:\Program Files (x86)\Android\android-sdk
	Supported Android versions:
		2.3   (API level 10)
		4.0.3 (API level 15)
		4.1   (API level 16)
		4.4   (API level 19)
		5.0   (API level 21)
Java SDK: C:\Program Files\Java\jdk1.8.0_31
java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)

=== Xamarin Android Player ===

Version: 0.3.7.2
Location: C:\Program Files\Xamarin Android Player\DeviceManager.exe

=== Build Information ===

Release ID: 509030001
Git revision: 5a524e1726ed103fdd4fe37e0356f2b35466ce9d
Build date: 2015-06-02 16:19:11-04
Xamarin addins: 51957cfbd06be911b212671ad05c2c6221ac90f9

=== Operating System ===

Windows 6.2.9200.0 (64-bit)
Comment 6 Greg Munn 2015-06-11 12:30:48 UTC
Christopher, I'm not sure what's causing the task to be cancelled, except to say that's it's during the package upload process and appears to be originating from within the Google Api - we are not triggering a cancellation of the task.

I know it sounds trite, but have you considered if there is any anti-virus that could be interfering with the upload?
Comment 7 Christopher Drosos 2015-06-11 12:38:44 UTC
Im using only the windows defender of Windows 8.1 and UAC is disabled. i will try with windows defender dsabled too and i will post again
Comment 8 Christopher Drosos 2015-06-11 13:07:50 UTC
with windows defender and firewall disabled i still get a task was cancelled
Comment 9 Greg Munn 2015-06-11 13:20:09 UTC
Thanks for trying that anyway.  I'll have to see if there is something else I can suggest, and will keep looking into it.
Comment 10 Greg Munn 2015-06-11 14:26:46 UTC
It seems that the upload is timing out - the chunk size default is 10MB and it looks like it's timing out after ~1.5 - 2 minutes.

INFO [2015-06-05 17:37:51Z]: Uploading 'C:\Users\Exoskeletor\AppData\Local\Xamarin\Mono for INFO [2015-06-05 17:37:51Z]: -- Track Production, Rollout 5, Version Code 6
ERROR [2015-06-05 17:39:35Z]: Error uploading 'com.cdrosos.greekIslandsWallpapers.apk'

What can you tell me about your network location and speed? We either need to increase the timeout or reduce the chunk size and it would be good to know what sort of speeds you are getting outbound on your network.

Cheers.
Comment 11 Greg Munn 2015-06-11 15:20:59 UTC
I've added a means to configure the chunk size, so hopefully we will be able to find a value that will work for you.
Comment 12 Greg Munn 2015-06-11 15:29:02 UTC
On Windows 8.1, 

c:\Users\<username>\AppData\Roaming\XamarinStudio-5.0\Config\MonoDevelopProperties.xml 

add a value

  <Property key="Publishing.Google.Apis.Upload.ChunkSize" value="<new chunk size>" />

this value needs to be a multiple of 256 and the default is 10485760 (10MB), so maybe start with 5242880 (5MB) and see if that makes it better.
Comment 13 xamarin-release-manager 2015-06-11 15:32:12 UTC
Fixed in version 5.10.0.128 (master)
Comment 14 Christopher Drosos 2015-06-11 15:32:54 UTC
So 10mb in 120 seconds is about 83.3kB/s right?
My speed is about 700kB/s Down and 65-70kB/s Up.
I am from Greece and this is reality for many of us
http://www.netindex.com/download/2,22/Greece/
VDSL coverage is about 30% and is raising about 10% per year.
Also what if im uploading something else like a .torrent when i am uploading to
Google Play? 
In order to support bad ADSL connections i guess it should be configured to
about 25-30kB/s so what about setting the chunk size to about 3-4MB?

I will try with that and report again.
Cheers
Comment 15 Greg Munn 2015-06-11 15:44:00 UTC
Thanks for the figures, I'd be really interested in hearing what works for you once you get the update. I'm going to see if I can also get this patch in the next service release so you don't have to wait as long.
Comment 16 Greg Munn 2015-07-13 10:22:51 UTC
*** Bug 31808 has been marked as a duplicate of this bug. ***
Comment 17 xamarin-release-manager 2015-07-16 12:34:42 UTC
Fixed in version 5.9.6.3 (monodevelop-5.9-branch)

Author: Greg Munn
Commit: 1e8296e2008e83c4f14c4b0febc480fd485310e0 (xamarin/md-addins)
Included in Commit: d4c8d80ed1842bea9a9a0b2f7e64dae58d18807a (mono/monodevelop)
Comment 18 xamarin-release-manager 2015-07-16 14:31:05 UTC
Fixed in version 5.9.5.6 (monodevelop-5.9-branch-c5sr3)

Author: Greg Munn
Commit: 6571e3228ff9e432a98b468630ec5ffd35f2f6b3 (xamarin/md-addins)
Included in Commit: c50b1022a6b36f9b2a55beb7814b87811d1dba52 (mono/monodevelop)
Comment 19 Greg Munn 2015-07-24 13:41:46 UTC
@Christopher, it looks like the fix for this was released. (v5.9.5.6)

1. Quit XS
2. Edit this file
c:\Users\<USER>\AppData\Roaming\XamarinStudio-5.0\Config\MonoDevelopProperties.xml

3. Add this property

<Property key="Publishing.Google.Apis.Upload.ChunkSize" value="1048576" />

10485760 is the default value of 10MB, I had someone try out various values and they reported that 1048576 worked for them with an upload speed of 0.61MBs.

4. Restart XS
5. Upload something to Google Play

If you have the same issue, repeat with a lower value. You can try any value as long as it's a multiple of 256. 1048576 = 1042 * 1042 = 1MB.  You need to close XS before changing the value as XS writes out the settings on exit and will overwrite your changes.

Let me know how you go.
Comment 20 xamarin-release-manager 2015-08-27 17:38:35 UTC
Fixed in version 5.9.5.18 (monodevelop-5.9-branch-android-m-preview)

Author: Greg Munn
Commit: 6571e3228ff9e432a98b468630ec5ffd35f2f6b3 (xamarin/md-addins)
Included in Commit: f0797c7e4d51bab04f182ac89175dfaf2c44060d (mono/monodevelop)
Comment 21 Christopher Drosos 2015-09-06 17:04:48 UTC
i have just test this in 5.9.5, works like a charm :)
Comment 22 Greg Munn 2015-09-08 10:13:21 UTC
@Christopher, Glad to hear it. I made 1MB the default value, so you shouldn't need to re-set the default in the future (re-installs etc).
Comment 23 Christopher Drosos 2015-09-08 10:18:55 UTC
I try with the default value on 5.9.5 and it works for a small App of 4mb but i didnt have much feedback as fas as i remember (from 5% to 100%).
This would be great, thanks
Comment 24 xamarin-release-manager 2015-09-22 15:47:14 UTC
Fixed in version 5.9.7.20 (monodevelop-5.9-branch-android-m-preview)

Author: Greg Munn
Commit: 1e8296e2008e83c4f14c4b0febc480fd485310e0 (xamarin/md-addins)
Included in Commit: 817fca74c873a2298a349315f88128439edd5d6a (mono/monodevelop)
Comment 25 xamarin-release-manager 2015-10-15 14:25:54 UTC
Fixed in version 5.9.6.23 (monodevelop-5.9-branch)

Author: Greg Munn
Commit: 6571e3228ff9e432a98b468630ec5ffd35f2f6b3 (xamarin/md-addins)
Included in Commit: cc4cd949960c4fc9864b0d36bd3bc1b9fcf14834 (mono/monodevelop)