Skip to content
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

[image_picker][IOS] throws error while canceling from pickMultipleMedia #133111

Closed
2 tasks done
jaypathak9460 opened this issue Aug 23, 2023 · 4 comments · Fixed by flutter/packages#4761
Closed
2 tasks done
Assignees
Labels
found in release: 3.13 Found to occur in 3.13 found in release: 3.14 Found to occur in 3.14 fyi-ecosystem For the attention of Ecosystem team has reproducible steps The issue has been confirmed reproducible and is ready to work on p: image_picker The Image Picker plugin. P1 High-priority issues at the top of the work list package flutter/packages repository. See also p: labels. r: fixed Issue is closed as already fixed in a newer version team-ios Owned by iOS platform team

Comments

@jaypathak9460
Copy link

jaypathak9460 commented Aug 23, 2023

Is there an existing issue for this?

Steps to reproduce

  1. install the package on IOS platform
  2. use [ List<XFile>? pickedFileList = await ImagePicker().pickMultipleMedia( requestFullMetadata: true, imageQuality: 100, maxHeight: 100, maxWidth: 100, );].
  3. when picker shows just tap cancel on top left side

Expected results

throw an error PlatformException(null-error, Host platform returned null value for non-null return value., null, null)

Actual results

it should return null or list length of 0 instead of throwing error

Code sample

Code sample

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
jaypathak@News-Mac OctaBeesLite % flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.10.6, on macOS 13.2.1 22D68 darwin-x64, locale en-IN)
[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    ✗ 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 14.3.1)
[✓] Chrome - develop for the web
[!] Android Studio (version 2022.3)
    ✗ Unable to find bundled Java version.
[✓] VS Code (version 1.81.1)
[✓] Connected device (3 available)
[✓] HTTP Host Availability

! Doctor found issues in 2 categories.
@danagbemava-nc danagbemava-nc added the in triage Presently being triaged by the triage team label Aug 23, 2023
@danagbemava-nc
Copy link
Member

Reproducible using the plugin example code. Cancelling the operation with the pickMultipleImage method does not through an error but it does for pickMultipleMedia.

In my testing, this did not reproduce on android.

flutter doctor -v
[✓] Flutter (Channel stable, 3.13.0, on macOS 13.4.1 22F770820d darwin-arm64, locale en-GB)
    • Flutter version 3.13.0 on channel stable at /Users/nexus/dev/sdks/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision efbf63d9c6 (7 days ago), 2023-08-15 21:05:06 -0500
    • Engine revision 1ac611c64e
    • Dart version 3.1.0
    • DevTools version 2.25.0

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
    • Android SDK at /Users/nexus/Library/Android/sdk
    • Platform android-33, build-tools 33.0.1
    • Java binary at: /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/223.8836.35.2231.10406996/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
    • Xcode at /Applications/Xcode-14.3.0.app/Contents/Developer
    • Build 14E222b
    • CocoaPods version 1.12.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.2)
    • Android Studio at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/222.4459.24.2221.10121639/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.6b802.4-9586694)

[✓] Android Studio (version 2022.3)
    • Android Studio at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/223.8836.35.2231.10406996/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)

[✓] IntelliJ IDEA Ultimate Edition (version 2023.2)
    • IntelliJ at /Users/nexus/Applications/JetBrains Toolbox/IntelliJ IDEA Ultimate.app
    • Flutter plugin version 75.1.4
    • Dart plugin version 232.8660.129

[✓] IntelliJ IDEA Ultimate Edition (version 2023.1.4)
    • IntelliJ at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/231.9225.16/IntelliJ IDEA.app
    • 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

[✓] IntelliJ IDEA Ultimate Edition (version 2023.2)
    • IntelliJ at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/232.8660.185/IntelliJ IDEA.app
    • 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

[✓] VS Code (version 1.81.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.70.0

[✓] Connected device (4 available)
    • Pixel 7 (mobile) • 28291FDH2001SA            • android-arm64  • Android 13 (API 33)
    • Nexus (mobile)   • 00008020-001875E83A38002E • ios            • iOS 16.6 20G75
    • macOS (desktop)  • macos                     • darwin-arm64   • macOS 13.4.1 22F770820d darwin-arm64
    • Chrome (web)     • chrome                    • web-javascript • Google Chrome 116.0.5845.96

[✓] Network resources
    • All expected network resources are available.

• No issues found!
[!] Flutter (Channel master, 3.14.0-9.0.pre.52, on macOS 13.4.1 22F770820d darwin-arm64, locale en-GB)
    • Flutter version 3.14.0-9.0.pre.52 on channel master at /Users/nexus/dev/sdks/flutters
    ! Warning: `flutter` on your path resolves to /Users/nexus/dev/sdks/flutter/bin/flutter, which is not inside your current Flutter SDK checkout at /Users/nexus/dev/sdks/flutters. Consider adding /Users/nexus/dev/sdks/flutters/bin to the front of your path.
    ! Warning: `dart` on your path resolves to /Users/nexus/dev/sdks/flutter/bin/dart, which is not inside your current Flutter SDK checkout at /Users/nexus/dev/sdks/flutters. Consider adding /Users/nexus/dev/sdks/flutters/bin to the front of your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 4bbcb780a6 (3 hours ago), 2023-08-23 00:53:44 -0400
    • Engine revision 7d56840865
    • Dart version 3.2.0 (build 3.2.0-97.0.dev)
    • DevTools version 2.26.2
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
    • Android SDK at /Users/nexus/Library/Android/sdk
    • Platform android-33, build-tools 33.0.1
    • Java binary at: /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/223.8836.35.2231.10406996/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
    • Xcode at /Applications/Xcode-14.3.0.app/Contents/Developer
    • Build 14E222b
    • CocoaPods version 1.12.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.2)
    • Android Studio at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/222.4459.24.2221.10121639/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.6b802.4-9586694)

[✓] Android Studio (version 2022.3)
    • Android Studio at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/223.8836.35.2231.10406996/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)

[✓] IntelliJ IDEA Ultimate Edition (version 2023.1.4)
    • IntelliJ at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/231.9225.16/IntelliJ IDEA.app
    • 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

[✓] IntelliJ IDEA Ultimate Edition (version 2023.2)
    • IntelliJ at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/232.8660.185/IntelliJ IDEA.app
    • 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

[✓] VS Code (version 1.81.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.70.0

[✓] Connected device (4 available)
    • Pixel 7 (mobile) • 28291FDH2001SA            • android-arm64  • Android 13 (API 33)
    • Nexus (mobile)   • 00008020-001875E83A38002E • ios            • iOS 16.6 20G75
    • macOS (desktop)  • macos                     • darwin-arm64   • macOS 13.4.1 22F770820d darwin-arm64
    • Chrome (web)     • chrome                    • web-javascript • Google Chrome 116.0.5845.96

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.

@danagbemava-nc danagbemava-nc added p: image_picker The Image Picker plugin. package flutter/packages repository. See also p: labels. has reproducible steps The issue has been confirmed reproducible and is ready to work on fyi-ecosystem For the attention of Ecosystem team team-ios Owned by iOS platform team found in release: 3.13 Found to occur in 3.13 found in release: 3.14 Found to occur in 3.14 and removed in triage Presently being triaged by the triage team labels Aug 23, 2023
@stuartmorgan stuartmorgan added the P1 High-priority issues at the top of the work list label Aug 23, 2023
@stuartmorgan stuartmorgan self-assigned this Aug 23, 2023
auto-submit bot pushed a commit to flutter/packages that referenced this issue Aug 23, 2023
#4761)

Makes the Pigeon interface for the iOS implementation consistent in returning non-nullable lists, in keeping with our strong preference in this repo for collections being non-nullable whenever reasonable (to avoid the issue of having two ways of expressing the same thing), and updates the native side never to return a `nil` list.

Fixes flutter/flutter#133111
@jaypathak9460
Copy link
Author

so when the next release will be for image_picker ? so i can implement into my code

@danagbemava-nc danagbemava-nc added the r: fixed Issue is closed as already fixed in a newer version label Aug 24, 2023
@stuartmorgan
Copy link
Contributor

The fix was to image_picker_ios, and it was published yesterday.

nksteven pushed a commit to nksteven/ez_image_picker_ios that referenced this issue Aug 29, 2023
…S (#4761)

Makes the Pigeon interface for the iOS implementation consistent in returning non-nullable lists, in keeping with our strong preference in this repo for collections being non-nullable whenever reasonable (to avoid the issue of having two ways of expressing the same thing), and updates the native side never to return a `nil` list.

Fixes flutter/flutter#133111
@github-actions
Copy link

github-actions bot commented Sep 7, 2023

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 -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
found in release: 3.13 Found to occur in 3.13 found in release: 3.14 Found to occur in 3.14 fyi-ecosystem For the attention of Ecosystem team has reproducible steps The issue has been confirmed reproducible and is ready to work on p: image_picker The Image Picker plugin. P1 High-priority issues at the top of the work list package flutter/packages repository. See also p: labels. r: fixed Issue is closed as already fixed in a newer version team-ios Owned by iOS platform team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants