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]: Image gallery opens twice if we choose select photos permission. #90373

Open
Trteich opened this issue Sep 20, 2021 · 44 comments
Labels
c: regression It was better in the past than it is now customer: crowd Affects or could affect many people, though not necessarily a specific customer. found in release: 3.10 Found to occur in 3.10 found in release: 3.11 Found to occur in 3.11 has reproducible steps The issue has been confirmed reproducible and is ready to work on p: image_picker The Image Picker plugin. P2 Important issues not at the top of the work list package flutter/packages repository. See also p: labels. platform-ios iOS applications specifically team-ios Owned by iOS platform team triaged-ios Triaged by iOS platform team

Comments

@Trteich
Copy link

Trteich commented Sep 20, 2021

Hi. Issue #78108 still present in Image Picker

Flutter version: 2.5.1
image_picker version: 0.8.4+2
IOS version: 14.7.1

@darshankawar darshankawar added the in triage Presently being triaged by the triage team label Sep 20, 2021
@darshankawar
Copy link
Member

@Trteich
Can you verify the same on latest master and check if issue still persists or not ?

flutter channel master
flutter upgrade

@darshankawar darshankawar added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Sep 20, 2021
@stuartmorgan
Copy link
Contributor

@darshankawar Plugins support the latest version of stable

@stuartmorgan stuartmorgan removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Sep 20, 2021
@darshankawar
Copy link
Member

Thanks for the info @stuartmorgan.
I verified this behavior on latest stable and master on iOS and see the same result. ie, After giving select photos permission and then trying to select an image from gallery, it opens twice as shown below:

select_photos_90373.mov

Whereas, giving allow all access permission, selecting an image is displayed on main screen as expected:

all_perm_90373.mov

Used plugin's official example to verify.

stable, master flutter doctor -v
[✓] Flutter (Channel stable, 2.5.1, on Mac OS X 10.15.4 19E2269 darwin-x64,
    locale en-GB)
    • Flutter version 2.5.1 at /Users/dhs/documents/fluttersdk/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ffb2ecea52 (2 days ago), 2021-09-17 15:26:33 -0400
    • Engine revision b3af521a05
    • Dart version 2.14.2

[✓] Android toolchain - develop for Android devices (Android SDK version 30)
    • Android SDK at /Users/dhs/Library/Android/sdk
    • Platform android-30, build-tools 30.0.3
    • ANDROID_HOME = /Users/dhs/Library/Android/sdk
    • Java binary at: /Users/dhs/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/202.7486908/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.    

[✓] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.3, Build version 12C33
    • CocoaPods version 1.10.1

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

[✓] Android Studio (version 4.1)
    • Android Studio at /Users/dhs/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/202.7486908/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
      1.8.0_242-release-1644-b3-6915495)        

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

[✓] Connected device (4 available)
    • Darshan's iphone (mobile)  • 21150b119064aecc249dfcfe05e259197461ce23 •
      ios            • iOS 14.4.1 18D61
    • iPhone 12 Pro Max (mobile) • A5473606-0213-4FD8-BA16-553433949729     •
      ios            • com.apple.CoreSimulator.SimRuntime.iOS-14-3 (simulator)
    • macOS (desktop)            • macos                                    •
      darwin-x64     • Mac OS X 10.15.4 19E2269 darwin-x64
    • Chrome (web)               • chrome                                   •
      web-javascript • Google Chrome 93.0.4577.82


• No issues found!

[✓] Flutter (Channel master, 2.6.0-6.0.pre.147, on Mac OS X 10.15.4 19E2269
    darwin-x64, locale en-GB)
    • Flutter version 2.6.0-6.0.pre.147 at
      /Users/dhs/documents/fluttersdk/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 83dfb2237a (2 days ago), 2021-09-17 23:48:04 -0400
    • Engine revision 31792e0340
    • Dart version 2.15.0 (build 2.15.0-120.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 30)
    • Android SDK at /Users/dhs/Library/Android/sdk
    • Platform android-30, build-tools 30.0.3
    • ANDROID_HOME = /Users/dhs/Library/Android/sdk
    • Java binary at: /Users/dhs/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/202.7486908/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.    

[✓] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.5.1, Build version 12E507
    • CocoaPods version 1.10.1

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

[✓] Android Studio (version 4.1)
    • Android Studio at /Users/dhs/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/202.7486908/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
      1.8.0_242-release-1644-b3-6915495)        

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

[[✓] Connected device (4 available)
    • Darshan's iphone (mobile)  • 21150b119064aecc249dfcfe05e259197461ce23 •
      ios            • iOS 14.4.1 18D61
    • iPhone 12 Pro Max (mobile) • A5473606-0213-4FD8-BA16-553433949729     •
      ios            • com.apple.CoreSimulator.SimRuntime.iOS-14-3 (simulator)
    • macOS (desktop)            • macos                                    •
      darwin-x64     • Mac OS X 10.15.4 19E2269 darwin-x64
    • Chrome (web)               • chrome                                   •
      web-javascript • Google Chrome 93.0.4577.82


• No issues found!




Labeling it as regression, as it was fixed but seem to have surfaced again.

@darshankawar darshankawar added p: first party p: image_picker The Image Picker plugin. platform-ios iOS applications specifically has reproducible steps The issue has been confirmed reproducible and is ready to work on found in release: 2.5 Found to occur in 2.5 found in release: 2.6 Found to occur in 2.6 c: regression It was better in the past than it is now and removed in triage Presently being triaged by the triage team labels Sep 20, 2021
@darshankawar
Copy link
Member

/cc: @mvanbeusekom

@darshankawar darshankawar changed the title [Image_picker]: Image gallery opens twice if we choose select photos permission. Still reproduces [Image_picker]: Image gallery opens twice if we choose select photos permission. Sep 20, 2021
@balvinderz
Copy link
Contributor

the first sheet that comes is for selecting the photos that can be accessed by the app and the second sheet that comes is for picking the image @darshankawar.

@darshankawar
Copy link
Member

@balvinderz Thanks. So is it an expected behavior considering this comment as well ?

@balvinderz
Copy link
Contributor

I think the expected behaviour should be - the second sheet should only show only those photos that were selected in the first sheet.

@darshankawar
Copy link
Member

That doesn't seem to be happening at the moment. After selecting first image, then second time, same set of images are being shown. Below screen shows up after selecting first image:

Screenshot 2021-09-21 at 11 55 49 AM

@darshankawar darshankawar added regression identified c: regression It was better in the past than it is now and removed c: regression It was better in the past than it is now labels Sep 21, 2021
@balvinderz
Copy link
Contributor

Yes . I think the expected behaviour should be only those limited photos should be shown.

@stuartmorgan stuartmorgan added the P2 Important issues not at the top of the work list label Sep 23, 2021
@Moluram
Copy link
Contributor

Moluram commented Oct 3, 2021

Hello!
The is happening because shared library is taken before the authorisation level is checked:
CodeWithIssue

I have investigated the issue and it seems like it's very hard to achieve.
An Apple Frameworks Engineer answered 11 months ago in this thread that "Currently it's not possible".

If anyone could help out with an issue I would appreciate it a lot :)

@Shashwat2303

This comment has been minimized.

@offline-first
Copy link

Same issue on iOS (14.81) and Plugin version 0.8.4+4.
Any plan to fix it?

@pitazzo
Copy link

pitazzo commented Apr 24, 2022

I confirm this issue is still present. I'm able to pick an image out of the set of selected images.

@BenjiFarquhar
Copy link

If you don't need the photo's metadata, you can set requestFullMetadata to false

This fixed the issue for me, thanks.

@alperefesahin
Copy link

Any update on this? requestFullMetadata: false does not work for me (iPhone 14 pro max- select limited photos)

@befirst
Copy link

befirst commented Apr 4, 2023

just to link those two: #65995

@dam-ease
Copy link

I am able to reproduce this issue using the latest version of the image_picker package and on the latest stable and master channels.
Code Sample

flutter doctor -v
[✓] Flutter (Channel master, 3.11.0-2.0.pre.55, on macOS 13.3 22E252 darwin-arm64, locale en-NG)
    • Flutter version 3.11.0-2.0.pre.55 on channel master at /Users/dammya/fvm/versions/master
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 835b892d7f (10 days ago), 2023-05-07 01:30:22 +0530
    • Engine revision 23f730efbf
    • Dart version 3.1.0 (build 3.1.0-83.0.dev)
    • DevTools version 2.23.1

[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
    • Android SDK at /Users/dammya/Library/Android/sdk
    • Platform android-33, build-tools 32.1.0-rc1
    • ANDROID_HOME = /Users/dammya/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

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

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

[✓] Android Studio (version 2021.2)
    • 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 11.0.12+0-b1504.28-7817840)

[✓] IntelliJ IDEA Community Edition (version 2022.3.2)
    • IntelliJ at /Applications/IntelliJ IDEA CE.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.78.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.50.0

[✓] VS Code (version 1.78.0)
    • VS Code at /Users/dammya/.Trash/Visual Studio Code 20.07.05.app/Contents
    • Flutter extension version 3.50.0

[✓] Connected device (4 available)
    • Damilola’s iPhone (mobile) • 71c843fa5f3dec767999f36224653c0faa78660e • ios            • iOS 16.4 20E247
    • iPhone 14 Pro Max (mobile) • D7F3302D-D66F-4B89-B8CF-DBEE1CDB5449     • ios            • com.apple.CoreSimulator.SimRuntime.iOS-16-4 (simulator)
    • macOS (desktop)            • macos                                    • darwin-arm64   • macOS 13.3 22E252 darwin-arm64
    • Chrome (web)               • chrome                                   • web-javascript • Google Chrome 113.0.5672.92

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

• No issues found!
[✓] Flutter (Channel stable, 3.10.0, on macOS 13.3 22E252 darwin-arm64, locale
    en-NG)
    • Flutter version 3.10.0 on channel stable at /Users/dammya/sdks/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 84a1e904f4 (7 days ago), 2023-05-09 07:41:44 -0700
    • Engine revision d44b5a94c9
    • Dart version 3.0.0
    • DevTools version 2.23.1

[✓] Android toolchain - develop for Android devices (Android SDK version
    32.1.0-rc1)
    • Android SDK at /Users/dammya/Library/Android/sdk
    • Platform android-33, build-tools 32.1.0-rc1
    • ANDROID_HOME = /Users/dammya/Library/Android/sdk
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

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

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

[✓] Android Studio (version 2021.2)
    • 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
      11.0.12+0-b1504.28-7817840)

[✓] IntelliJ IDEA Community Edition (version 2022.3.2)
    • IntelliJ at /Applications/IntelliJ IDEA CE.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.78.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.50.0

[✓] VS Code (version 1.78.0)
    • VS Code at /Users/dammya/.Trash/Visual Studio Code 20.07.05.app/Contents
    • Flutter extension version 3.50.0

[✓] Connected device (4 available)
    • Damilola’s iPhone (mobile) • 71c843fa5f3dec767999f36224653c0faa78660e •
      ios            • iOS 16.4 20E247
    • iPhone 14 Pro Max (mobile) • D7F3302D-D66F-4B89-B8CF-DBEE1CDB5449     •
      ios            • com.apple.CoreSimulator.SimRuntime.iOS-16-4 (simulator)
    • macOS (desktop)            • macos                                    •
      darwin-arm64   • macOS 13.3 22E252 darwin-arm64
    • Chrome (web)               • chrome                                   •
      web-javascript • Google Chrome 113.0.5672.92

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

• No issues found!

@dam-ease dam-ease added package flutter/packages repository. See also p: labels. found in release: 3.10 Found to occur in 3.10 found in release: 3.11 Found to occur in 3.11 and removed found in release: 2.5 Found to occur in 2.5 found in release: 2.6 Found to occur in 2.6 labels May 16, 2023
@Hixie Hixie removed the plugin label Jul 6, 2023
@flutter-triage-bot flutter-triage-bot bot added multiteam-retriage-candidate team-ios Owned by iOS platform team triaged-ios Triaged by iOS platform team labels Jul 8, 2023
@tobiasht
Copy link

As I understand it, we don't need to ask permission to access images, since all images are visible in the picker, but only the selected one is shared with the app. Then why are we asking the user to select images, isn't the solution to this problem, to show the picker directly, without the "Select Photos..." prompt?

@idrats

This comment was marked as off-topic.

@Pascal-Orthopy

This comment was marked as off-topic.

@Subhangi3

This comment was marked as off-topic.

@parasrastogi

This comment was marked as off-topic.

@dam-ease dam-ease added the customer: crowd Affects or could affect many people, though not necessarily a specific customer. label Sep 8, 2023
@kellysjung

This comment was marked as off-topic.

@wal33d006
Copy link

This is surprising actually. The amount of time this issue is opened for. The requestFullMetadata thing also not works. Do we have any update on this?

@inamhusain
Copy link

Is there any update on this, or is there any solution to remove the limited access option from that prompt?

@JohannPie

This comment was marked as duplicate.

@klncEmre

This comment was marked as duplicate.

@Pragt
Copy link

Pragt commented Feb 23, 2024

Is there any update on this issue? Does anyone resolve this issue? Appstore has rejected my app due to this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: regression It was better in the past than it is now customer: crowd Affects or could affect many people, though not necessarily a specific customer. found in release: 3.10 Found to occur in 3.10 found in release: 3.11 Found to occur in 3.11 has reproducible steps The issue has been confirmed reproducible and is ready to work on p: image_picker The Image Picker plugin. P2 Important issues not at the top of the work list package flutter/packages repository. See also p: labels. platform-ios iOS applications specifically team-ios Owned by iOS platform team triaged-ios Triaged by iOS platform team
Projects
None yet
Development

No branches or pull requests