Skip to content
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

Avoid WPMediaPickerViewController performBatchUpdates crash by wrapping the call in try-catch block #21231

Conversation

staskus
Copy link
Contributor

@staskus staskus commented Aug 2, 2023

Fixes #21102

This is a number one crash for 22.8, more context about the fix in MediaPicker repository: wordpress-mobile/MediaPicker-iOS#412

To test:

  1. Fresh install app
  2. Login
  3. My Site
  4. Media
  5. Confirm that the media appears and there's no crash

Regression Notes

  1. Potential unintended areas of impact

Instead of crashing, the media picker may appear in an unexpected state or layout

  1. What I did to test those areas of impact (or what existing automated tests I relied on)

Manual testing of media picker

  1. What automated tests I added (or what prevented me from doing so)

None

PR submission checklist:

  • I have completed the Regression Notes.
  • I have considered adding unit tests for my changes.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@staskus staskus added this to the 22.9 ❄️ milestone Aug 2, 2023
@staskus staskus requested review from kean and salimbraksa August 2, 2023 13:51
@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented Aug 2, 2023

Warnings
⚠️ This PR is assigned to a milestone which is closing in less than 4 days Please, make sure to get it merged by then or assign it to a later expiring milestone

Generated by 🚫 dangerJS

@staskus
Copy link
Contributor Author

staskus commented Aug 2, 2023

@tiagomar @mokagio

Do you think it would be still possible to get this fix into 22.9 (assuming the reviews go through in one day time)? We've chosen what in our view is the safest possible fix to WPMediaPickerViewController which does not change the way data or layout is loaded but simply catches the exception.

Some more context from @kean about this context here: pcdRpT-3jc-p2#comment-5568

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Aug 2, 2023

Jetpack Alpha📲 You can test the changes from this Pull Request in Jetpack Alpha by scanning the QR code below to install the corresponding build.
App NameJetpack Alpha Jetpack Alpha
ConfigurationRelease-Alpha
Build Numberpr21231-6ff2afa
Version22.9
Bundle IDcom.jetpack.alpha
Commit6ff2afa
App Center Buildjetpack-installable-builds #5608
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

@staskus staskus force-pushed the fix/21102-wpmediapickerviewcontroller-nsinternalinconcistencyexception-crash branch from 9c02933 to 6ff2afa Compare August 2, 2023 14:53
@staskus staskus marked this pull request as ready for review August 2, 2023 14:53
@wpmobilebot
Copy link
Contributor

WordPress Alpha📲 You can test the changes from this Pull Request in WordPress Alpha by scanning the QR code below to install the corresponding build.
App NameWordPress Alpha WordPress Alpha
ConfigurationRelease-Alpha
Build Numberpr21231-6ff2afa
Version22.9
Bundle IDorg.wordpress.alpha
Commit6ff2afa
App Center BuildWPiOS - One-Offs #6574
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

@mokagio
Copy link
Contributor

mokagio commented Aug 3, 2023

@mokagio

Do you think it would be still possible to get this fix into 22.9

Sure thing!

@mokagio mokagio merged commit 45197c1 into release/22.9 Aug 3, 2023
@mokagio mokagio deleted the fix/21102-wpmediapickerviewcontroller-nsinternalinconcistencyexception-crash branch August 3, 2023 01:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants