-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
PdfViewer example throwing null reference exception in js #662
Comments
This also occurs with the starter template (NET8.BlazorWebAppRenderModeServerGlobal) provided in the documentation here. |
@mark-fay-03 Thank you for reporting this. We will investigate. |
@mark-fay-03 I am unable to reproduce the issue in the starter template. Screenshot: |
@mark-fay-03 Could you please provide a code sample or a link to a GitHub repository that demonstrates the issue with minimal steps for replication? |
PdfViewer example throwing null reference exception in js
I have followed the Blazor Bootstrap Getting Started guide to install Blazor Bootstrap on a .NET 8 Blazor (SSR) application. I then followed the example from the PdfViewer Component on the home.razor page for both the pdf from GitHub and the hard coded pdf byte stream.
I expected the pdf to load correctly.
Unfortunately, the PdfViewer loads then the blazor.js throws the exception below (after turning on DetailedErrors in appsettings.json) before displaying the PDF's contents.
[2024-04-16T20:12:58.956Z] Error: System.AggregateException: One or more errors occurred. (TypeError: Cannot read properties of null (reading 'insertBefore')) ---> System.InvalidOperationException: TypeError: Cannot read properties of null (reading 'insertBefore') at Microsoft.AspNetCore.Components.RenderTree.Renderer.InvokeRenderCompletedCallsAfterUpdateDisplayTask(Task updateDisplayTask, Int32[] updatedComponents) --- End of inner exception stack trace ---
####Versions (please complete the following information):
####Sample code
Same as
https://docs.blazorbootstrap.com/getting-started/blazor-webapp-server-global-net-8#sample-code
https://docs.blazorbootstrap.com/components/pdf-viewer#base64string
The text was updated successfully, but these errors were encountered: