Repository navigation
NullPointerException while picking multiple images from gallery #104168
Description
Activity
- addedin triagePresently being triaged by the triage teamPresently being triaged by the triage team
on May 19, 2022 Hi @anirudhkh1, thanks for filing the issue. I attempted to reproduce this on my Poco X3 NFC, but the images worked just fine.
Is this a general issue with you selecting images from the gallery with the image picker, or does it only occur when you select multiple images?
Is that the only device you're experiencing this issue with?
video
telegram-cloud-document-4-5780414046360570877.mp4
- addedwaiting for responseThe Flutter team cannot make further progress on this issue until the original reporter respondsThe Flutter team cannot make further progress on this issue until the original reporter responds
on May 19, 2022 Hey @danagbemava-nc, thanks for looking into it.
It crashes only when I select multi-image. It works fine in picking a single image.
Also, I have an app uploaded on Google Play, users have informed me their app crashes too while picking an image. Their crashes are very random and I cannot provide you with reproducible steps.
- removedwaiting for responseThe Flutter team cannot make further progress on this issue until the original reporter respondsThe Flutter team cannot make further progress on this issue until the original reporter responds
on May 19, 2022 Also, I have an app uploaded on Google Play, users have informed me their app crashes too while picking an image. Their crashes are very random and I cannot provide you with reproducible steps.
If the crash logs are available on google play or crashlytics, kindly file a new issue and provide the crash logs as well as the version of flutter that was used to deploy the app and the list of affected devices.
It crashes only when I select multi-image.
Does selecting multi-image work from any place other than the gallery?
- addedwaiting for responseThe Flutter team cannot make further progress on this issue until the original reporter respondsThe Flutter team cannot make further progress on this issue until the original reporter responds
on May 19, 2022 Does selecting multi-image work from any place other than the gallery?
Yes it works fine for any other option selected apart from that. It just crashes when I select Photos option (as shown in video)
If the crash logs are available on google play or crashlytics, kindly file a new issue and provide the crash logs as well as the version of flutter that was used to deploy the app and the list of affected devices.
Can I provide logs here? As both of the issue occurs while picking image.
- removedwaiting for responseThe Flutter team cannot make further progress on this issue until the original reporter respondsThe Flutter team cannot make further progress on this issue until the original reporter responds
on May 20, 2022 Can I provide logs here? As both of the issue occurs while picking image.
It would be best to provide it in a new issue. Their issue might be different from what you are running into.
Yes it works fine for any other option selected apart from that. It just crashes when I select Photos option (as shown in video)
One more question, is there any relation between the number of images picked and the crash? Or does it crash regardless of how many images you pick so far as you're using the
multiImageflag?- addedwaiting for responseThe Flutter team cannot make further progress on this issue until the original reporter respondsThe Flutter team cannot make further progress on this issue until the original reporter responds
on May 20, 2022 It would be best to provide it in a new issue. Their issue might be different from what you are running into.
Ok will create new issue as soon as possible.
One more question, is there any relation between the number of images picked and the crash? Or does it crash regardless of how many images you pick so far as you're using the
multiImageflag?Crash happens regardless of how many images I pick. Even if its 1 or 3 or 10, it crashes.
- removedwaiting for responseThe Flutter team cannot make further progress on this issue until the original reporter respondsThe Flutter team cannot make further progress on this issue until the original reporter responds
on May 20, 2022 Thanks for the info.
Btw, is this issue only on android 12? and what other devices does it reproduce on?
I also forgot to ask, what version of
image_pickerare you using?- addedwaiting for responseThe Flutter team cannot make further progress on this issue until the original reporter respondsThe Flutter team cannot make further progress on this issue until the original reporter responds
on May 20, 2022 37 remaining items
The PR only affected the single-image path, which is a different result codepath, so it can't fix the issue originally reported here.
This issue ended up conflating two different crashes. E.g., #104168 (comment) and #104168 (comment), which are different codepaths. The former could definitely be fixed by the PR that landed, but the latter (which looks like it would probably align with the original issue report in terms of usage) couldn't be.
The remaining crash looks like
ClipDatais present, but contains entries with null URIs.Reacted by Gray MackallI had the exact same problem (
NullPointerException: uriatandroid.content.ContentResolver.openInputStream(ContentResolver.java:1185)) and it got fixed after upgrading toimage_picker_android: ^0.8.8+1.Can confirm, updating to
image_picker_android: ^0.8.8+1solves the issue.- added a commit that references this issue
on May 14, 2024 - addedr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer version
on May 15, 2024 - added a commit that references this issue
on May 22, 2024 This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.- locked as resolved and limited conversation to collaborators
on May 29, 2024 - added a commit that references this issue
on Jun 10, 2026 - added a commit that references this issue
on Jun 19, 2026
Issue
Hi, my app is getting crashed while using Image Picker. The app gets crashed when using Pick MultiImage Mode.
Phone Model -> LE2111 (OnePlus 9)
Android Version -> 12
The code being used here is same as the code provided in flutter image picker documentation (example app).
Steps to Reproduce
Expected results: 3 images should have been displayed on screen
Actual results: App is getting crashed
main.dart
homepage.dart
pubspec.yaml
Logs
Record_2022-05-19-15-38-08.mp4