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

PlatformException PHPhotosErrorDomain (-1) #1245

Open
zhangyanzhu88 opened this issue Dec 13, 2024 · 7 comments
Open

PlatformException PHPhotosErrorDomain (-1) #1245

zhangyanzhu88 opened this issue Dec 13, 2024 · 7 comments

Comments

@zhangyanzhu88
Copy link

zhangyanzhu88 commented Dec 13, 2024

Version

3.6.2

Platforms

dart, iOS

Device Model

iPhone 16

flutter info

[!] Flutter (Channel [user-branch], 3.24.3, on macOS 15.1 24B83 darwin-arm64, locale zh-Hans-CN)
    ! Flutter version 3.24.3 on channel [user-branch] at /Users/misszhang/development/flutter
      Currently on an unknown channel. Run `flutter channel` to switch to an official channel.
      If that doesn't fix the issue, reinstall Flutter by following instructions at https://flutter.dev/setup.
    ! Upstream repository unknown source is not a standard remote.
      Set environment variable "FLUTTER_GIT_URL" to unknown source to dismiss this error.
    • Framework revision 2663184aa7 (3 months ago), 2024-09-11 16:27:48 -0500
    • Engine revision 36335019a8
    • Dart version 3.5.3
    • DevTools version 2.37.3
    • 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 32.0.0)
    • Android SDK at /Users/misszhang/Library/Android/sdk
    • Platform android-34, build-tools 32.0.0
    • ANDROID_HOME = /Users/misszhang/Library/Android/sdk
    • 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 16.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 16B40
    • CocoaPods version 1.16.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.95.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.102.0

[✓] Connected device (7 available)
    • 00008110-000974A43A3A801E • ios            • iOS 18.1.1 22B91
    • iPhone16 (mobile)               • 00008140-001544260A8B001C • ios            • iOS 18.1.1 22B91
    • iPhone (mobile)                 • 00008130-0012498E10FA8D3A • ios            • iOS 18.2 22C150
    • iPhone15 (mobile)               • 00008130-00114C983620001C • ios            • iOS 18.1 22B82
    • macOS (desktop)                 • macos                     • darwin-arm64   • macOS 15.1 24B83 darwin-arm64
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad     • darwin         • macOS 15.1 24B83 darwin-arm64
    • Chrome (web)                    • chrome                    • web-javascript • Google Chrome 131.0.6778.140

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

! Doctor found issues in 1 category.

How to reproduce?

I found the bug when I call the Photomanager.AssetEntity.loadFile

Logs

PlatformException(PHPhotosErrorDomain (-1), 未能完成操作。(PHPhotosErrorDomain错误-1。), No failure reason provided, null)
堆栈信息
#0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:648)
#1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:334)
<asynchronous suspension>
#2      AssetEntity._getFile (package:photo_manager/src/types/entity.dart:765)

Example code (optional)

var data = AssetEntity();
var file = await data.loadFile(isOrigin: true);

Contact

No response

@fluttercandies-dev
Copy link

AI Summary: 用户在升级 photo_manager 插件到 3.6.2 版本后,在 iOS 平台上调用 AssetEntity.loadFile 方法时,偶发 PlatformException(PHPhotosErrorDomain (-1)) 错误。

@KlipX
Copy link

KlipX commented Dec 16, 2024

+1 PlatformException
PlatformException(PHPhotosErrorDomain (-1), Nie można ukończyć tej operacji. (Błąd PHPhotosErrorDomain -1.), No failure reason provided, null)
entity.dart in AssetEntity._getFile at line 759 within photo_manager

iPhone 15 Pro Max iOS 18.1.1

@HenrikH96
Copy link

Got the same issue multiple times in my Crashlytics:
PlatformException(CloudPhotoLibraryErrorDomain (1006), The operation couldn’t be completed. (CloudPhotoLibraryErrorDomain error 1006.), No failure reason provided, null)

different IPhone Models.
i didn't had the error <= Version 3.2.0

@AlexV525
Copy link
Member

@zhangyanzhu88 @KlipX Can this issue be locally reproduced?

@HenrikH96 The exception is CloudPhotoLibraryErrorDomain which is different from others. It means the device does not verify its iCloud account so the library cannot pull anything down from the cloud storage.

@HenrikH96
Copy link

@AlexV525
Sorry my bad. Thank you very much for your Explanation.

@zhangyanzhu88
Copy link
Author

@zhangyanzhu88 @KlipX Can this issue be locally reproduced?

@AlexV525 The local version cannot be reproduced, and the online version appears sporadically, about once in 10 times

@AlexV525
Copy link
Member

We must find a way to reproduce the issue or an observable pattern before we start investigations.

@AlexV525 AlexV525 changed the title photo_manager插件升级后偶发报错PlatformException(PHPhotosErrorDomain (-1), 未能完成操作。(PHPhotosErrorDomain错误-1。), No failure reason provided, null) PlatformException PHPhotosErrorDomain (-1) Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants