Bug 31199

Summary: Seeing 'Data unprotection failed.' when attempting to run 'mono NuGet.exe restore'
Product: [Mono] Installers Reporter: Peter Collins <peter.collins>
Component: GeneralAssignee: Alexis Christoforides <lexas>
Status: RESOLVED FIXED    
Severity: normal CC: clancey, kzu, matt.ward, mono-bugs+mono, prashantm, sunilk
Priority: High    
Version: 4.0.0   
Target Milestone: 4.2.0 (C6)   
Hardware: Macintosh   
OS: Mac OS   
See Also: https://bugzilla.xamarin.com/show_bug.cgi?id=38712
Tags: Is this bug a regression?: ---
Last known good build:

Description Peter Collins 2015-06-17 15:19:26 UTC

    
Comment 1 Peter Collins 2015-06-17 15:28:22 UTC
Whoops, submitted before filling this out.

I'm having a difficult time reproducing this, but one wrench environment is consistently failing a NuGet restore with only the message "Data unprotection failed.". Is there a way for me to gather more information from command line when this failure occurs?

The same restoration is working when mono 4.0.0 is installed on this machine, but has started failing on mono 4.2.0-pre-branch runs.

Environment:
OSX 10.9.4
mono-4.2.0-pre-branch / 9542068d4aa9
Comment 2 Matt Ward 2015-06-18 04:44:57 UTC
You should be able to get the full callstack by using the -verbosity argument:

    mono NuGet.exe restore -verbosity detailed
Comment 5 Matt Ward 2015-10-09 04:17:19 UTC
@Prashant - Mono no longer installs a symlink into /usr/bin but puts one in /usr/local/bin. Unfortunately /usr/local/bin is not on the path for GUI applications so running nuget or mono from inside Xamarin Studio will not work currently. I believe there is a fix going into Xamarin Studio to handle this but for now you will have to specify the full path to nuget or mono or just open a terminal window and run the commands from there. In the terminal window /usr/local/bin should be on the path. It may be easier to run the commands from the terminal window since the Package Console Extension on the Mac does not show the output from the command being run.
Comment 8 Sunil Kumar 2015-10-09 11:34:26 UTC
I have checked this issue and now this issue is working fine. To verify this issue I followed the steps mentioned in comment 7. I Observed that I am successfully able to restore the packages (only available from Xamarin's Team City server) from the command line (after clear out the local nuget cache) using Stable Mono 4.0.4.4 and cycle 6 Mono 4.2.1.67. 

Here is the screencast for the same: 
http://www.screencast.com/t/r33HYlmo4N
http://www.screencast.com/t/v3CW4Xdi

Environment info:

=== Xamarin Studio ===

Version 5.10 (build 813)
Installation UUID: 561c7a69-0a91-4bae-ad7c-f0c79d594337
Runtime:
	Mono 4.2.1 (explicit/d8b68fd)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 402010069

=== Xamarin.Profiler ===

Not Installed

=== Xamarin.Android ===

Version: 6.0.0.9 (Trial Edition)
Android SDK: /Users/tajinder/Desktop/android-sdk-macosx
	Supported Android versions:
		2.3    (API level 10)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
		5.1    (API level 22)
		6.0    (API level 23)

SDK Tools Version: 24.4
SDK Platform Tools Version: 23.0.1
SDK Build Tools Version: 23.0.1

Java SDK: /usr
java version "1.7.0_67"
Java(TM) SE Runtime Environment (build 1.7.0_67-b01)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

=== Xamarin Android Player ===

Version: 0.6.1
Location: /Applications/Xamarin Android Player.app

=== Apple Developer Tools ===

Xcode 7.0 (8227)
Build 7A220

=== Xamarin.Mac ===

Version: 2.4.0.80 (Starter Edition)

=== Xamarin.iOS ===

Version: 9.2.0.85 (Trial Edition)
Hash: 7bcf0da
Branch: master
Build date: 2015-10-05 17:54:02-0400

=== Build Information ===

Release ID: 510000813
Git revision: 388e41428fb8f2910833c87fec0e7edaccd4f436
Build date: 2015-10-05 12:26:38-04
Xamarin addins: f21b254b56b36e417daee6da8b0300076f286ef1
Build lane: monodevelop-lion-cycle6

=== Operating System ===

Mac OS X 10.10.5
Darwin Tajinders-iMac.local 14.5.0 Darwin Kernel Version 14.5.0
    Wed Jul 29 02:26:53 PDT 2015
    root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64
Comment 9 James Clancey 2016-03-01 09:40:57 UTC
My build server works great on the current stable 4.2 release, but if I switch to the current Alpha, 4.3 This error shows up for me during Nuget install.

Also, I am not using any nuget.config files or private nuget feeds
Comment 10 Matt Ward 2016-03-01 09:50:40 UTC
Bug #38712 is being used to track the problem in Mono 4.3.
Comment 11 Daniel Cazzulino 2016-03-23 14:59:49 UTC
I'm on XS alpha channel and have this issue too, just like Clancey.
Comment 12 James Clancey 2016-04-13 17:26:38 UTC
This is broken in Mono 4.4.0.122 that was released to the alpha channel.
Comment 13 Peter Collins 2016-04-13 17:35:33 UTC
Indeed, it's still broken in Alpha (and Beta now). It's been known for roughly two months now and is being tracked in Bug #38712.