-
Notifications
You must be signed in to change notification settings - Fork 578
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
DiskReadViolation triggered by setCrashlyticsCollectionEnabled() #3265
Comments
Hi @DanielNovak, thanks for reporting. We'll investigate this and see what we can find. |
@DanielNovak, I was unable to reproduce the issue with the given steps. After enabling StrictMode policy. I've added the However, I didn't experience any issue on runtime on either Android 10.0, 11.0, or 12.0 Am I missing anything? If it's possible could you provide us a minimal reproducible example with the issue so I can investigate this further. |
@argzdev There is no direct issue or crash - but you will see the log entry in the logs. You can also change the code to:
to crash the app on strict mode violation. But make sure that you enable StrictMode before calling So this strict mode is more like a warning - that the Crashlytics is accessing the disk on main thread, but it's not causing any visible problems or crashes. |
Thanks for the clarification @DanielNovak, I see it now. I'll notify an engineer and see what we can do about this. In the meantime, I'll create a pull request for the fix you provided. If this is approved by our engineers, we can include this on the next release. |
Thanks @DanielNovak, I merged the change and it will be available in our next release, |
Since this has been released in our latest version 18.2.7, I'll be closing this now. Thanks! |
Describe your environment
Describe the problem
Firebase Crashlytics is triggering Android StrictMode DiskReadViolation when
setCrashlyticsCollectionEnabled(true)
is called.Steps to reproduce:
Enable strict mode:
and call:
FirebaseCrashlytics.getInstance().setCrashlyticsCollectionEnabled(enableCrashlytics)
Relevant Code:
The problem is in Firebase
DataCollectionArbitrer.java
. It's usingcommit()
instead ofapply()
:For some reason the developers also marked it with
@SuppressLint({"ApplySharedPref"})
. So maybe they had a reason to do it like this? But then this call is always blocking the main thread on many apps on start...The text was updated successfully, but these errors were encountered: