-
-
Notifications
You must be signed in to change notification settings - Fork 173
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
Improve Error Handling when receiving invalid PDF #138
Comments
Thank you for creating your first issue. We appreciate your help in making this project better. We will look into it, and get back to you soon. Need help or want to discuss this issue? Join our Discord community here to ask questions and discuss this issue live! |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
This issue was closed because it has been stalled for 5 days with no activity. |
Thank you for the feedback. I will increase error handling. |
I have this issue too, a client tried to load a file that's not a PDF but have |
I just spent quit a bit of time debugging the
PdfRendererView.initWithUrl()
call because the app kept crashing when trying to load a specific PDF.In the end, the issue was that the server sent a 302 with a small HTML message when using the default headers (while accepting the default headers of every single other client I tried).
While this was not an issue on the side of Pdf-Viewer, I found the error handling pretty unhelpful and it definitely should not allow the app to crash when such a thing happens.
I encountered two separate issues: The download silently failing because it was incomplete (I think the statusListener did not react to this, even though I saw the error messages in the logs) and the main issue of the app crashing when the data received was actually not a PDF document.
I suggest trying to download invalid data and checking whether the error handling is graceful and the error logging can be improved.
The text was updated successfully, but these errors were encountered: