Bug 38495 - Deployment failed. Insufficient space on device.
Summary: Deployment failed. Insufficient space on device.
Status: RESOLVED INVALID
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Android Add-in ()
Version: 5.10 (C6SR3)
Hardware: PC Windows
: Normal normal
Target Milestone: master
Assignee: Greg Munn
URL:
Depends on:
Blocks:
 
Reported: 2016-02-05 15:26 UTC by Miha Markic
Modified: 2016-02-05 17:48 UTC (History)
2 users (show)

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


Attachments
Help logs (4.87 KB, application/x-rar)
2016-02-05 16:56 UTC, Miha Markic
Details
install log (56.07 KB, text/plain)
2016-02-05 17:04 UTC, Miha Markic
Details
Help logs showing the error (4.64 KB, application/x-rar)
2016-02-05 17:07 UTC, Miha Markic
Details
Not a problem, diagnostic log (249.58 KB, application/x-rar)
2016-02-05 17:16 UTC, Miha Markic
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 INVALID

Description Miha Markic 2016-02-05 15:26:10 UTC
Sometimes after Rebuild solution and then Start debugging I'm getting the error below when deploying to Nexus 6 device. (there are more than 3GB free on device).
On subsequent Start debugging the debugger starts normally.


Detecting installed packages

Installing application on device

Deployment failed because there was insufficient space on the device to install the package. Please make space and try again.

Deployment failed. Insufficient space on device.
Comment 1 David Karlaš 2016-02-05 15:37:07 UTC
Can you run "adb shell df" thank you
Comment 2 Miha Markic 2016-02-05 15:38:32 UTC
Filesystem               Size     Used     Free   Blksize
/dev                     1.4G    56.0K     1.4G   4096
/sys/fs/cgroup           1.4G    12.0K     1.4G   4096
/mnt                     1.4G     0.0K     1.4G   4096
/system                  1.9G     1.9G    14.9M   4096
/cache                 248.0M   224.0K   247.8M   4096
/firmware              106.2M    60.2M    46.1M   4096
/persist               928.0K   228.0K   700.0K   4096
/fsg                   797.0K   793.0K     4.0K   1024
/storage                 1.4G     0.0K     1.4G   4096
/data                   26.0G    22.1G     3.9G   4096
/su                     27.5M     1.1M    26.4M   4096
/system/xbin            27.5M     1.1M    26.4M   4096
/mnt/runtime/default/emulated: Permission denied
/storage/emulated       26.0G    22.1G     3.9G   4096
/mnt/runtime/read/emulated: Permission denied
/mnt/runtime/write/emulated: Permission denied
Comment 3 Miha Markic 2016-02-05 16:29:42 UTC
Update.
It does happen even if I reboot the device.
It doesn't happen when running in emulator (MS Android Emulator, Android 6.0.0).
Nexus 6 runs the latest Android.
Comment 4 Greg Munn 2016-02-05 16:53:52 UTC
Can you get the android logs (Help | Open Log directory) please. 

Also, from terminal try `xbuild /t:install > install.log' from within your project folder and attach the resultant install.log file.
Comment 5 Greg Munn 2016-02-05 16:54:58 UTC
Sorry, just saw that this was windows, use 'msbuild' instead of 'xbuild'
Comment 6 Miha Markic 2016-02-05 16:56:56 UTC
Created attachment 14919 [details]
Help logs
Comment 7 Greg Munn 2016-02-05 16:59:42 UTC
You might need to try to deploy again, that log doesn't contain any logs from a deployment - a new log file is created each time XS is started.
Comment 8 Miha Markic 2016-02-05 17:04:48 UTC
Created attachment 14920 [details]
install log

This one shows Insufficient space :)
Comment 9 Miha Markic 2016-02-05 17:07:53 UTC
Created attachment 14921 [details]
Help logs showing the error
Comment 10 Greg Munn 2016-02-05 17:12:11 UTC
Thanks Miha, sorry to ask this, but could you do the /t:install again but I need you to have diagnostic output on.

   msbuild /t:install /v:diag
Comment 11 Miha Markic 2016-02-05 17:16:11 UTC
Created attachment 14922 [details]
Not a problem, diagnostic log
Comment 12 Greg Munn 2016-02-05 17:19:46 UTC
>  TASK: Push bin\Debug\com.aioss.aps.android-Signed.apk : /data/local/tmp/com.aioss.aps.android-Signed.apk completed?:Completed (TaskId:1282)
>  DEBUG: RunShellCommand:ZX1G4256JM pm install "/data/local/tmp/com.aioss.aps.android-Signed.apk" (TaskId:1282)
>  TASK: InstallPackage pm install "/data/local/tmp/com.aioss.aps.android-Signed.apk" completed?:	pkg: /data/local/tmp/com.aioss.aps.android-Signed.apk
>  Failure [INSTALL_FAILED_INSUFFICIENT_STORAGE... (TaskId:1282)

I don't know why, but we're getting INSTALL_FAILED_INSUFFICIENT_STORAGE returned from `pm install`

what size is `bin\Debug\com.aioss.aps.android-Signed.apk` on disk?
Comment 13 Miha Markic 2016-02-05 17:22:00 UTC
It is mere 2.436KB. I'll try "pm install" directly.
Comment 14 Miha Markic 2016-02-05 17:24:54 UTC
Indeed, adb install ...apk yields
Failure [INSTALL_FAILED_INSUFFICIENT_STORAGE]
first time. Second time it is a success.
Weird but obviously not Xamarin bug.
Comment 15 Greg Munn 2016-02-05 17:31:49 UTC
yes, very odd. I'm sorry I can't really resolve this for you.
Comment 16 Miha Markic 2016-02-05 17:48:40 UTC
Don't be. You helped a ton.
Digging further I've found out that if I uninstall package using "adb uninstall -k package" it will deploy without problems.
But if I uninstall it with "pm uninstall -k package" then it will fail the first time. Go figure.