Bug 58636 - MissingMethodException: Incorrectly resolves methods
Summary: MissingMethodException: Incorrectly resolves methods
Status: RESOLVED FIXED
Alias: None
Product: Workbooks & Inspector
Classification: Xamarin
Component: Client: Mac ()
Version: master
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: xamarininteractive
URL:
Depends on:
Blocks:
 
Reported: 2017-08-08 02:17 UTC by Miguel de Icaza [MSFT]
Modified: 2017-08-18 17:25 UTC (History)
1 user (show)

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


Attachments
Visual Studio solution and Workbook (3.45 KB, application/x-gzip)
2017-08-08 02:17 UTC, Miguel de Icaza [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 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 FIXED

Description Miguel de Icaza [MSFT] 2017-08-08 02:17:21 UTC
Created attachment 24076 [details]
Visual Studio solution and Workbook

The attached package comes with a demo.workbook (pasted at the end for convenience) and a Visual Studio solution.   The demo.workbook crashes with the following error when you try to run it, the console app works fine.

In both cases, you must get the API token from this url:

https://developer.gitter.im/apps

(You first need to sign in, then just go there and copy/paste the token).

```
MissingMethodException: Method 'System.Net.ServicePointManager.CloseConnectionGroups' not found.
at void System.Net.Http.HttpMessageHandler.Dispose ()
at void System.Net.Http.HttpMessageInvoker.Dispose (bool disposing)
at void System.Net.Http.HttpClient.Dispose (bool disposing)
at void System.Net.Http.HttpMessageInvoker.Dispose ()
at void GitterSharp.Helpers.HttpHelper.<GetAsync>d__0<System.Collections.Generic.IEnumerable<GitterSharp.Model.Group>>.MoveNext ()
at void System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw ()
at void System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (Task task)
at void System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (Task task)
at void System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (Task task)
at IEnumerable<Group> System.Runtime.CompilerServices.TaskAwaiter<System.Collections.Generic.IEnumerable<GitterSharp.Model.Group>>.GetResult ()
at void GitterSharp.Services.GitterApiService.<GetGroupsAsync>d__47.MoveNext ()
at void System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw ()
at void System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (Task task)
at void System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (Task task)
at void System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (Task task)
at IEnumerable<Group> System.Runtime.CompilerServices.TaskAwaiter<System.Collections.Generic.IEnumerable<GitterSharp.Model.Group>>.GetResult ()
at void <<Initialize>>d__0.MoveNext ()
at void System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw ()
at void System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (Task task)
at void System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (Task task)
at void System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (Task task)
at object System.Runtime.CompilerServices.ConfiguredTaskAwaitable<object>.ConfiguredTaskAwaiter.GetResult ()
at void Xamarin.Interactive.Compilation.CompilationExecutionContext<object>.<RunAsync>d__12.MoveNext ()
at void System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw ()
at void System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (Task task)
at void System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (Task task)
at void System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (Task task)
at object System.Runtime.CompilerServices.TaskAwaiter<object>.GetResult ()
at void Xamarin.Interactive.Repl.ReplExecutionContext.<RunAsync>d__9.MoveNext ()
```

demo.workbook file:

---
uti: com.xamarin.workbook
id: 3404ef8b-455e-44be-b3d2-7b14b59d013d
title: demo
platforms:
- Console
packages:
- id: gitter-api-pcl
  version: 0.8.0
---

```csharp
#r "GitterSharp"
```

```csharp
var api = new GitterSharp.Services.GitterApiService ("TOKENHERE");
```

```csharp
await api.GetGroupsAsync ();
```
Comment 1 Miguel de Icaza [MSFT] 2017-08-08 02:18:13 UTC
In fact, you do not even need the API key, an empty token would still produce the above error, you just wont see it run in the VS solution.