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

Fix the crashes in UploadUtilsWrapper caused by null snackbarAttachView #21011

Closed

Conversation

irfano
Copy link
Member

@irfano irfano commented Jun 21, 2024

Fixes #21010
I can't reproduce the crash, but it occurs when the activity is stopped while the snackbar is being invoked in a separate thread, such as in onActivityResult or EventBus functions. Therefore, I added a check before showing snackbars.

There are different crashes on Sentry related to UploadUtilsWrapper. If the snackbarAttachView is null, it's pointless to call functions showing snackbars. I made all snackbarAttachView parameters non-null and checked their nullability in the Java classes where these UploadUtilsWrapper' functions are being called.


To Test:

Since I can't reproduce it, it's not testable.


Regression Notes

  1. Potential unintended areas of impact

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

    • N/A
  3. What automated tests I added (or what prevented me from doing so)

    • Since I can't reproduce it, I didn't add a test.

PR Submission Checklist:

  • I have completed the Regression Notes.
  • 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.

Testing Checklist (strike-out the not-applying and unnecessary ones):

  • WordPress.com sites and self-hosted Jetpack sites.
  • Portrait and landscape orientations.
  • Light and dark modes.
  • Fonts: Larger, smaller and bold text.
  • High contrast.
  • Talkback.
  • Languages with large words or with letters/accents not frequently used in English.
  • Right-to-left languages. (Even if translation isn’t complete, formatting should still respect the right-to-left layout)
  • Large and small screen sizes. (Tablet and smaller phones)
  • Multi-tasking: Split screen and Pop-up view. (Android 10 or higher)

@irfano irfano added this to the 25.2 milestone Jun 21, 2024
@dangermattic
Copy link
Collaborator

1 Warning
⚠️ This PR is assigned to the milestone 25.2. This milestone is due in less than 4 days.
Please make sure to get it merged by then or assign it to a milestone with a later deadline.

Generated by 🚫 Danger

Copy link

sonarcloud bot commented Jun 21, 2024

@irfano irfano changed the base branch from trunk to release/25.1 June 21, 2024 15:53
@irfano irfano changed the base branch from release/25.1 to trunk June 21, 2024 15:53
@wpmobilebot
Copy link
Contributor

WordPress📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress WordPress
FlavorJalapeno
Build TypeDebug
Versionpr21011-d7b39a9
Commitd7b39a9
Direct Downloadwordpress-prototype-build-pr21011-d7b39a9.apk
Note: Google Login is not supported on these builds.

@wpmobilebot
Copy link
Contributor

Jetpack📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack Jetpack
FlavorJalapeno
Build TypeDebug
Versionpr21011-d7b39a9
Commitd7b39a9
Direct Downloadjetpack-prototype-build-pr21011-d7b39a9.apk
Note: Google Login is not supported on these builds.

@irfano irfano closed this Jun 21, 2024
@irfano irfano deleted the issue/21010-fix-crash-on-reader-post-list-screen branch June 21, 2024 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants