-
Notifications
You must be signed in to change notification settings - Fork 10.3k
[Bug]: Annotations issue. TypeError: null is not an object (evaluating 'this.#touchMoveAC.abort') #19793
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
Comments
Can you reproduce this in any other browser, particularly in Firefox? Also, please provide error messages and code as text rather than images. |
Yes i can reproduce the same phenomenon on the iphone with the latest firefox app 137.0.0. In this case im using the latest unreleased pdf.js version: 5.2.47. From this page: "https://mozilla.github.io/pdf.js/web/viewer.html" bcs its easier for me to test. As i dont have the same debug tools on the firefox mobile app i cant tell if its the same console error but its same behavior and consequence like in my previous safari tests. I can not longer draw the error happens after some zoom operations in combination with drawings. And other functions like text or text highlighting, annotations / drawing are not longer working. I tried same issue and same website with latest safari and have the same error: If you have an idea / something you want me to test im happy to do so. But i dont know if this one relates. Both videos are firefox app 137.0.0. with the webpage mentioned above. Sorry for the shitty quality but otherwise file size is too big. But after some drawing i wasn't able to draw its just moving the page. ScreenRecording_04-09-2025.18-09-25_1.movIn the 2nd video you can see that the drawing in general is at the beginning weird and okayish and than after some time i cant draw at all. ScreenRecording_04-09-2025.18-12-34_1-1.mov |
Please note that all browsers on iOS are effectively reskinned versions of Safari, because of limitations/restrictions in that platform. Hence the more relevant question here, can you reproduce this issue anywhere other than on iOS devices? Please note that Safari in general, even more so on iOS, has a lot of issues not found in other browsers. Hence why we only list Safari as "mostly" supported: https://github.com/mozilla/pdf.js/wiki/Frequently-Asked-Questions#faq-support |
Yes im able to reproduce the error in chrome on my android tablet even tho i feel like its a bit more robust in chrome it didnt took me so long to reproduce. Basically same setup as before. I opened https://mozilla.github.io/pdf.js/web/viewer.html in chrome on my android and tried to zoom and used some annotations. I clearly see some kind of pattern but i can not pin point it yet. But its definitely the combination of zooming and annotations that are causing this. Uncaught (in promise) TypeError: this[#currentEditorType].endDrawing is not a function In chrome i always get this error. I got the same one in safari too as stated above but more often i got in safari: |
There are two bugs here:
|
Attach (recommended) or Link to PDF file
blank.pdf
Im using a simple plain blank pdf file. I have this issue with all pdf's. Its not document specific.
Web browser and its version
latest safari version on iPhone
Operating system and its version
iOS latest
PDF.js version
5.1.91 latest
Is the bug present in the latest PDF.js version?
Yes
Is a browser extension
No
Steps to reproduce the problem
If i draw in my pdf document i can provoke an error that i can basically only fix by restarting pdf.js.
Unfortunately I didnt figure out a way to reliably reproduce it every time but it happens really often and regularly nearly every time I try to draw. I see it happen most often if i zoom a bit draw something move around and draw again. Sometimes it happens immediately but sometimes it takes me a few drawings but definitely way to often to ignore. The error is happening as soon as i lift the finger after a I tried to draw a line (makes sense bcs its ontouchend).
"TypeError: null is not an object (evaluating 'this.#touchMoveAC.abort')"
What is the expected behavior?
If i start to use annotations / drawings i can't move the page and I can no longer draw.
What went wrong?
Its hard to see but right at the beginning I zoom into the document and if i switch to annotation I cant draw bcs the console error appears. As written above sometimes like in this case right from the start sometimes it takes a few scribbles but defenetly in every session.
ScreenRecording_04-09-2025.17-15-34_1.mov
Link to a viewer
No response
Additional context
Bonus: If i debug and check the lines i can see this
This is the context where the error happens so as you can see this.#touchmoveac is null therefore the error is valid
The text was updated successfully, but these errors were encountered: