Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MissingMethodException #1041

Closed
cryo75 opened this issue Mar 28, 2017 · 17 comments
Closed

MissingMethodException #1041

cryo75 opened this issue Mar 28, 2017 · 17 comments

Comments

@cryo75
Copy link

cryo75 commented Mar 28, 2017

I'm getting the following exception when before everything was working fine:

500 : {"ClassName":"System.MissingMethodException","Message":"Method not found: \"System.Func2<System.String,System.String> Newtonsoft.Json.Serialization.JsonDictionaryContract.get_PropertyNameResolver()".","Data":null,"InnerException":null,"HelpURL":null,"StackTraceString":" bei Swashbuckle.Swagger.SchemaRegistry.<>c__DisplayClass18.b__14(String name)\r\n bei System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func2 keySelector, Func2 elementSelector, IEqualityComparer1 comparer)\r\n bei Swashbuckle.Swagger.SchemaRegistry.CreateDictionarySchema(JsonDictionaryContract dictionaryContract)\r\n bei Swashbuckle.Swagger.SchemaRegistry.CreateInlineSchema(Type type)\r\n bei Swashbuckle.Swagger.SchemaRegistry.b__1f(JsonProperty prop)\r\n bei System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func2 keySelector, Func2 elementSelector, IEqualityComparer1 comparer)\r\n bei Swashbuckle.Swagger.SchemaRegistry.CreateObjectSchema(JsonObjectContract jsonContract)\r\n bei Swashbuckle.Swagger.SchemaRegistry.CreateDefinitionSchema(Type type)\r\n bei Swashbuckle.Swagger.SchemaRegistry.GetOrRegister(Type type)\r\n bei Swashbuckle.Swagger.Annotations.ApplySwaggerResponseAttributes.Apply(Operation operation, SchemaRegistry schemaRegistry, ApiDescription apiDescription)\r\n bei Swashbuckle.Swagger.SwaggerGenerator.CreateOperation(ApiDescription apiDesc, SchemaRegistry schemaRegistry)\r\n bei Swashbuckle.Swagger.SwaggerGenerator.CreatePathItem(IEnumerable1 apiDescriptions, SchemaRegistry schemaRegistry)\r\n bei System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func2 keySelector, Func2 elementSelector, IEqualityComparer1 comparer)\r\n bei Swashbuckle.Swagger.SwaggerGenerator.GetSwagger(String rootUrl, String apiVersion)\r\n bei System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey key, Func2 valueFactory)\r\n bei AboServer.API.Config.SwaggerCachingProvider.GetSwagger(String rootUrl, String apiVersion)\r\n bei Swashbuckle.Application.SwaggerDocsHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)\r\n bei System.Net.Http.HttpMessageInvoker.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)\r\n bei System.Web.Http.Dispatcher.HttpRoutingDispatcher.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)\r\n bei System.Net.Http.DelegatingHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)\r\n bei AboServer.API.Handlers.SessionHandler.<SendAsync>d__1.MoveNext()","RemoteStackTraceString":null,"RemoteStackIndex":0,"ExceptionMethod":"8\n<CreateDictionarySchema>b__14\nSwashbuckle.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cd1bb07a5ac7c7bc\nSwashbuckle.Swagger.SchemaRegistry+<>c__DisplayClass18\nSystem.String <CreateDictionarySchema>b__14(System.String)","HResult":-2146233069,"Source":"Swashbuckle.Core","WatsonBuckets":null,"MMClassName":null,"MMMemberName":null,"MMSignature":null} http://myserver:80/myapp/swagger/docs/v1

@iHateCode
Copy link

Set Newtonsoft.Json package to version 9.0.1 and the error will go. Just a temp fix for now.

@metallserge
Copy link

also dealt with same issue after updating Newtonsoft to 10.x.x, since they removed Obsolete PropertyNameResolver
and also reverted Newtonsoft back for now

@tomasfalt
Copy link

I know that the focus is on the .Net core version of Swashbuckle but is there any possibility to correct this? It is really critical for me and probably for a lot of more people since I can't revert to version 9 of Newtonsoft.

@mehyaa
Copy link
Contributor

mehyaa commented May 4, 2017

I've added a pull request for fixing this issue: #1063

@tomasfalt
Copy link

Great! But I think it's #1062 I'm looking for. Is it possible to have a release of this?

@heldersepu
Copy link
Contributor

Possible? sure it is!
When? that is the real question, seem that the pull request are piling up...
...And we have a call out for maintainers #1053

@eatfrog
Copy link

eatfrog commented May 24, 2017

this is reaallly becoming more and more of a problem as time goes.. reverting to v9 is starting to look impossible here now.

@heldersepu
Copy link
Contributor

heldersepu commented May 24, 2017

@eatfrog
Come on man, you know how it is...
We all have full time jobs, this is a hobby for us, no SLA or dedicated support team.
Until we can turn this project into something like: https://www.mashery.com/api/products and start getting thousand$ flowing in, I think development/release will be slow.

But if you want to contribute your time, answer the call for maintainers: #1053

domaindrivendev added a commit that referenced this issue Jun 21, 2017
Newtonsoft.Json package updated to v7.0.1, issue #1041 fixed.
@lluismontero
Copy link

Hi!
Now that the fix have been merged, do you have any plan to release a new version? Obviously, an ETA would be great! Thanks for your good work!

@lakario
Copy link

lakario commented Jul 7, 2017

Sorry for the +1 post, but really hoping this gets some visibility. We depend on Swashbuckle and this bug is causing major problems.

@heldersepu
Copy link
Contributor

I'm working on my own fork that uses the latest and greatest, anyone intrested can get from:
https://www.myget.org/gallery/swashbuckle

And here is a demo:
http://swashbuckletest.azurewebsites.net/swagger

@domaindrivendev
Copy link
Owner

@lakario - if you hang tight I'll try push out a new release this evening

@domaindrivendev
Copy link
Owner

@heldersepu - any chance you could use a different name for your myget package? It's going to be confusing to have different packages with the same name. Plus it means you can publish yours to Nuget also.

@heldersepu
Copy link
Contributor

@domaindrivendev
Yes I've been thinking about renaming the package/project.
Will probably do it next week

@whippet-rider
Copy link

It would make things clearer..

@domaindrivendev
Copy link
Owner

@cryo75, @lakario - just pushed v5.6.0 to Nuget which should have the fix for this issue. Please check it out and let me know

@lakario
Copy link

lakario commented Aug 1, 2017

@domaindrivendev Just tested 5.6.0, looks good. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests