Bug 53891 - Xamarin Forms Previewer does not show Exception details in case of an error.
Summary: Xamarin Forms Previewer does not show Exception details in case of an error.
Status: VERIFIED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Xamarin.Forms Previewer ()
Version: 4.3.0 (C9)
Hardware: PC Windows
: High major
Target Milestone: 15.1
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-03-24 09:55 UTC by Heinrich Moser
Modified: 2017-03-31 11:29 UTC (History)
3 users (show)

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


Attachments
Screenshot (17.76 KB, image/png)
2017-03-24 09:55 UTC, Heinrich Moser
Details
IDE logs (1.56 KB, application/octet-stream)
2017-03-24 10:36 UTC, Heinrich Moser
Details
Contains iOS and Android designer Screenshots (39.67 KB, application/x-zip-compressed)
2017-03-31 11:29 UTC, Gaurav Ganorkar
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:
VERIFIED FIXED

Description Heinrich Moser 2017-03-24 09:55:30 UTC
Created attachment 20783 [details]
Screenshot

Repro (on my machine)
=====================

1. Start Visual Studio 2017 Professional (with no updates pending, that is VS 15.0.0+26228.9 and Xamarin 4.3.0.784 (73f58d6) at the moment).
2. Create a new solution from the "C#/Cross-Platform/Cross Platform App (Xamarin.Forms or Native)" template, using .NET 4.5.2.
3. Delete the iOS project.
4. Open MainPage.xaml in the Forms project.
5. View/Other Windows/Forms previewer.

Expected result
===============

A preview of the XAML page appears. If the preview cannot be shown, an error message appears giving me further details about the problem.

Actual result
=============

See attached screenshot: "System.Exception was thrown. Failed to render Android XAML preview". Neither the exception message nor the stack trace is shown.

Note
====

This bug report is not about the previewer not working on my machine. It's about the previewer not showing useful debugging information in case of an error, thus preventing me from filing a useful bug report about the underlying issue.
Comment 1 Alan McGovern 2017-03-24 10:22:35 UTC
What you're seeing there is the fallback error when the only thing that we can detect has gone wrong is that the image was not generated. This case *should* not ever be hit, which is why there's no useful information.

Would you be able to attach the logs from the session where you triggered this error message? Perhaps we'll see something useful there which will help us provide a more informative message in the future!
Comment 2 Heinrich Moser 2017-03-24 10:36:51 UTC
Created attachment 20785 [details]
IDE logs

Ah, that makes sense then. Thanks for looking into this. I've attached everything from %LOCALAPPDATA%\Xamarin\Logs; if you need anything else, just say so.
Comment 3 Alan McGovern 2017-03-24 10:46:16 UTC
Unsurprisingly the logs are pretty much empty as well.

One thing I did notice is that you're using Visual Studio 2017. We did have an installation issue with it, which is already fixed and being prepped for release, which may be the root cause of the issue you're seeing. Can you try installing just the Android component of our stable installer here, https://dl.xamarin.com/XamarinforVisualStudio/Windows/Xamarin.VisualStudio_4.3.0.789.msi . You do not need to install the Visual Studio extensions, so do uncheck those if they are checked. Let us know if that helps/doesn't help!
Comment 4 Heinrich Moser 2017-03-24 10:58:52 UTC
Yes, that fixed it, thanks a lot for your help!

(I don't know which close reason is appropriate in this case (probably DUPLICATE of the issue you mentioned?), so I'll leave that to you.)
Comment 5 Alan McGovern 2017-03-24 11:13:37 UTC
I'll just mark it as resolved to make sure we triple-check this scenario before our next release.

Thanks for the quick confirmation!
Comment 6 Alan McGovern 2017-03-24 11:16:32 UTC
Note to whoever verifies this bug: Can we make sure we have a clean system and then only install VS2017 to make sure the first-run is still good with our 15.1 (and newer) releases!

Thanks!
Comment 7 Gaurav Ganorkar 2017-03-31 11:28:20 UTC
Verified on 
Microsoft Visual Studio Enterprise 2017
Version 15.0.26228.12 D15RTWSVC
Microsoft .NET Framework
Version 4.6.01586

Installed Version: Enterprise

Xamarin   4.3.0.795 (aece090)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android SDK   7.1.0.43 (3a62f1e)
Xamarin.Android Reference Assemblies and MSBuild support.

Xamarin.iOS and Xamarin.Mac SDK   10.6.0.9 (a05f40e)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.

Error message is displayed as attached in the attachment named FormsPreviewer (1)
Comment 8 Gaurav Ganorkar 2017-03-31 11:29:32 UTC
Created attachment 21096 [details]
Contains iOS and Android designer Screenshots