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] originFile of an edited video asset returns its unedited version on iOS #1180

Closed
ashilkn opened this issue Sep 4, 2024 · 2 comments · Fixed by #1186
Closed

Comments

@ashilkn
Copy link

ashilkn commented Sep 4, 2024

Version

3.3.0

Platforms

iOS

Device Model

iPhone 11 (iOS 17.6.1)

flutter info

[!] Flutter (Channel [user-branch], 3.24.1, on macOS 14.4.1 23E224 darwin-arm64, locale en-IN)
    ! Flutter version 3.24.1 on channel [user-branch] at /Users/xxx/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 5874a72aa4 (2 weeks ago), 2024-08-20 16:46:00 -0500
    • Engine revision c9b9d5780d
    • Dart version 3.5.1
    • DevTools version 2.37.2
    • 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 34.0.0)
    • Android SDK at /Users/xxx/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.9+0-17.0.9b1087.7-11185874)
    • 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 (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[✓] Android Studio (version 2023.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 17.0.9+0-17.0.9b1087.7-11185874)

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

[✓] Connected device (2 available)
    • macOS (desktop)                 • macos                 • darwin-arm64 • macOS 14.4.1 23E224 darwin-arm64
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin       • macOS 14.4.1 23E224 darwin-arm64
    ! Error: Browsing on the local area network for iPhone. 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.

! Doctor found issues in 2 categories.

How to reproduce?

  1. Take a video on an iOS device
  2. Crop or Trim the video.
  3. View the video on a flutter app using the origin file obtained by:
AssetEntity.fromId(id).then((asset){
    return asset.originFile;
})

This bug was introduce in v3.2.0 (works fine till v3.1.1)
Tested on iOS versions 17.2.1 and 17.6.1, reproducible on both.

Logs

No response

Example code (optional)

No response

Contact

No response

@ashilkn ashilkn changed the title [Bug report] originFile of an edited video asset returns it's unedited version on iOS [Bug report] originFile of an edited video asset returns its unedited version on iOS Sep 4, 2024
@AlexV525
Copy link
Member

AlexV525 commented Sep 4, 2024

Does it happen with photos?

@ashilkn
Copy link
Author

ashilkn commented Sep 4, 2024

Does it happen with photos?

Doesn't happen with photos.

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.

2 participants