Bug 8606 - Poor error reporting in VS updater
Summary: Poor error reporting in VS updater
Status: RESOLVED INVALID
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Android ()
Version: unspecified
Hardware: PC Windows
: Low enhancement
Target Milestone: ---
Assignee: Dominique Louis
URL:
Depends on:
Blocks:
 
Reported: 2012-11-26 18:38 UTC by Jeremy Kolb
Modified: 2016-08-03 15:24 UTC (History)
7 users (show)

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


Attachments
screen shot of error (170.29 KB, image/png)
2012-11-26 18:38 UTC, Jeremy Kolb
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 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 Jeremy Kolb 2012-11-26 18:38:20 UTC
Created attachment 3016 [details]
screen shot of error

Whenever I try to check for updates (VS or MonoDevelop, doesn't matter which version of Xamarin I'm running) I see a stack trace in

System.Xml.XmlTextReaderImpl: "System.xml.XmlException '=' is an unexpected token. The expected token is ';'. Line 42, position 116."

There's nothing in the extension log file and I can't cut and paste the error because it pops up in a dialog box.  This is preventing me from upgrading past 4.2.7.
Comment 1 PJ 2012-11-27 11:58:20 UTC
Hrm. Assigning to mhutch to take a look. It is interesting that the issue would manifest in VS as the VS updater simply links you to the standalone installer. Perhaps there is an issue with the updater data on the server.

4.2.7 is our stable MFA, but it seems like you are trying to use the beta. Here are some options for working around for the MD installer:

1)
rm -rf ~/Library/Caches/XamarinInstaller/*

This will remove the installer cache and might allow the updater to correctly retrieve and display the updates. 

2) 
Install MFA 4.4 beta using the standalone installer:

http://files.xamarin.com/~pjbeaman/mono-android-4.4.5.64600643-1.msi


Note: This beta has a known issue with the installer dialogs (but will not affect the ultimate install). 


Hopefully one of these two options will solve your problem! If not, please be sure to include the full version information from MonoDevelop. Thanks!
Comment 2 Jeremy Kolb 2012-11-27 12:05:30 UTC
I'm on windows so option 1 won't work for me.
Comment 3 PJ 2012-11-27 12:06:38 UTC
Ahh yes sorry, here is the correct folder to remove on Windows:

X:\users\<user_login>\AppData\Local\Temp\MonoForAndroid\downloads
Comment 4 Jeremy Kolb 2012-11-27 12:15:03 UTC
Deleting the folder did not help: I still get the same error.
Comment 5 Jeremy Kolb 2012-11-27 12:15:55 UTC
I removed the MonoForAndroid folder.  The update check did not recreate it.
Comment 6 Jeremy Kolb 2012-11-27 12:18:54 UTC
I tried to launch MonoDevelop and check from there.  I also got an error.  The MonoDevelop log files says:

ERROR [2012-11-27 12:16:59Z]: Error reading framework definition 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETCore\v4.5'
System.Exception: Unknown RuntimeVersion '4.5'
   at MonoDevelop.Core.Assemblies.TargetFramework.FromFrameworkDirectory(TargetFrameworkMoniker moniker, FilePath dir)
   at MonoDevelop.Core.Assemblies.TargetRuntime.ReadTargetFramework(TargetFrameworkMoniker moniker, FilePath directory)
ERROR [2012-11-27 12:16:59Z]: Error reading framework definition 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5'
System.Exception: Unknown RuntimeVersion '4.5'
   at MonoDevelop.Core.Assemblies.TargetFramework.FromFrameworkDirectory(TargetFrameworkMoniker moniker, FilePath dir)
   at MonoDevelop.Core.Assemblies.TargetRuntime.ReadTargetFramework(TargetFrameworkMoniker moniker, FilePath directory)
ERROR [2012-11-27 12:17:00Z]: Error reading framework definition 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5'
System.Exception: Unknown RuntimeVersion '4.5'
   at MonoDevelop.Core.Assemblies.TargetFramework.FromFrameworkDirectory(TargetFrameworkMoniker moniker, FilePath dir)
   at MonoDevelop.Core.Assemblies.TargetRuntime.ReadTargetFramework(TargetFrameworkMoniker moniker, FilePath directory)
ERROR [2012-11-27 12:17:00Z]: Error reading framework definition 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile7'
System.Exception: Unknown RuntimeVersion '4.5'
   at MonoDevelop.Core.Assemblies.TargetFramework.FromFrameworkDirectory(TargetFrameworkMoniker moniker, FilePath dir)
   at MonoDevelop.Core.Assemblies.TargetRuntime.ReadTargetFramework(TargetFrameworkMoniker moniker, FilePath directory)
WARNING [2012-11-27 12:17:06Z]: Error loading welcome page news.
System.Exception: Unexpected child '{http://www.w3.org/1999/xhtml}head'
   at MonoDevelop.Ide.WelcomePage.WelcomePageNewsFeed.LoadNews()
WARNING [2012-11-27 12:17:07Z]: First run content index not found.
ERROR [2012-11-27 12:17:07Z]: Could not retrieve update information
System.Xml.XmlException: '=' is an unexpected token. The expected token is ';'. Line 42, position 116.
   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
   at System.Xml.XmlTextReaderImpl.ThrowUnexpectedToken(String expectedToken1, String expectedToken2)
   at System.Xml.XmlTextReaderImpl.ThrowUnexpectedToken(Int32 pos, String expectedToken1, String expectedToken2)
   at System.Xml.XmlTextReaderImpl.HandleEntityReference(Boolean isInAttributeValue, EntityExpandType expandType, Int32& charRefEndPos)
   at System.Xml.XmlTextReaderImpl.ParseText(Int32& startPos, Int32& endPos, Int32& outOrChars)
   at System.Xml.XmlTextReaderImpl.FinishPartialValue()
   at System.Xml.XmlTextReaderImpl.get_Value()
   at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r)
   at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r, LoadOptions o)
   at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
   at System.Xml.Linq.XDocument.Load(TextReader textReader, LoadOptions options)
   at System.Xml.Linq.XDocument.Load(TextReader textReader)
   at Xamarin.Ide.Updater.UpdateService.ReceivedResponse(IProgressMonitor monitor, HttpWebRequest request, IAsyncResult ar, UpdateLevel level, UpdateInfo[] updateInfos, Action`1 callback)
WARNING [2012-11-27 12:17:07Z]: Error loading welcome page news.
System.Exception: Unexpected child '{http://www.w3.org/1999/xhtml}head'
   at MonoDevelop.Ide.WelcomePage.WelcomePageNewsFeed.LoadNews()
node `classlib-gecko' is not defined on the documentation map
node `classlib-taglib-sharp' is not defined on the documentation map
node `classlib-webkit' is not defined on the documentation map
ERROR [2012-11-27 12:17:14Z]: Error checking for updates
System.Xml.XmlException: '=' is an unexpected token. The expected token is ';'. Line 42, position 116.
   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
   at System.Xml.XmlTextReaderImpl.ThrowUnexpectedToken(String expectedToken1, String expectedToken2)
   at System.Xml.XmlTextReaderImpl.ThrowUnexpectedToken(Int32 pos, String expectedToken1, String expectedToken2)
   at System.Xml.XmlTextReaderImpl.HandleEntityReference(Boolean isInAttributeValue, EntityExpandType expandType, Int32& charRefEndPos)
   at System.Xml.XmlTextReaderImpl.ParseText(Int32& startPos, Int32& endPos, Int32& outOrChars)
   at System.Xml.XmlTextReaderImpl.FinishPartialValue()
   at System.Xml.XmlTextReaderImpl.get_Value()
   at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r)
   at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r, LoadOptions o)
   at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
   at System.Xml.Linq.XDocument.Load(TextReader textReader, LoadOptions options)
   at System.Xml.Linq.XDocument.Load(TextReader textReader)
   at Xamarin.Ide.Updater.UpdateService.ReceivedResponse(IProgressMonitor monitor, HttpWebRequest request, IAsyncResult ar, UpdateLevel level, UpdateInfo[] updateInfos, Action`1 callback)
ERROR [2012-11-27 12:17:14Z]: Error checking for updates
System.Xml.XmlException: '=' is an unexpected token. The expected token is ';'. Line 42, position 116.
   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
   at System.Xml.XmlTextReaderImpl.ThrowUnexpectedToken(String expectedToken1, String expectedToken2)
   at System.Xml.XmlTextReaderImpl.ThrowUnexpectedToken(Int32 pos, String expectedToken1, String expectedToken2)
   at System.Xml.XmlTextReaderImpl.HandleEntityReference(Boolean isInAttributeValue, EntityExpandType expandType, Int32& charRefEndPos)
   at System.Xml.XmlTextReaderImpl.ParseText(Int32& startPos, Int32& endPos, Int32& outOrChars)
   at System.Xml.XmlTextReaderImpl.FinishPartialValue()
   at System.Xml.XmlTextReaderImpl.get_Value()
   at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r)
   at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r, LoadOptions o)
   at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
   at System.Xml.Linq.XDocument.Load(TextReader textReader, LoadOptions options)
   at System.Xml.Linq.XDocument.Load(TextReader textReader)
   at Xamarin.Ide.Updater.UpdateService.ReceivedResponse(IProgressMonitor monitor, HttpWebRequest request, IAsyncResult ar, UpdateLevel level, UpdateInfo[] updateInfos, Action`1 callback)
ERROR [2012-11-27 12:17:15Z]: Error checking for updates
System.Xml.XmlException: '=' is an unexpected token. The expected token is ';'. Line 42, position 116.
   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
   at System.Xml.XmlTextReaderImpl.ThrowUnexpectedToken(String expectedToken1, String expectedToken2)
   at System.Xml.XmlTextReaderImpl.ThrowUnexpectedToken(Int32 pos, String expectedToken1, String expectedToken2)
   at System.Xml.XmlTextReaderImpl.HandleEntityReference(Boolean isInAttributeValue, EntityExpandType expandType, Int32& charRefEndPos)
   at System.Xml.XmlTextReaderImpl.ParseText(Int32& startPos, Int32& endPos, Int32& outOrChars)
   at System.Xml.XmlTextReaderImpl.FinishPartialValue()
   at System.Xml.XmlTextReaderImpl.get_Value()
   at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r)
   at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r, LoadOptions o)
   at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
   at System.Xml.Linq.XDocument.Load(TextReader textReader, LoadOptions options)
   at System.Xml.Linq.XDocument.Load(TextReader textReader)
   at Xamarin.Ide.Updater.UpdateService.ReceivedResponse(IProgressMonitor monitor, HttpWebRequest request, IAsyncResult ar, UpdateLevel level, UpdateInfo[] updateInfos, Action`1 callback)
Comment 7 Jeremy Kolb 2012-11-27 12:40:34 UTC
Weird... I can't upgrade because it's complaining that my license file is messed up even though I bought it two months ago.
Comment 8 PJ 2012-11-27 15:09:08 UTC
That's troubling, though we haven't heard any reports of similar issues that I know of. 

You should definitely contact support@xamarin.com to figure out the license situation, they have all the tools to both assess and correct account/license issues.
Comment 9 Jeremy Kolb 2012-11-27 15:11:34 UTC
Ok the first issue (not the license issue which was also reported by three other people on the mailing list) may be a network configuration problem (my company's proxy).  However some sort of decent error message would be nice.  So I guess this bug can either be closed or moved to an enhancement for some kind of error message.
Comment 10 Jeremy Kolb 2012-11-27 15:12:05 UTC
Also support@xamarin.com is pretty non-responsive.
Comment 11 PJ 2012-11-27 15:52:54 UTC
Marking as enhancement, thanks.

I looked up your case; it's currently in use by one of the support representatives. I tried pinging him but he's also being unresponsive to me. They're usually around a 15m response time, sorry :-/

I'll try to make sure we get info to you ASAP.


Just to check one other thing: 

What makes you say that you can't upgrade? As far as I know the only indicator of an expired license on Windows is non-blocking (you can continue the installer) and appears when it shouldn't (see my note in comment 1 about installer dialogs). If this is what you're experiencing you can ignore it.
Comment 12 Mikayla Hutchinson [MSFT] 2012-11-28 18:02:14 UTC
It looks like your proxy is corrupting the files. For example, in the MD log we get "Error loading welcome page news. System.Exception: Unexpected child '{http://www.w3.org/1999/xhtml}head'". Since the welcome page only should contain <links> and <link> tags and textual content, it seems that the proxy is replacing everything downloaded over HTTP with something else, probably some kind of authentication web page. Perhaps you need to authenticate in a web browser before your internet will work correctly. I really hope it's not using cookies for proxy authentication - that would be extremely difficult to support.

This is probably also breaking the activation system. Support should be able to solve that with an offline activation.

Unfortunately there's not really anything we can do about this problem except to report failure. VS could definitely use better handling of download errors. Reassigning to default since I don't work on VS.