Closed moonolgerd closed 3 years ago
I confirm. Blazor app (server side) .net core 3.1
@code { protected override async Task OnInitializedAsync() { bool IsSupportedByBrowser = await NotificationService.IsSupportedByBrowserAsync(); //..... } }
Exception: MissingMethodException: Method not found: 'System.Threading.Tasks.Task`1<!!0> Microsoft.JSInterop.IJSRuntime.InvokeAsync(System.String, System.Object[])'.
The same error
Unhandled exception rendering component: Method not found: 'System.Threading.Tasks.Task
1<!!0> Microsoft.JSInterop.IJSRuntime.InvokeAsync(System.String, System.Object[])'. System.MissingMethodException: Method not found: 'System.Threading.Tasks.Task
1<!!0> Microsoft.JSInterop.IJSRuntime.InvokeAsync(System.String, System.Object[])'. at Blazor.Extensions.NotificationService.CreateAsync(String title, String body, String icon) at KafkaProducer2.Pages.FetchData.Send() in D:\sources\KafkaProducer2\KafkaProducer2\Pages\FetchData.razor:line 54 at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task) at Microsoft.AspNetCore.Components.Forms.EditForm.HandleSubmitAsync() at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task) at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle) fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111] Unhandled exception in circuit 'sDbwJox39k9SfNii4dwdObMdwnyDqc6ndiuSlawaDvc'. System.MissingMethodException: Method not found: 'System.Threading.Tasks.Task`1<!!0> Microsoft.JSInterop.IJSRuntime.InvokeAsync(System.String, System.Object[])'. at Blazor.Extensions.NotificationService.CreateAsync(String title, String body, String icon) at KafkaProducer2.Pages.FetchData.Send() in D:\sources\KafkaProducer2\KafkaProducer2\Pages\FetchData.razor:line 54 at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task) at Microsoft.AspNetCore.Components.Forms.EditForm.HandleSubmitAsync() at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task) at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle)
Having the same error on .net core 3.1 with blazor server side Changing from Task in INotificationService to ValueTask should resolve the issue
@moonolgerd does new version works for you ?
Would love to test this, as I have the same issue, but I am unable to build the project on the master branch using my current dev stack. Would you mind taking this change into a new 0.1.4 release so that I can update it in my project and test it out? Or if there is some other way to test please let me know. Also, it would be nice if the project dependencies were updated to .NET Core 3.1...
I have version 0.1.3 and error still occurs
blazor.webassembly.js:1 crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100] Unhandled exception rendering component: Method not found: System.Threading.Tasks.Task
1<!!0> Microsoft.JSInterop.IJSRuntime.InvokeAsync<!0>(string,object[])`
The suggested change seem to be missed for the RequestPermission method.
The @vertonghenb (author ?) did not push new version to nuget. This is still the same old version without fix.
@mikart143 I'm the maintainer, not the owner. I pm'd the owner @galvesribeiro to push out a new release.
Thank you for help !!
On Tue, 2 Jun 2020, 08:38 Benjamin Vertonghen, notifications@github.com wrote:
@mikart143 https://github.com/mikart143 I'm the maintainer, not the owner. I pm'd the owner @galvesribeiro https://github.com/galvesribeiro to push out a new release.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/BlazorExtensions/Notifications/issues/14#issuecomment-637310738, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7FGVHBKRY22B24YDSC4ALRUSM4PANCNFSM4KDOIB3Q .
Thank you for help !! … On Tue, 2 Jun 2020, 08:38 Benjamin Vertonghen, @.***> wrote: @mikart143 https://github.com/mikart143 I'm the maintainer, not the owner. I pm'd the owner @galvesribeiro https://github.com/galvesribeiro to push out a new release. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#14 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7FGVHBKRY22B24YDSC4ALRUSM4PANCNFSM4KDOIB3Q .
have same error, what u do to fix it?
I also have the same issue. I took the latest Nuget Package reference. Seems its not fixed yet
@galvesribeiro are you able to push to nuget??
Due to not being able to push out new nuget packages, I moved the repo, further development is taken place there. But this issue is fixed in the new version which supports 5.0
Blazor.MonoRuntime.targets(204,5): error : Unhandled exception. Mono.Linker.MarkException: Error processing method: 'System.Threading.Tasks.Task
1<System.Boolean> Blazor.Extensions.NotificationService::IsSupportedByBrowserAsync()' in assembly: 'Blazor.Extensions.Notifications.dll' 1> ---> Mono.Cecil.ResolutionException: Failed to resolve System.Threading.Tasks.Task
1<!!0> Microsoft.JSInterop.IJSRuntime::InvokeAsync(System.String,System.Object[]) 1> at Mono.Linker.Steps.MarkStep.HandleUnresolvedMethod(MethodReference reference) 1> at Mono.Linker.Steps.MarkStep.MarkMethod(MethodReference reference) 1> at Mono.Linker.Steps.MarkStep.MarkInstruction(Instruction instruction) 1> at Mono.Linker.Steps.MarkStep.MarkMethodBody(MethodBody body) 1> at Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method) 1> at Mono.Linker.Steps.MarkStep.ProcessQueue() 1> --- End of inner exception stack trace --- 1> at Mono.Linker.Steps.MarkStep.ProcessQueue() 1> at Mono.Linker.Steps.MarkStep.ProcessPrimaryQueue() 1> at Mono.Linker.Steps.MarkStep.Process() 1> at Mono.Linker.Steps.MarkStep.Process(LinkContext context) 1> at Mono.Linker.Pipeline.ProcessStep(LinkContext context, IStep step) 1> at Mono.Linker.Pipeline.Process(LinkContext context) 1> at Mono.Linker.Driver.Run(ILogger customLogger) 1> at Mono.Linker.Driver.Execute(String[] args, ILogger customLogger) 1> at Mono.Linker.Driver.Main(String[] args) 1>Blazor.MonoRuntime.targets(204,5): error : ILLink failed with exited code -532462766.