{"action":"created","issue":{"url":"https://api.github.com/repos/mono/mono/issues/11374","repository_url":"https://api.github.com/repos/mono/mono","labels_url":"https://api.github.com/repos/mono/mono/issues/11374/labels{/name}","comments_url":"https://api.github.com/repos/mono/mono/issues/11374/comments","events_url":"https://api.github.com/repos/mono/mono/issues/11374/events","html_url":"https://github.com/mono/mono/issues/11374","id":373933344,"node_id":"MDU6SXNzdWUzNzM5MzMzNDQ=","number":11374,"title":"HttpClient throws InvalidOperationException when handling concurrent requests","user":{"login":"spouliot","id":260465,"node_id":"MDQ6VXNlcjI2MDQ2NQ==","avatar_url":"https://avatars2.githubusercontent.com/u/260465?v=4","gravatar_id":"","url":"https://api.github.com/users/spouliot","html_url":"https://github.com/spouliot","followers_url":"https://api.github.com/users/spouliot/followers","following_url":"https://api.github.com/users/spouliot/following{/other_user}","gists_url":"https://api.github.com/users/spouliot/gists{/gist_id}","starred_url":"https://api.github.com/users/spouliot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spouliot/subscriptions","organizations_url":"https://api.github.com/users/spouliot/orgs","repos_url":"https://api.github.com/users/spouliot/repos","events_url":"https://api.github.com/users/spouliot/events{/privacy}","received_events_url":"https://api.github.com/users/spouliot/received_events","type":"User","site_admin":false},"labels":[{"id":851768740,"node_id":"MDU6TGFiZWw4NTE3Njg3NDA=","url":"https://api.github.com/repos/mono/mono/labels/area-BCL:%20System.Net.Http","name":"area-BCL: System.Net.Http","color":"d4c5f9","default":false},{"id":816095184,"node_id":"MDU6TGFiZWw4MTYwOTUxODQ=","url":"https://api.github.com/repos/mono/mono/labels/target-xamarin-ios","name":"target-xamarin-ios","color":"f9d0c4","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-10-25T12:55:51Z","updated_at":"2018-10-26T14:52:56Z","closed_at":null,"author_association":"MEMBER","body":"_From @rubo on October 24, 2018 22:26_\n\n### Steps to Reproduce\r\nIt's hard to reproduce, so there's no step by step guide, unfortunately. But it occurs quite often when having `HttpClient.GetAsync()` calls in `Task.WhenAll()`. The more tasks in `Task.WhenAll()`, the more often exception occurs.\r\n\r\nI tried with both managed and native client handlers. The same. This is an issue on Android too. So I'm not sure where exactly to report the issue. This can also be a Mono issue.\r\n\r\n### Expected Behavior\r\nShould just work and not throw an exception.\r\n### Actual Behavior\r\nThrows `System.InvalidOperationException: Collection was modified; enumeration operation may not execute.` in `HttpClient.GetAsync()`.\r\n\r\n### Environment\r\n\r\n<!--\r\n1.\r\nVisual Studio: Help > About Microsoft Visual Studio > Copy Info [button]\r\nVisual Studio for Mac: Visual Studio > About Visual Studio > Show Details > Copy Information [button]\r\n2. Paste into the code block below (between ```)\r\n-->\r\n\r\n```\r\nMicrosoft Visual Studio Enterprise 2017 \r\nVersion 15.8.8\r\nVisualStudio.15.Release/15.8.8+28010.2048\r\nMicrosoft .NET Framework\r\nVersion 4.7.03056\r\n\r\nInstalled Version: Enterprise\r\n\r\nApplication Insights Tools for Visual Studio Package   8.13.10627.1\r\nApplication Insights Tools for Visual Studio\r\n\r\nASP.NET and Web Tools 2017   15.8.05085.0\r\nASP.NET and Web Tools 2017\r\n\r\nASP.NET Core Razor Language Services   15.8.31590\r\nProvides languages services for ASP.NET Core Razor.\r\n\r\nASP.NET Web Frameworks and Tools 2017   5.2.60618.0\r\nFor additional information, visit https://www.asp.net/\r\n\r\nAzure App Service Tools v3.0.0   15.8.05023.0\r\nAzure App Service Tools v3.0.0\r\n\r\nAzure Functions and Web Jobs Tools   15.9.02046.0\r\nAzure Functions and Web Jobs Tools\r\n\r\nC# Tools   2.9.0-beta8-63208-01\r\nC# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.\r\n\r\nCommon Azure Tools   1.10\r\nProvides common services for use by Azure Mobile Services and Microsoft Azure Tools.\r\n\r\nEditorConfig Language Service   1.17.246\r\nLanguage service for .editorconfig files.\r\n\r\nEditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs.\r\n\r\nExtensibility Message Bus   1.1.49 (remotes/origin/d15-8@ee674f3)\r\nProvides common messaging-based MEF services for loosely coupled Visual Studio extension components communication and integration.\r\n\r\nJavaScript Language Service   2.0\r\nJavaScript Language Service\r\n\r\nJetBrains ReSharper Ultimate 2018.2.3   Build 182.0.20180912.70621\r\nJetBrains ReSharper Ultimate package for Microsoft Visual Studio. For more information about ReSharper Ultimate, visit http://www.jetbrains.com/resharper. Copyright © 2018 JetBrains, Inc.\r\n\r\nMicrosoft Azure Tools   2.9\r\nMicrosoft Azure Tools for Microsoft Visual Studio 2017 - v2.9.10730.2\r\n\r\nMicrosoft Continuous Delivery Tools for Visual Studio   0.4\r\nSimplifying the configuration of Azure DevOps pipelines from within the Visual Studio IDE.\r\n\r\nMicrosoft JVM Debugger   1.0\r\nProvides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines\r\n\r\nMicrosoft Library Manager   1.0\r\nInstall client-side libraries easily to any web project\r\n\r\nMicrosoft MI-Based Debugger   1.0\r\nProvides support for connecting Visual Studio to MI compatible debuggers\r\n\r\nMicrosoft Visual Studio Tools for Containers   1.1\r\nDevelop, run, validate your ASP.NET Core applications in the target environment. F5 your application directly into a container with debugging, or CTRL + F5 to edit & refresh your app without having to rebuild the container.\r\n\r\nMono Debugging for Visual Studio   4.11.11-pre (8fb558f)\r\nSupport for debugging Mono processes with Visual Studio.\r\n\r\nNuGet Package Manager   4.6.0\r\nNuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.\r\n\r\nProjectServicesPackage Extension   1.0\r\nProjectServicesPackage Visual Studio Extension Detailed Info\r\n\r\nResourcePackage Extension   1.0\r\nResourcePackage Visual Studio Extension Detailed Info\r\n\r\nResourcePackage Extension   1.0\r\nResourcePackage Visual Studio Extension Detailed Info\r\n\r\nSnapshot Debugging Extension   1.0\r\nSnapshot Debugging Visual Studio Extension Detailed Info\r\n\r\nSQL Server Data Tools   15.1.61808.07020\r\nMicrosoft SQL Server Data Tools\r\n\r\nTypeScript Tools   15.8.20822.2001\r\nTypeScript Tools for Microsoft Visual Studio\r\n\r\nVisual Basic Tools   2.9.0-beta8-63208-01\r\nVisual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.\r\n\r\nVisual F# Tools 10.2 for F# 4.5   15.8.0.0.  Commit Hash: 55a3dc3231c95c77f81ee53f7d29152029da7408.\r\nMicrosoft Visual F# Tools 10.2 for F# 4.5\r\n\r\nVisual Studio Code Debug Adapter Host Package   1.0\r\nInterop layer for hosting Visual Studio Code debug adapters in Visual Studio\r\n\r\nVisual Studio Tools for Containers   1.0\r\nVisual Studio Tools for Containers\r\n\r\nVisualStudio.Mac   1.0\r\nMac Extension for Visual Studio\r\n\r\nXamarin   4.11.0.776 (d15-8@1ae9b59d7)\r\nVisual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.\r\n\r\nXamarin Designer   4.15.9 (d000f568b)\r\nVisual Studio extension to enable Xamarin Designer tools in Visual Studio.\r\n\r\nXamarin Templates   1.1.116 (9619170)\r\nTemplates for building iOS, Android, and Windows apps with Xamarin and Xamarin.Forms.\r\n\r\nXamarin.Android SDK   9.0.0.19 (HEAD/a8a3b0ec7)\r\nXamarin.Android Reference Assemblies and MSBuild support.\r\n\r\nXamarin.iOS and Xamarin.Mac SDK   12.0.0.15 (84552a4)\r\nXamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.\r\n```\r\n\r\n\n\n_Copied from original issue: xamarin/xamarin-macios#5037_"},"comment":{"url":"https://api.github.com/repos/mono/mono/issues/comments/433435261","html_url":"https://github.com/mono/mono/issues/11374#issuecomment-433435261","issue_url":"https://api.github.com/repos/mono/mono/issues/11374","id":433435261,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMzQzNTI2MQ==","user":{"login":"marek-safar","id":250852,"node_id":"MDQ6VXNlcjI1MDg1Mg==","avatar_url":"https://avatars1.githubusercontent.com/u/250852?v=4","gravatar_id":"","url":"https://api.github.com/users/marek-safar","html_url":"https://github.com/marek-safar","followers_url":"https://api.github.com/users/marek-safar/followers","following_url":"https://api.github.com/users/marek-safar/following{/other_user}","gists_url":"https://api.github.com/users/marek-safar/gists{/gist_id}","starred_url":"https://api.github.com/users/marek-safar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marek-safar/subscriptions","organizations_url":"https://api.github.com/users/marek-safar/orgs","repos_url":"https://api.github.com/users/marek-safar/repos","events_url":"https://api.github.com/users/marek-safar/events{/privacy}","received_events_url":"https://api.github.com/users/marek-safar/received_events","type":"User","site_admin":false},"created_at":"2018-10-26T14:52:56Z","updated_at":"2018-10-26T14:52:56Z","author_association":"MEMBER","body":"@spouliot do you have the full exception and not just \"Collection was modified....\" ?"}}
{"actor":{"display_login":"marek-safar"}}