Closed Lilian-C closed 1 week ago
Faced same issue:
Fatal Exception: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=2343, result=-1, data=null} to activity {com.agendaboa.app/com.agendaboa.app.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.net.Uri android.content.Intent.getData()' on a null object reference
at android.app.ActivityThread.deliverResults(ActivityThread.java:5946)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:5985)
at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:54)
at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2443)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8751)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)
Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'android.net.Uri android.content.Intent.getData()' on a null object reference
at com.mr.flutter.plugin.filepicker.FilePickerDelegate.onActivityResult(FilePickerDelegate.java:89)
at io.flutter.embedding.engine.FlutterEngineConnectionRegistry$FlutterEngineActivityPluginBinding.onActivityResult(FlutterEngineConnectionRegistry.java:774)
at io.flutter.embedding.engine.FlutterEngineConnectionRegistry.onActivityResult(FlutterEngineConnectionRegistry.java:422)
at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onActivityResult(FlutterActivityAndFragmentDelegate.java:857)
at io.flutter.embedding.android.FlutterFragment.onActivityResult(FlutterFragment.java:1251)
at io.flutter.embedding.android.FlutterFragmentActivity.onActivityResult(FlutterFragmentActivity.java:653)
at android.app.Activity.dispatchActivityResult(Activity.java:8659)
at android.app.ActivityThread.deliverResults(ActivityThread.java:5939)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:5985)
at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:54)
at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2443)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8751)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)
Device Brand:Samsung Model:Galaxy M31 Orientation:Portrait RAM free: 1.22 GB Disk free: 33.86 GB Operating System Version:Android 12 Orientation:Portrait Rooted: No
file_picker: 8.0.5
This issue is stale because it has been open for 7 days with no activity.
@miguelpruivo Please check this issue when you have the time.
Hey @miguelpruivo , I made a PR for this issue: https://github.com/miguelpruivo/flutter_file_picker/pull/1615
FYI @rohansohonee1 , PR https://github.com/miguelpruivo/flutter_file_picker/pull/1615 was merged, it's available on version 8.1.3 of flutter_file_picker
This issue is stale because it has been open for 7 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.
Hello,
Firebase is showing this error on our production app:
I'm not sure, but it looks like a null safety error in the FilePickerDelegate.java file, on the data.getData() call inside the onActivityResult method.