-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Android chrome crashes on opening password protected PDF #29103
Android chrome crashes on opening password protected PDF #29103
Conversation
PR is ready) |
}, | ||
}); | ||
canvasSize | ||
.maxArea({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we get a comment here explaining why we're doing this? Thanks!
A bit explanation that I took from the issue from canvas-size library which calls a crash Given these inconsistent results, my assumption would have been that the Browserstack VM is not as reliable as testing on real hardware. Since your users are experiencing issue on real hardware I can only assume that platform itself is unstable when rendering large canvas elements. This isn't totally unexpected given the hardware limitations on mobile devices and the RAM requirements of rendering large in-memory canvas elements. Fortunately, there is an easy fix: limit the maximum canvas size used for testing. Since this issue is only affecting mobile devices, use the mobile test results available in the README.md to find a suitable max value. |
Thanks for the explanation but I meant a |
Also could we update testing step 4 to read |
Onyx.merge(ONYXKEYS.MAX_CANVAS_AREA, width * height); | ||
}, | ||
}); | ||
canvasSize |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
canvasSize | |
// We're limiting the maximum value on mobile web to prevent a crash related to rendering large canvas elements. | |
// More information at: https://github.com/jhildenbiddle/canvas-size/issues/13 | |
canvasSize |
src/libs/actions/CanvasSize.js
Outdated
|
||
/** | ||
* Calculate the max area of canvas on this specific platform and save it in onyx | ||
* Calculate the max area of canvas on this specific platform and save it in onyx. The maximum value was limited because on mobile devices there is a crash related to the size of the area |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Calculate the max area of canvas on this specific platform and save it in onyx. The maximum value was limited because on mobile devices there is a crash related to the size of the area | |
* Calculate the max area of canvas on this specific platform and save it in onyx. |
@ZhenjaHorbach Apologies for messing around but I made a second revision to that suggestion. |
I have fixed ) |
Reviewer Checklist
Screenshots/VideosWeb01_MacOS_Chrome.mp4Mobile Web - Chrome02_Android_Chrome.mp4Mobile Web - Safari03_iOS_Safari.mp4Desktop04_MacOS_Desktop.mp4iOS05_iOS_Native.mp4Android06_Android_Native.mp4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested on a variety of PDFs of varying sizes, works well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to production by https://github.com/jasperhuangg in version: 1.3.83-11 🚀
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 1.3.83-11 🚀
|
1 similar comment
🚀 Deployed to production by https://github.com/jasperhuangg in version: 1.3.83-11 🚀
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 1.3.83-11 🚀
|
Details
Android chrome crashes on opening password protected PDF page
Fixed Issues
$ #28179
PROPOSAL: #28179 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Screen.Recording.2023-10-09.at.17.56.46.mov
Android: mWeb Chrome
Screen.Recording.2023-10-09.at.17.51.06.mov
iOS: Native
Screen.Recording.2023-10-09.at.17.52.36.mov
iOS: mWeb Safari
Screen.Recording.2023-10-09.at.17.49.25.mov
MacOS: Chrome / Safari
Screen.Recording.2023-10-09.at.17.27.27.mov
MacOS: Desktop
Screen.Recording.2023-10-09.at.18.12.18.mov