Bug 23628 - Updates to Xamarin Studio corrupt the .app on Mac
Summary: Updates to Xamarin Studio corrupt the .app on Mac
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Updater ()
Version: 5.2
Hardware: PC Mac OS
: High major
Target Milestone: (C7)
Assignee: iain
: 26903 35659 ()
Depends on:
Reported: 2014-10-06 01:31 UTC by Adam Kemp
Modified: 2016-05-19 13:51 UTC (History)
11 users (show)

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

Updater log file (18.85 KB, application/octet-stream)
2014-10-06 01:31 UTC, Adam Kemp

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:

Description Adam Kemp 2014-10-06 01:31:17 UTC
Created attachment 8313 [details]
Updater log file

Several times after using the built in update feature I have ended up with a corrupt Xamarin Studio.app. Each time I deleted the .app, found the .dmg in my Caches folder (~/Library/Caches/XamarinStudio-5.0/), and manually copied it. It works fine after I do that.

I didn't get any errors from the update process. I have attached the log file, which also doesn't seem to have any errors in it. Maybe you can spot something missing.

One thing I can think of that may be different on my machine versus others is that my regular login account is not an admin. When something needs admin privileges I enter the credentials of a separate admin account. Maybe that's confusing it? I don't know.
Comment 1 Saurabh 2014-10-06 09:18:23 UTC
Hi Adam,

I have tried to reproduce this Issue at my end and I am successfully able to use Xamarin Studio which is installed by updater. I am successfully able to create build templates for both iOS and Android.

X.S 5.5 (Build 227)
Git revision: 7b721eeec7a2fa4c4f4de0ecd2aed4dc25edac95

@Adam, Could you please provide me screencast of the problem which you are facing. So that I can also reproduce it at my end?
Comment 2 Adam Kemp 2014-10-06 10:13:27 UTC
This issue only occurs when I update Xamarin Studio. I don't have another update to install at the moment. The screencast wouldn't show much anyway. It looks like the update proceeds normally, but when it's done Xamarin Studio doesn't relaunch. When I go look in Applications the app icon is a generic "application" icon instead of the X icon, and it won't launch.

When I'm home again (this was on my personal laptop) I will try to see if I still have the corrupted .app to attach. I don't know why I didn't think to attach that earlier.
Comment 3 Mikayla Hutchinson [MSFT] 2014-10-06 11:16:53 UTC
It seems to be detaching the disk image before copying files from it:

2014-10-06 00:20:11.600 Xamarin Update[10401:8407] Detaching disk image '/private/tmp/dmg.QSp0OV'
2014-10-06 00:20:11.600 Xamarin Update[10401:8407] /usr/bin/hdiutil detach '/private/tmp/dmg.QSp0OV'
cp: /private/tmp/dmg.QSp0OV/Xamarin Studio.app/Contents/Resources/lib/monodevelop/AddIns/fsharpbinding/FSharp.CompilerBinding.dll: No such file or directory
Comment 4 Adam Kemp 2014-10-07 00:38:43 UTC
In case it's helpful, I've uploaded a .zip of the corrupted .app that was left in my Applications folder after updating:

Comment 5 Adam Kemp 2015-02-01 22:04:16 UTC
I'm still seeing this. I noticed this bug was in the "needinfo" state, which maybe was stopping it from getting any attention. Please take a look at it. It's really annoying to have to manually fix the install every time I update Xamarin Studio.
Comment 6 Adam Kemp 2015-02-11 21:19:00 UTC
Yup, still happens. I think I'll just leave a new comment here every time I update unsuccessfully so that maybe you can share in my pain. ;)
Comment 7 Adam Kemp 2015-03-16 20:09:48 UTC
This still happens.
Comment 8 Adam Kemp 2015-04-15 00:05:32 UTC
I just updated to 5.8.3, and I am happy to say that it worked flawlessly!
Comment 9 Adam Kemp 2015-04-29 22:24:00 UTC
I spoke too soon. Updating to 5.9 I again ended up with a corrupt .app.
Comment 10 Adam Kemp 2015-06-06 18:27:29 UTC
Still happens! Every update.

=== Xamarin Studio ===

