You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When resizing the ContentPreview component in box-ui-elements, the call to this.preview.resize(); can generate promises that get cancelled and that then throw errors when they're rejected. We use sentry to monitor frontend errors in our app and whenever anyone resizes their bowser window we get hundreds of uncaught promise rejections from this component. I tried using an error boundary to catch the errors and silence them (since they're just cancelled resize tasks) but was unable to.
Environment:
Elements version: 13.0.0
Desktop (please complete the following information):
Render a <ContentPreview> component with a .docx file (though it doesn't seem to matter what file)
Resize the viewport either by dragging the window corners or dragging the development tools
See many uncaught promise rejections happen:
Uncaught (in promise) Error: TextLayer task cancelled.
at B.cancel (pdf.min.js:482)
at f.value (pdf_viewer.min.js:62)
at e.value (pdf_viewer.min.js:138)
at e.value (pdf_viewer.min.js:134)
at e.value (pdf_viewer.min.js:138)
at e.value (pdf_viewer.min.js:172)
at e.value (pdf_viewer.min.js:175)
at e.set (pdf_viewer.min.js:190)
at n.value (preview.js:33)
at e.value (preview.js:58)
at Object.onResize (ContentPreview.js:849)
at index.esm.js:133
What is the expected behavior? (Screenshots can be helpful here)
The component resizes sucessfully without throwing errors in the console.
What went wrong? (Screenshots, console logs, or HAR files can be helpful here)
Nothing visually, just all these uncaught promise rejections trigger a lot of events in Sentry
Expected behavior
The component resizes sucessfully without throwing errors in the console.
The text was updated successfully, but these errors were encountered:
Hi @noseworthy. This is a known issue with the version of pdf.js that we use and was fixed by mozilla/pdf.js#10962. We're still evaluating our upgrade path, but don't have any immediate plans to upgrade just yet. Since the issue is not user-facing, we consider it to be fairly low priority. Hope that helps gives some context.
Hi @noseworthy. This is a known issue with the version of pdf.js that we use and was fixed by mozilla/pdf.js#10962. We're still evaluating our upgrade path, but don't have any immediate plans to upgrade just yet. Since the issue is not user-facing, we consider it to be fairly low priority. Hope that helps gives some context.
Thanks for the context and the quick reply! We'll try to figure out a way to exclude these from Sentry.
When resizing the
ContentPreview
component inbox-ui-elements
, the call tothis.preview.resize();
can generate promises that get cancelled and that then throw errors when they're rejected. We usesentry
to monitor frontend errors in our app and whenever anyone resizes their bowser window we get hundreds of uncaught promise rejections from this component. I tried using an error boundary to catch the errors and silence them (since they're just cancelled resize tasks) but was unable to.Environment:
Desktop (please complete the following information):
Steps to reproduce the problem:
<ContentPreview>
component with a.docx
file (though it doesn't seem to matter what file)What is the expected behavior? (Screenshots can be helpful here)
The component resizes sucessfully without throwing errors in the console.
What went wrong? (Screenshots, console logs, or HAR files can be helpful here)
Nothing visually, just all these uncaught promise rejections trigger a lot of events in Sentry
Expected behavior
The component resizes sucessfully without throwing errors in the console.
The text was updated successfully, but these errors were encountered: