fluttercandies / flutter_photo_manager

A Flutter plugin that provides images, videos, and audio abstraction management APIs without interface integration, available on Android, iOS, macOS and OpenHarmony.
https://pub.dev/packages/photo_manager
Apache License 2.0
669 stars 303 forks source link

Fatal Exception: FlutterError PlatformException(Error Domain=CloudPhotoLibraryErrorDomain Code=1005 "(null)", null, null, null). Error thrown . #1179

Open omermustekiin opened 2 weeks ago

omermustekiin commented 2 weeks ago

Version

3.1.1

Platforms

iOS

Device Model

all

flutter info

[✓] Flutter (Channel stable, 3.24.1, on macOS 14.6.1 23G93 darwin-arm64, locale tr-TR)
    • Flutter version 3.24.1 on channel stable at /Users/omer/development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 5874a72aa4 (12 days ago), 2024-08-20 16:46:00 -0500
    • Engine revision c9b9d5780d
    • Dart version 3.5.1
    • DevTools version 2.37.2

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/omer/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: /Applications/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 15.4)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15F31d
    • CocoaPods version 1.15.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)

[✓] Connected device (4 available)
    • Ömer iPhone SE 3nd Gen (mobile) • 00008110-000808C43607801E • ios            • iOS 17.6.1 21G93
    • macOS (desktop)                 • macos                     • darwin-arm64   • macOS 14.6.1 23G93 darwin-arm64
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad     • darwin         • macOS 14.6.1 23G93 darwin-arm64
    • Chrome (web)                    • chrome                    • web-javascript • Google Chrome 128.0.6613.113
    ! Error: Browsing on the local area network for Ömer iPhone 14 Pro Max. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)

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

• No issues found!

How to reproduce?

I have photo app in store which is using by millon of users. In my crashlytics, i see this bug and when this bug appears, app being unusable. That is big issue for me.

Logs

Fatal Exception: FlutterError
PlatformException(Error Domain=PHPhotosErrorDomain Code=3169 "(null)", null, null, null). Error thrown .

message_codecs.dart - Line 651
StandardMethodCodec.decodeEnvelope + 651

platform_channel.dart - Line 334
MethodChannel._invokeMethod + 334

entity.dart - Line 735
AssetEntity._getFile + 735

entity.dart - Line 766
AssetEntity._getOriginBytes + 766

photo_manager_image_provider.dart - Line 126
AssetEntityImageProvider._loadAsync.<fn> + 126

photo_manager_image_provider.dart - Line 154
AssetEntityImageProvider._loadAsync.<fn> + 154

photo_manager_image_provider.dart - Line 158
AssetEntityImageProvider._loadAsync.<fn> + 158

Example code (optional)

No response

Contact

omermustekiin@gmail.com

AlexV525 commented 2 weeks ago

Please use the latest version to get the precise stack traces.

omermustekiin commented 2 weeks ago

Please use the latest version to get the precise stack traces.

same with new version too

AlexV525 commented 2 days ago

The error stack trace will gets better once code in branch https://github.com/fluttercandies/flutter_photo_manager/tree/feat/improvements lands, but AFAICT CloudPhotoLibraryErrorDomain typically means the iCloud account needs to be reverified on the device.