joltup / rn-fetch-blob

A project committed to making file access and data transfer easier, efficient for React Native developers.
MIT License
2.8k stars 767 forks source link

Unable to get provider com.RNFetchBlob.Utils.FileProvider #847

Open florindumitru opened 11 months ago

florindumitru commented 11 months ago

In crashlytics I get the following crash:

FileProvider.attachInfo

Fatal Exception: java.lang.RuntimeException: Unable to get provider com.RNFetchBlob.Utils.FileProvider: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String[] java.lang.String.split(java.lang.String)' on a null object reference
       at android.app.ActivityThread.installProvider(ActivityThread.java:7236)
       at android.app.ActivityThread.installContentProviders(ActivityThread.java:6723)
       at android.app.ActivityThread.handleInstallProvider(ActivityThread.java:3727)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2019)
       at android.os.Handler.dispatchMessage(Handler.java:107)
       at android.os.Looper.loop(Looper.java:214)
       at android.app.ActivityThread.main(ActivityThread.java:7649)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:503)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)

The provider com.RNFetchBlob.Utils.FileProvider exists in the app, I even checked the release apk and is there(in the providers list) Seems to happen only when the app is in the background, in the first 5 seconds after the app starts(crashlytics stats).

I cannot reproduce this crash, but users keep having this issue.

Any idea please, or anyone who experience this issue ?

"react-native": "0.68.5", "rn-fetch-blob": "0.12.0",