Skip to content

Problem running on Blazor Preview #39

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

Closed
chanan opened this issue Apr 18, 2018 · 8 comments
Closed

Problem running on Blazor Preview #39

chanan opened this issue Apr 18, 2018 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@chanan
Copy link

chanan commented Apr 18, 2018

Hi,

I ran the same exact code in a console app (.net Core 2.1.300-preview2-008533) and as a Blazor App (Preview 0.2.0). Console worked fine, but in Blazor:

WASM: Newtonsoft.Json.JsonSerializationException: Error getting value from 'Query' on 'GraphQL.Common.Request.GraphQLRequest'. ---> System.NullReferenceException: Object reference not set to an instance of an object.

Needless to say Query wasn't null and I tried with postQueryAsync as well to verify.

I am guessing that the difference might be that Blazor runs on Mono.

@deinok
Copy link
Member

deinok commented Apr 18, 2018

Blazor its an untested framework for this.
Also, remember that Blazor its in preview.

I will take a look, and try to fix the issue. But it probably wont be fast :(

@chanan
Copy link
Author

chanan commented Apr 18, 2018

Yeah, no problem, just wanted to let you know in case its an issue with Mono which will persist after Blazor is released, or used currently by someone using Xamarin.

@luetm
Copy link

luetm commented Apr 24, 2018

I just ran into this as well. Totally understand, not here to make pressure. Issue seems to be only in the DeserializeObject<>, not the non-generic variant (fundamental issue is the Json.NET library)

@chanan
Copy link
Author

chanan commented Apr 24, 2018

Specifcally the issue seems to be using CamelCaseResovler. @luetm If you use Blazor, you could use the built in JsonUtil class to de-serialize to classes that use the json case instead of .net casing.

@luetm
Copy link

luetm commented Apr 24, 2018

@chanan Thanks for the pointer! We wanted to test if any* .NET standard libaries work in there, but for now we have the impression that almost nothing works without tinkering and adjusting. The underlying issue seems to be explained here: https://github.com/aspnet/Blazor/issues/370

@chanan
Copy link
Author

chanan commented Apr 24, 2018

@luetm Thanks for the link! Yes, same, wanted to use external libraries, but for now till its fixed, just doing the POST myself and using the internal JsonUtil work around. Hopefully it will be fixed in Blazor soon.

@deinok
Copy link
Member

deinok commented May 7, 2018

Guys can you try it again with Blazor 0.3.0 and our latest release?

@deinok deinok self-assigned this May 7, 2018
@deinok deinok added the bug Something isn't working label May 7, 2018
@deinok
Copy link
Member

deinok commented Jun 7, 2018

related to mono/mono#7839

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants