Bug 17172 - Not valid Base-64 string Error creating or opening existing C# Android solutions
Summary: Not valid Base-64 string Error creating or opening existing C# Android solutions
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Project Model ()
Version: 4.2.x
Hardware: PC Windows
: High normal
Target Milestone: master
Assignee: Lluis Sanchez
URL:
Depends on:
Blocks:
 
Reported: 2014-01-10 11:00 UTC by W
Modified: 2014-02-20 05:07 UTC (History)
2 users (show)

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


Attachments
Version Info And Two IDE Logs (22.05 KB, application/octet-stream)
2014-01-10 11:00 UTC, W
Details
Log file 1 from MSBuild.exe (1.65 KB, text/plain)
2014-01-13 08:00 UTC, W
Details
New Logs after replacing MonoDevelop.Projects.Formats.MSBuild.exe (21.54 KB, application/octet-stream)
2014-01-13 14:01 UTC, W
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 W 2014-01-10 11:00:38 UTC
Created attachment 5810 [details]
Version Info And Two IDE Logs

When I attempt to create a new C# Android solution or open an existing C# Android solution (including the downloaded HelloWorld example) in Xamarin Studio, I receive an error "The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters." in the IDE log.  This error prevents me from being able to clean or build any C# Android solutions.

Michael Hutchinson from the Xamarin Studio support forum directed me to submit a bug on this after I submitted a copy of the IDE log to him.  He suspects the problem to be with establishing a connection to the MSBuild builder processes.

I am running Xamarin Studio V4.2.2 (Build 2) with Xamarin Android V4.10.1 (Starter Edition) on Windows 7 Professional SP1 (64 bit).  I also tried a fresh install on a new Windows 7 Home Edition SP1 (64 bit) machine, and it has the same problems.

An excerpt from the log showing the error is:
ERROR [2014-01-09 09:47:43Z]: Error while getting assembly references
System.FormatException: The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters. 
   at System.Convert.FromBase64_Decode(Char* startInputPtr, Int32 inputLength, Byte* startDestPtr, Int32 destLength)
   at System.Convert.FromBase64CharPtr(Char* inputPtr, Int32 inputLength)
   at System.Convert.FromBase64String(String s)
   at MonoDevelop.Projects.Formats.MSBuild.MSBuildProjectService.GetProjectBuilder(TargetRuntime runtime, String toolsVersion, String file)

I have attached a text file containing the following:
1.  The full version information from the Xamarin Studio Help -> About page
2.  The contents of an IDE log file when I created a new blank C# Android solution
3.  The contents of an IDE log file when I opened the C# Android HelloWorld solution

Let me know if you need any more information or need me to try something.

I appreciate your help!

W
Comment 1 Lluis Sanchez 2014-01-13 07:44:52 UTC
Please, try the following:

Open a console and cd to the following directory:

C:\Program Files\Xamarin Studio\bin\MSBuild\dotnet.4.0>

Now run this command:

echo 1 | MonoDevelop.Projects.Formats.MSBuild.exe 2> %USERPROFILE%/Documents/log1.txt > %USERPROFILE%/Documents/log2.txt

This will generate the log1.txt and log2.txt files in your Documents folder. Please attach the files you get to this bug report.
Comment 2 W 2014-01-13 08:00:31 UTC
Created attachment 5821 [details]
Log file 1 from MSBuild.exe
Comment 3 W 2014-01-13 08:02:40 UTC
Lluis,

I ran the command and attached log1.txt to this case.  Log2.txt was empty (zero bytes), so I did not attach it.

Thank you for your help and let me know what else I can do to help bring this to resolution.

W
Comment 4 Lluis Sanchez 2014-01-13 13:19:36 UTC
I have a replacement assembly for you to try:

https://dl.dropboxusercontent.com/u/492982/MonoDevelop.Projects.Formats.MSBuild.exe

Could you please replace the assembly in c:\Program Files\Xamarin Studio\bin\MSBuild\dotnet.4.0 and see if that fixes the problem? Make a copy of the old assembly before replacing it, just in case.
Comment 5 W 2014-01-13 14:01:07 UTC
Created attachment 5824 [details]
New Logs after replacing MonoDevelop.Projects.Formats.MSBuild.exe

Lluis,

I saved the original MonoDevelop.Projects.Formats.MSBuild.exe file and put the new one in its place, and now the Base-64 error is gone, but I am getting an Error while getting assembly references
System.Runtime.Remoting.RemotingException: 2 arguments were passed to 'MonoDevelop.Projects.Formats.MSBuild.IBuildEngine::LoadProject'. 3 arguments were expected by this method.

The attached log file shows the same error occurring when creating a new project and when opening an existing project.

W
Comment 6 Lluis Sanchez 2014-01-13 15:16:38 UTC
You said you have the same issue in a fresh install of Windows 7. However, I'm wondering if you enabled any kind of logging option in Windows, or if you are using any error diagnostic tool.

The issue is caused by the "Error: Cannot initialize OLE" message being logged in the output of the MonoDevelop.Projects.Formats.MSBuild.exe app, and this error is not logged by the app, but by the .NET or COM runtime. It is the first time this issue is reported, so I'm wondering what's special in your Windows configuration that could cause this.
Comment 7 W 2014-01-14 17:11:37 UTC
Lluis,

Your question got me thinking, and I found the problem.  My kids use both of the machines with Xamarin studio installed, and I had installed NetNanny parental control software on them to control their internet usage.

I uninstalled Net Nanny and reverted to the original MonoDevelop.Projects.Formats.MSBuild.exe and the problem went away, I am now able to successfully load, build, and clean C# Android solutions.

So I would consider this one resolved.  I will update my post in the forum to indicate that NetNanny is the cause of the problem.

Thanks so much for all your help, I greatly appreciate it.

W
Comment 8 Lluis Sanchez 2014-02-20 05:07:04 UTC
Closing.