Error: Uncaught (in promise): TypeError: Cannot read property 'read' of null
See original GitHub issueHello, first time submitting an issue for this library!
I am seeing this error in the console anytime I change the value of src
through input binding.
TypeError: Cannot read property 'read' of null
at pump (pdf.js:18960)
at pdf.js:18973
at ZoneDelegate.invoke (zone-evergreen.js:359)
at Object.onInvoke (core.js:30892)
at ZoneDelegate.invoke (zone-evergreen.js:358)
at Zone.run (zone-evergreen.js:124)
at zone-evergreen.js:855
at ZoneDelegate.invokeTask (zone-evergreen.js:391)
at Object.onInvokeTask (core.js:30873)
at ZoneDelegate.invokeTask (zone-evergreen.js:390)
at resolvePromise (zone-evergreen.js:797)
at zone-evergreen.js:862
at ZoneDelegate.invokeTask (zone-evergreen.js:391)
at Object.onInvokeTask (core.js:30873)
at ZoneDelegate.invokeTask (zone-evergreen.js:390)
at Zone.runTask (zone-evergreen.js:168)
at drainMicroTaskQueue (zone-evergreen.js:559)
Here’s the basic setup I have:
<input #file type="file" (change)="updateFile(file)">
<div *ngIf="pdfSrc" class="pdf-viewer-container">
<p>Preview</p>
<ngx-extended-pdf-viewer
[src]="pdfSrc"
[useBrowserLocale]="true"
height="250px"
zoom="25%"
[showSidebarButton]="false"
[showFindButton]="false"
[showPagingButtons]="false"
[showZoomButtons]="false"
[showPresentationModeButton]="false"
[showOpenFileButton]="false"
[showPrintButton]="false"
[showDownloadButton]="false"
[showBookmarkButton]="false"
[showSecondaryToolbarButton]="false"
delayFirstView=1000>
</ngx-extended-pdf-viewer>
</div>
When the value of pdfSrc
changes, I see the error above in the console. The PDF still changes however!
How do I change the file being displayed without this error being printed?
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (7 by maintainers)
Top Results From Across the Web
Uncaught TypeError: Cannot read property of null - iDiallo
This error occurs when you read a property or call a method on a null object . That's because the DOM API returns...
Read more >Uncaught (in promise) TypeError: Cannot read property 'style ...
All this error means is that the property you are trying to edit, in this case the element with an id "box_2_info_" +...
Read more >How to deal with TypeError: cannot read properties of null
This common error occurs when one tries to read a property or call a method on a null object. For Safari users, this...
Read more >Uncaught (in promise) TypeError: Cannot read property 'error ...
Uncaught (in promise ) TypeError: Cannot read property 'error' of null. I'm using Vue.js / Algolia to power the search on my site....
Read more >Getting Runtime error : Uncaught (in promise): TypeError ...
Getting Runtime error : Uncaught (in promise): TypeError: Cannot read property 'rating' of null TypeError: Cannot read property 'rating' of null ; Platform....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hey Staphranauh, sorry busy weekend. I will try to send you a reproducer by the end of this work week!
Let’s close the ticket. I suppose it’s like you, @g3344, say: it used to be a common bug, but I’ve managed to solve it.