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

[Bug report] saveLivePhoto error #1181

Closed
coronoal opened this issue Sep 6, 2024 · 3 comments · Fixed by #1186
Closed

[Bug report] saveLivePhoto error #1181

coronoal opened this issue Sep 6, 2024 · 3 comments · Fixed by #1186

Comments

@coronoal
Copy link

coronoal commented Sep 6, 2024

Version

3.3.0

Platforms

iOS

Device Model

iPhone 12 (iOS16.6.1)

flutter info

Flutter (Channel stable, 3.22.3

How to reproduce?

AssetEntity? resultEntity =
            await PhotoManager.editor.darwin.saveLivePhoto(
          imageFile: imageFile,
          videoFile: videoFile,
          filename: fileName,
        );

saveLivePhoto error. But the last version is normal.

Logs

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: type 'CastMap<Object?, Object?, dynamic, dynamic>' is not a subtype of type 'Map<String, dynamic>'
#0      IosPlugin.saveLivePhoto (package:photo_manager/src/internal/plugin.dart:696:50)

Example code (optional)

No response

Contact

No response

@passerby-yyds
Copy link

image
image

@emmett-deen
Copy link

@coronoal you mentioned saveLivePhoto error. But the last version is normal. what was the last version you were using that this worked?

@emmett-deen
Copy link

@coronoal you mentioned saveLivePhoto error. But the last version is normal. what was the last version you were using that this worked?

After some of my own testing, it looks to still work with v3.2.3

AlexV525 added a commit that referenced this issue Sep 22, 2024
Fixes #841
Fixes
#1009
Fixes
#1180
Fixes
#1181
Fixes
#1185

1. Adds a detached state for managers. Callers with those managers will
first be aware of the detaching state before any actual calls to avoid
crashes.
2. Errors replied by the channel do not include detailed messages
before. Now the code will unwrap certain exceptions to extract details
from them.
3. `PHAssetResource` with the type `PHAssetResourceTypeFullSizeVideo`
does not count as a video type before, making the resource obtain ignore
them.
4. Fixes potential range exception when converting `NSTimeInterval` on
Darwin.
5. Fixes progress not being updated when getting the non-original video
file on iOS.
6. Fixes incorrect Live Photo resource being obtained which will result
in a wrong aspect ratio.
7. Fixes Live Photos saving exceptions with the paired video.
8. Expose `progressHandler` for `AssetEntity.getMediaUrl`.
9. Expose `withSubtype` for `AssetEntity.isLocallyAvailable` to request
if a Live Photo resource is available.
10. Other lints and type promotion fixes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants