-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
flutter/packages
#6691Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work listc: crashStack traces logged to the consoleStack traces logged to the consolec: fatal crashCrashes that terminate the processCrashes that terminate the processp: image_pickerThe Image Picker plugin.The Image Picker plugin.packageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-androidAndroid applications specificallyAndroid applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-androidOwned by Android platform teamOwned by Android platform teamtriaged-androidTriaged by Android platform teamTriaged by Android platform team
Description
Steps to reproduce
EDIT: I am using the pickMultiImage function
- Click button to open image_picker on android 13
- Select a single image
- Click
View Selectedon lower left side of screen - Click
Selectedbutton to unselect the single image (addbutton will reflect 0 images selected) - Click add button
Expected results
Image picker should close when this flow is done, as tested on native android applications.
Actual results
The app crashes.
Code sample
try {
final picker = ImagePicker();
final permissionStatus =
await ImagesUtils.getPhotoPickingPermissionStatus(source);
if (permissionStatus.isGranted || permissionStatus.isLimited) {
final image = await picker.pickImage(source: source);
}
} catch (e){
print(e);
}
Screenshots or Video
Logs
Logs
E/AndroidRuntime(25551): java.lang.NullPointerException: uri
E/AndroidRuntime(25551): at java.util.Objects.requireNonNull(Objects.java:232)
E/AndroidRuntime(25551): at android.content.ContentResolver.openInputStream(ContentResolver.java:1511)
E/AndroidRuntime(25551): at io.flutter.plugins.imagepicker.FileUtils.getPathFromUri(FileUtils.java:55)
E/AndroidRuntime(25551): at io.flutter.plugins.imagepicker.ImagePickerDelegate.handleChooseMultiImageResult(ImagePickerDelegate.java:707)
E/AndroidRuntime(25551): at io.flutter.plugins.imagepicker.ImagePickerDelegate.lambda$onActivityResult$1$io-flutter-plugins-imagepicker-ImagePickerDelegate(ImagePickerDelegate.java:609)
E/AndroidRuntime(25551): at io.flutter.plugins.imagepicker.ImagePickerDelegate$$ExternalSyntheticLambda1.run(Unknown Source:6)
E/AndroidRuntime(25551): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
E/AndroidRuntime(25551): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
E/AndroidRuntime(25551): at java.lang.Thread.run(Thread.java:1012)
I/ViewRootImpl@c3d471f[MainActivity](25551): MSG_WINDOW_FOCUS_CHANGED 1 0
D/ViewRootImpl@c3d471f[MainActivity](25551): mThreadedRenderer.initializeIfNeeded()#2 mSurface={isValid=true 0xb4000073ea96d390}
D/InputMethodManagerUtils(25551): startInputInner - Id : 0
I/InputMethodManager(25551): startInputInner - IInputMethodManagerGlobalInvoker.startInputOrWindowGainedFocus
I/Process (25551): Sending signal. PID: 25551 SIG: 9
Lost connection to device.
Flutter Doctor output
Doctor output
[✓] Flutter (Channel stable, 3.19.5, on macOS 13.6.1 22G313 darwin-arm64, locale en-PH)
• Flutter version 3.19.5 on channel stable at /Users/jamespatrickjilhaney/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 300451adae (4 weeks ago), 2024-03-27 21:54:07 -0500
• Engine revision e76c956498
• Dart version 3.3.3
• DevTools version 2.31.1
[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at /Users/jamespatrickjilhaney/Library/Android/sdk
✗ cmdline-tools component is missing
Run `path/to/sdkmanager --install "cmdline-tools;latest"`
See https://developer.android.com/studio/command-line for more details.
✗ Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[✓] Xcode - develop for iOS and macOS (Xcode 15.0.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 15A507
• CocoaPods version 1.14.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2022.3)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
[✓] VS Code (version 1.88.0)
• VS Code at /Users/jamespatrickjilhaney/Downloads/Visual Studio Code.app/Contents
• Flutter extension version 3.86.0
[✓] Connected device (4 available)
• SM G996N (mobile) • R3CR1068VDD • android-arm64 • Android 14 (API 34)
• iPhone SE (3rd generation) (mobile) • BE33B77B-5993-4F32-807B-1CB29C0F7C13 • ios • com.apple.CoreSimulator.SimRuntime.iOS-17-0 (simulator)
• macOS (desktop) • macos • darwin-arm64 • macOS 13.6.1 22G313 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 119.0.6045.105
[✓] Network resources
• All expected network resources are available.Metadata
Metadata
Assignees
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work listc: crashStack traces logged to the consoleStack traces logged to the consolec: fatal crashCrashes that terminate the processCrashes that terminate the processp: image_pickerThe Image Picker plugin.The Image Picker plugin.packageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-androidAndroid applications specificallyAndroid applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-androidOwned by Android platform teamOwned by Android platform teamtriaged-androidTriaged by Android platform teamTriaged by Android platform team
