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: do not crash on android 11 #672

Merged
merged 3 commits into from Jun 29, 2023

Conversation

sveinar
Copy link
Contributor

@sveinar sveinar commented Jun 2, 2023

Overview

We are submitting this PR as part of the errors we are seeing in one of our hostapps in Microsoft on Android. Especially on Android 11, there seems to be a SecurityException thrown if the app is not bound yet while the Activity is created. Google has fixed this issue in vNext, Android 13 and Android 12. However, Android 11 still remains unpatched crashing around 500 times per week.

Test Plan

For the test plan, it is a bit hard to repro due to the timing error. If you have a look at the fix by Chalard Jean at Google here, it involves several manual steps to get into this bad state for the ConnectivityManager.

Issue link

#674

@sveinar sveinar requested a review from matt-oakes as a code owner June 2, 2023 13:13
@tido64
Copy link
Contributor

tido64 commented Jun 3, 2023

@mikehardy: Any chance you could take a quick look at this? Many thanks 😄

@sveinar
Copy link
Contributor Author

sveinar commented Jun 8, 2023

Friendly ping here to @mikehardy and perhaps @matt-oakes for this PR review :) Appreciate it! Thanks.

@sveinar sveinar mentioned this pull request Jun 8, 2023
Copy link
Contributor

@mikehardy mikehardy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the long long delay - I like the idea of including the comment from @tido64 and I proposed that as suggestions. I assume they'll compile, and if CI goes green I'll merge

@mikehardy mikehardy added the pending merge A PR that will be merged shortly, waiting for CI or final comment label Jun 29, 2023
@mikehardy mikehardy merged commit bb13143 into react-native-netinfo:master Jun 29, 2023
2 checks passed
@mikehardy mikehardy removed the pending merge A PR that will be merged shortly, waiting for CI or final comment label Jun 29, 2023
github-actions bot pushed a commit that referenced this pull request Jun 29, 2023
## [9.3.11](v9.3.10...v9.3.11) (2023-06-29)

### Bug Fixes

* do not crash on android 11 ([#672](#672)) ([bb13143](bb13143))
@matt-oakes
Copy link
Collaborator

🎉 This PR is included in version 9.3.11 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants