flutter_photo_manager
flutter_photo_manager copied to clipboard
[Bug report] Load thumbnail stuck and failed to load
Version
2.6.0
Platforms
Android
Device Model
荣耀 Magic3 Pro
flutter info
[!] Flutter (Channel stable, 3.7.6, on macOS 12.6 21G115 darwin-arm64, locale zh-Hans-CN)
• Flutter version 3.7.6 on channel stable at /Users/neal/fvm/versions/3.7.6
! Warning: `dart` on your path resolves to /opt/homebrew/Cellar/dart/2.17.6/libexec/bin/dart, which is not inside your current Flutter SDK checkout at /Users/neal/fvm/versions/3.7.6. Consider adding
/Users/neal/fvm/versions/3.7.6/bin to the front of your path.
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 12cb4eb7a0 (8 weeks ago), 2023-03-01 10:29:26 -0800
• Engine revision ada363ee93
• Dart version 2.19.3
• DevTools version 2.20.1
• Pub download mirror https://pub.flutter-io.cn
• Flutter download mirror https://storage.flutter-io.cn
• 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/neal/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 14.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 14C18
• CocoaPods version 1.11.3
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2021.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 11.0.13+0-b1751.21-8125866)
[✓] VS Code (version 1.75.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.62.0
[✓] Connected device (5 available)
[✓] HTTP Host Availability
• All required HTTP hosts are available
! Doctor found issues in 2 categories.
How to reproduce?
When I use wechat_assets_picker 8.4.2, when I open the picture selection page, the loading interface is stuck, and it is restored after a long time, and the thumbnail of the picture is not displayed.
https://user-images.githubusercontent.com/37497239/234272361-a3d73af3-0874-4041-9b41-10e6bbbbe703.mp4

log:
Logs
No response
Example code (optional)
No response
Contact
Can you try if the issues can be resolved with these lines commented out? https://github.com/fluttercandies/flutter_photo_manager/blob/a0dfd1840848f99db98b4c3da1efd668b00227c7/android/src/main/kotlin/com/fluttercandies/photo_manager/core/utils/IDBUtils.kt#L184-L206
Can you try if the issues can be resolved with these lines commented out?
https://github.com/fluttercandies/flutter_photo_manager/blob/a0dfd1840848f99db98b4c3da1efd668b00227c7/android/src/main/kotlin/com/fluttercandies/photo_manager/core/utils/IDBUtils.kt#L184-L206
I tried to comment out on the above code, but it didn't solve the problem, and the effect was the same as the video above.
It is normal for me to load thumbnails when I use the example project in flutter_photo_manager, while the example project using flutter_wechat_assets_picker cannot be loaded, or it will take a long time to load. Please see the video below.
https://github.com/fluttercandies/flutter_photo_manager/assets/37497239/980d50c8-f339-46d1-862b-2f2ce52edd17
Good to know about the difference. Can you differentiate the difference between their FilterOptionGroup
to find which option causes the issue?
On the left is the FilterOptionGroup
of the example project of flutter_photo_manager
. I don't have the phone with the problem at present, and I can't tell which parameter is set wrong.
When I comment out the code in ``DefaultAssetPickerProvider```, as shown in the figure, I can load thumbnails normally. Is it because this phone has more than 3,000 photo albums? There are often many photo albums on Android phones.
https://github.com/fluttercandies/flutter_photo_manager/assets/37497239/f6ffa11e-9199-45e9-a1ff-4f14ff59ca1c
You can try to set needTitle
as false for image filter option.