Bug 22031 - Add Packages dialog shows no errors for All Sources when network disconnected
Summary: Add Packages dialog shows no errors for All Sources when network disconnected
Status: CONFIRMED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: NuGet ()
Version: 5.2
Hardware: PC Windows
: Low normal
Target Milestone: master
Assignee: Matt Ward
URL:
Depends on:
Blocks:
 
Reported: 2014-08-12 06:16 UTC by Matt Ward
Modified: 2014-10-29 07:42 UTC (History)
1 user (show)

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

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 22031 on Developer Community or GitHub 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 or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
CONFIRMED

Description Matt Ward 2014-08-12 06:16:51 UTC
To reproduce:

1) Setup two online NuGet package sources for example https://www.nuget.org/api/v2/ and https://www.myget.org/F/scriptcsnightly/
2) Make sure these are the only two enabled in Preferences - Packages - Sources
3) With a working network connection open the Add Packages dialog and select All Sources.
4) Wait for packages to be returned successfully.
5) Start a search and disconnect the network connection before results are returned.

Expected result:

Warnings/errors from each package source are shown at the top of the packages list.


Actual result:

After a period of time the Add Packages dialog shows a message saying no packages found, but no errors are seen.


This was reproduced on Windows but the behaviour is similar on the Mac.

Note that Visual Studio has the ame behaviour as Xamarin Studio here. So the problem seems to be with NuGet itself.
Comment 1 Matt Ward 2014-08-12 06:24:51 UTC
Debugging NuGet what happens is that the errors are reported by the internal AggreqateQuery class:

https://github.com/mrward/nuget/blob/2.8.1-monodevelop/src/Core/Repositories/AggregateQuery.cs#L254

Currently the logger is the NullLogger here. Xamarin Studio should at least log these errors to its log file.

The exceptions are not passed to its parent AggregateRepository. The AggregateRepository currently holds a list of failing repositories and is used by Xamarin Studio to report the warnings/errors after the search completes.

One possibility here is to pass a special ILogger to the AggregateQuery which will record all the warnings logged. The MonoDevelopAggregateRepository class could then use this to report the warnings to the Add Packages dialog.
Comment 2 Arpit Jha 2014-10-29 05:24:55 UTC
We have checked this issue with the help of bug description and observed that getting an error message when disconnect the network before return the search result of nuget package.

Screencast regarding Same:
http://www.screencast.com/t/Mc4I0CyP


Let me know if I missed anything to reproduce it?

Environment Info:
=== Xamarin Studio ===

Version 5.5.3 (build 6)
Installation UUID: b5156fb6-e8d3-47e2-b3a5-0925a4054ffd
Runtime:
	Microsoft .NET 4.0.30319.34003
	GTK+ 2.24.22 (MS-Windows theme)
	GTK# 2.12.25

=== Xamarin.Android ===

Version: 4.18.0 (Business Edition)
Android SDK: D:\android-sdk
	Supported Android versions:
		1.6    (API level 4)
		2.1    (API level 7)
		2.2    (API level 8)
		2.3    (API level 10)
		3.0    (API level 11)
		3.1    (API level 12)
		4.0    (API level 14)
		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)
Java SDK: C:\Program Files\Java\jdk1.6.0_39
java version "1.6.0_39"
Java(TM) SE Runtime Environment (build 1.6.0_39-b04)
Java HotSpot(TM) 64-Bit Server VM (build 20.14-b01, mixed mode)

=== Build Information ===

Release ID: 505030006
Git revision: fbe3e9453daf6a3bb9a9709ed22bec35f7c9056b
Build date: 2014-10-23 13:11:11-04
Xamarin addins: e44add2b39de4dd57c0742bb2e620dfad84c64c6

=== Operating System ===

Windows 6.2.9200.0 (64-bit)
Comment 3 Matt Ward 2014-10-29 06:13:40 UTC
In the screencast "All Sources" was not selected in the Add Packages dialog. This problem should occur when All Sources is selected.
Comment 4 Arpit Jha 2014-10-29 07:42:09 UTC
We have checked the issue and able to reproduce with the help of comment3 and observed that When All source is Selected in dropdown not getting an error message when disconnect the network before return the search result of nuget package, getting a message of "No Matching package found".

Note: Similar getting  "No Matching package found" when network is disconnected and trying to add a package.

Screencast reagrding Same:
http://www.screencast.com/t/0d6yq81GfAt

Environment Info:
Environment Info:
=== Xamarin Studio ===

Version 5.5.3 (build 6)
Installation UUID: b5156fb6-e8d3-47e2-b3a5-0925a4054ffd
Runtime:
    Microsoft .NET 4.0.30319.34003
    GTK+ 2.24.22 (MS-Windows theme)
    GTK# 2.12.25

=== Xamarin.Android ===

Version: 4.18.0 (Business Edition)
Android SDK: D:\android-sdk
    Supported Android versions:
        1.6    (API level 4)
        2.1    (API level 7)
        2.2    (API level 8)
        2.3    (API level 10)
        3.0    (API level 11)
        3.1    (API level 12)
        4.0    (API level 14)
        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)
Java SDK: C:\Program Files\Java\jdk1.6.0_39
java version "1.6.0_39"
Java(TM) SE Runtime Environment (build 1.6.0_39-b04)
Java HotSpot(TM) 64-Bit Server VM (build 20.14-b01, mixed mode)

=== Build Information ===

Release ID: 505030006
Git revision: fbe3e9453daf6a3bb9a9709ed22bec35f7c9056b
Build date: 2014-10-23 13:11:11-04
Xamarin addins: e44add2b39de4dd57c0742bb2e620dfad84c64c6

=== Operating System ===

Windows 6.2.9200.0 (64-bit)