Version 5.9.3 (build 1)
Installation UUID: 5262c8cb-ead0-41f7-926c-685725d7430e
	Mono 4.0.1 ((detached/ed1d3ec)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 400010044

=== Xamarin.Android ===

Version: (Business Edition)
Android SDK: /Users/adam/Library/Developer/Xamarin/android-sdk-mac_x86
	Supported Android versions:
		2.3   (API level 10)
		4.0.3 (API level 15)
		4.4   (API level 19)
		5.0   (API level 21)
Java SDK: /usr
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)

=== Xamarin Android Player ===

Version: Unknown version
Location: /Applications/Xamarin Android Player.app

=== Apple Developer Tools ===

Xcode 6.3.1 (7703)
Build 6D1002

=== Xamarin.iOS ===

Version: (Business Edition)
Hash: e6ebd18
Branch: master
Build date: 2015-05-21 21:55:09-0400

=== Xamarin.Mac ===

Not Installed

=== Build Information ===

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

=== Operating System ===

Mac OS X 10.10.3
Darwin varlamov.local 14.3.0 Darwin Kernel Version 14.3.0
    Mon Mar 23 11:59:05 PDT 2015
    root:xnu-2782.20.48~5/RELEASE_X86_64 x86_64
Comment 11 iain 2015-06-12 10:48:47 UTC
Hi Adam,

My name is Iain,  and I'm a member of the Xamarin Studio development team here at Xamarin. I've been looking into this issue over the past few days.

I can see the problem you're having does seem to be related to how you need to enter the details of an admin account to get privileges to install/update. That said, I'm unable to reproduce it here unfortunately, so maybe there's something else on your machine that is subtly different to my test setup here.

I wonder if you would be able to send me an email at iain.holmes@xamarin.com so I can discuss this further with you.

Comment 13 Lluis Sanchez 2015-08-20 04:58:20 UTC
*** Bug 26903 has been marked as a duplicate of this bug. ***
Comment 14 Lluis Sanchez 2015-11-09 06:59:13 UTC
*** Bug 35659 has been marked as a duplicate of this bug. ***
Comment 15 Adam Kemp 2016-01-10 21:08:03 UTC
This happened yet again with the latest update.
Comment 16 Kyle White 2016-01-15 20:05:38 UTC
Since Adam still saw the issue, I am bumping up the milestone so this get's looked at again.
Comment 17 iain 2016-03-15 10:52:07 UTC
Got another possible fix in the pipeline for this
Comment 18 xamarin-release-manager 2016-03-15 18:27:46 UTC
Fixed in version (master)

Author: iain holmes
Commit: 0b2e07894d955f5f656673a622cfd933ba5a98c2 (xamarin/md-addins)
Included in Commit: 2945ef1e5db5acca77b48f10c9ce982273480c3b (mono/monodevelop)
Comment 19 Kyle White 2016-04-20 18:15:31 UTC
@Lluis, looks like this isn't in C7 yet. Iain mentioned there is a PR open for it but hasn't been merged. Looks like it's this one: https://github.com/xamarin/md-addins/pull/94 - been open for about a month.

Do you want to get this in C7? Or should we change the milestone here?
Comment 20 xamarin-release-manager 2016-04-20 23:12:01 UTC
Fixed in version (cycle7)

Author: iain holmes
Commit: 414dc52dac0d8cfd399447ac69c6487c2f6b8b79 (xamarin/md-addins)
Included in Commit: 18774fb2495c1e6479176ff37a44a0886bcb62ed (mono/monodevelop)
Comment 21 xamarin-release-manager 2016-05-02 21:32:45 UTC
Fixed in version (cycle7-android-n)

Author: iain holmes
Commit: 414dc52dac0d8cfd399447ac69c6487c2f6b8b79 (xamarin/md-addins)
Included in Commit: 0ef77f9ba3302af9b11097b9b3747a7bc0416c6c (mono/monodevelop)
Comment 22 Naqeeb 2016-05-19 13:51:05 UTC
I have checked this issue with latest C7 build and observed that it is working fine. Here is the screencast for the same: http://www.screencast.com/t/2YT6npzRKFnE

As of now I am closing this issue. Please feel free to reopen this issue if anyone getting the same behavior.

Environment info: https://gist.github.com/anonymous/8ae1c9a62bc380113d3c7a13d5bb11a3