blazorextensions / notifications Goto Github PK
View Code? Open in Web Editor NEWHTML5 Notifications API implementation for Microsoft Blazor
License: MIT License
HTML5 Notifications API implementation for Microsoft Blazor
License: MIT License
I am noob, really don't understand how to use this Notifications.
thanks. and I think it's better to update source code to Blazor 0.5.1
Or it only support notification from executed from within Blazor WebAssembly?
Also the Repo itself is updated with fix #14 but the NuGet is not republished with these changes.
I imported the code locally without NuGet package, but i still get this error.
crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100] Unhandled exception rendering component: Could not find 'BlazorExtensions' in 'window'. p/<@https://localhost:44364/_framework/blazor.webassembly.js:1:9130 p@https://localhost:44364/_framework/blazor.webassembly.js:1:9090 beginInvokeJSFromDotNet/r<@https://localhost:44364/_framework/blazor.webassembly.js:1:9800 beginInvokeJSFromDotNet@https://localhost:44364/_framework/blazor.webassembly.js:1:9773 _mono_wasm_invoke_js_marshalled@https://localhost:44364/_framework/wasm/dotnet.3.2.0.js:1:171294 mono_wasm_invoke_js_marshalled@:wasm-function[54]:0x0 do_icall@:wasm-function[6049]:0x10f8b1 do_icall_wrapper@:wasm-function[1896]:0x50b6a interp_exec_method@:wasm-function[1120]:0x2588e interp_runtime_invoke@:wasm-function[5655]:0xf7391 mono_jit_runtime_invoke@:wasm-function[5109]:0xddb3d do_runtime_invoke@:wasm-function[1410]:0x3ba85 mono_runtime_invoke_checked@:wasm-function[331]:0x96a2 mono_runtime_try_invoke_array@:wasm-function[2333]:0x66c26 ves_icall_InternalInvoke@:wasm-function[4032]:0xb44ff ves_icall_InternalInvoke_raw@:wasm-function[4031]:0xb3ffd do_icall@:wasm-function[6049]:0x10f8b1 do_icall_wrapper@:wasm-function[1896]:0x50b6a interp_exec_method@:wasm-function[1120]:0x2588e interp_runtime_invoke@:wasm-function[5655]:0xf7391 mono_jit_runtime_invoke@:wasm-function[5109]:0xddb3d do_runtime_invoke@:wasm-function[1410]:0x3ba85 mono_runtime_try_invoke@:wasm-function[418]:0xcfdb mono_runtime_invoke@:wasm-function[1610]:0x44b39 mono_wasm_invoke_method@:wasm-function[4605]:0xca6a7 Module._mono_wasm_invoke_method@https://localhost:44364/_framework/wasm/dotnet.3.2.0.js:1:195738 call_method@https://localhost:44364/_framework/wasm/dotnet.3.2.0.js:1:160823 bind_static_method/<@https://localhost:44364/_framework/wasm/dotnet.3.2.0.js:1:163094 beginInvokeDotNetFromJS@https://localhost:44364/_framework/blazor.webassembly.js:1:41657 s@https://localhost:44364/_framework/blazor.webassembly.js:1:8494 e.invokeMethodAsync@https://localhost:44364/_framework/blazor.webassembly.js:1:9573 v/</</<@https://localhost:44364/_framework/blazor.webassembly.js:1:34571 t.dispatchEvent@https://localhost:44364/_framework/blazor.webassembly.js:1:11119 e/this.eventDelegator</<@https://localhost:44364/_framework/blazor.webassembly.js:1:12033 e/this.eventDelegator<@https://localhost:44364/_framework/blazor.webassembly.js:1:12057 u</e.prototype.onGlobalEvent@https://localhost:44364/_framework/blazor.webassembly.js:1:22113
Blazor.MonoRuntime.targets(204,5): error : Unhandled exception. Mono.Linker.MarkException: Error processing method: 'System.Threading.Tasks.Task1<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.
When using the extension in blazor webassembly preview it appears to have problem with linking.
.NET Core 3.1
Microsoft.AspNetCore.Blazor.Templates::3.2.0-preview1.20073.1
Blazor.Extensions.Notifications version 0.1.3 (from NuGet)
1>------ Build started: Project: BlazorApp.Client, Configuration: Debug Any CPU ------
1>BlazorApp.Client -> C:\Users\...\BlazorApp\Client\bin\Debug\netstandard2.1\BlazorApp.Client.dll
1>Fatal error in Mono CIL Linker
1>C:\Users\...\packages\microsoft.aspnetcore.blazor.build\3.2.0-preview1.20073.1\targets\Blazor.MonoRuntime.targets(258,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>C:\Users\...\packages\microsoft.aspnetcore.blazor.build\3.2.0-preview1.20073.1\targets\Blazor.MonoRuntime.targets(258,5): error : ILLink failed with exit code -532462766.
1>Done building project "BlazorApp.Client.csproj" -- FAILED.
2>------ Build started: Project: BlazorApp.Server, Configuration: Debug Any CPU ------
2>BlazorApp.Server -> C:\Users\...\BlazorApp\Server\bin\Debug\netcoreapp3.1\BlazorApp.Server.dll
========== Build: 1 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========
Consider updating to Preview 5, impact is rather small not that much changed.
I'm receiving an IL Linker Error on Preview 9 for a Blazor Client Side Application
1>Type System.Reflection.Assembly has no fields to preserve
1>Type Mono.ValueTuple has no fields to preserve
1>Fatal error in IL Linker
1>
1>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' ---> 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)
Please update to preview 6
In this Advanced.razor there is a placeholder to show off some more advanced features of the package. We should consider providing some.
Would you please merge the pull request for preview 4 See: #3
Microsoft.JSInterop.JSException: An exception occurred executing JS interop: The JSON value could not be converted to System.String. Path: $ | LineNumber: 0 | BytePositionInLine: 1.. See InnerException for more details. ---> System.Text.Json.JsonException: The JSON value could not be converted to System.String. Path: $ | LineNumber: 0 | BytePositionInLine: 1. ---> System.InvalidOperationException: Cannot get the value of a token type 'StartObject' as a string.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.