Set webview data directory suffix before starting crash logging #11226
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #10494. (maybe) To quote @mzorz from the previous PR:
@mzorz did a great job explaining the issue in both the original issue and its PR and for quite a while I couldn't even come up with a theory for how we were still having this crash. Now, I have a theory, but it might be a stupid one and a little far fetched. What if the issue is related to Sentry setup?
When we enable the crash logging Sentry might be accessing methods from
android.webkit
which means we won't have the WebView data directory suffix setup before it. I am not sure how best we can check if that's the case, but I think it's reasonable for Sentry to setup network stuff since they need to send the crash reports.Now the tricky bit is that, if we make the suggested change in this PR and the app crashes in
setWebViewDataDirectorySuffixOnAndroidP
we won't be aware of it and related crash reports might disappear. I feel it's very unlikely for that to be the cause of this crash or to result in a crash itself, but it's a risk we'd have to take.It'd be great to get opinions of a few people for this. What do you think @mzorz @maxme @jkmassel ?
To test:
PR submission checklist:
RELEASE-NOTES.txt
if necessary.