Bug 59054 - First launch: give better error than "Something went wrong / Connection is closed"
Summary: First launch: give better error than "Something went wrong / Connection is cl...
Status: CONFIRMED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Xamarin.Forms Previewer ()
Version: 4.7.0 (15.4)
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-08-25 20:15 UTC by Bret Johnson [MSFT]
Modified: 2017-08-29 16:48 UTC (History)
3 users (show)

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


Attachments
Screenshot (1.89 KB, image/png)
2017-08-25 20:15 UTC, Bret Johnson [MSFT]
Details
Logs (4.04 KB, application/x-zip-compressed)
2017-08-29 16:47 UTC, Bret Johnson [MSFT]
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 for Bug 59054 on Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.
Related Links:
Status:
CONFIRMED

Description Bret Johnson [MSFT] 2017-08-25 20:15:32 UTC
Created attachment 24430 [details]
Screenshot

Do File / New Project to create a Forms app, say with the master/detail template.
Double click on the XAML file and show the Forms Preview.

Result:
Shows this error on the previewer surface (for Android):
   "Something went wrong

    Connection is closed"

Expected:
Give a better error here.


Since this is a common & first impression scenario, let's show a better error. The current message makes it seem like a bug.

The preview does work after building the project.

If we're sure that building is the issue, then let's show something like "Project not built / Build your project first for the preview to display". And don't make that an error (no red x icon); it's more of an informational message.

If we're not sure of the cause, then let's show something like "Could not connect to previewer. Ensure the project is built.".
Comment 1 Bret Johnson [MSFT] 2017-08-25 20:19:11 UTC
Update: Later I saw that we do have an explicit error message that says the project needs to be built. But curiously I only saw that AFTER I tried to build it.  So there's a bug there--that message should show up more often.
Comment 2 Prashant [MSFT] 2017-08-28 06:55:53 UTC
Thanks so much for taking the time to submit this report! I can confirm using the latest Visual Studio 2017 Preview version 15.4 I am able to reproduce this issue. Marking this report as CONFIRMED. 

# Version information

Microsoft Visual Studio Enterprise 2017 Int Preview (DF)
Version 15.4.0 Preview 1.0 [26823.1.d15rel]
VisualStudio.15.IntPreview/15.4.0-pre.1.0+26823.1.d15rel
Microsoft .NET Framework
Version 4.7.02046

Installed Version: Enterprise

Xamarin   4.8.0.216 (f2c49ad)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android SDK   7.5.0.3 (3e66e8e)
Xamarin.Android Reference Assemblies and MSBuild support.

Xamarin.iOS and Xamarin.Mac SDK   10.13.0.36 (f30f76a)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.
Comment 4 Bret Johnson [MSFT] 2017-08-29 16:47:38 UTC
Created attachment 24458 [details]
Logs
Comment 5 Bret Johnson [MSFT] 2017-08-29 16:48:43 UTC
It's 15.4 preview 1. I attached logs.