SachinGanesh / screenshot

Flutter Screenshot Library
https://pub.dev/packages/screenshot
MIT License
342 stars 142 forks source link

ios crash :message Could not convert raster image to PNG #190

Open vonions opened 2 months ago

vonions commented 2 months ago

[ERROR:flutter/lib/ui/painting/image_encoding.cc(215)] Could not convert raster image to PNG.

diegomontiel commented 2 months ago

Facing same issue since like a month ago when I last updated flutter, here is my flutter doctor to contribute to the post. Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel master, 3.23.0-13.0.pre.104, on macOS 13.5.2 22G91 darwin-arm64, locale en-MX) • Flutter version 3.23.0-13.0.pre.104 on channel master at /Users/diegomontiel/Documents/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 27e06569a1 (5 weeks ago), 2024-06-05 17:17:19 +0000 • Engine revision 11a32d43e3 • Dart version 3.5.0 (build 3.5.0-222.0.dev) • DevTools version 2.36.0

[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1) • Android SDK at /Users/d***/Library/Android/sdk • Platform android-34, build-tools 32.1.0-rc1 • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763) • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.0.1) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 15A507 • CocoaPods version 1.15.2

[✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.1) • 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.11+0-b60-7772763)

[✓] VS Code (version 1.91.0) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension can be installed from: 🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter [✓] Network resources

diegomontiel commented 2 months ago

Worked again by downgrading flutter to 3.19.2 and screenshot is ok with 3.0.0. Don't know tho what is the latest flutter version that still works.

vonions commented 2 months ago

Worked again by downgrading flutter to 3.19.2 and screenshot is ok with 3.0.0. Don't know tho what is the latest flutter version that still works.

Hello man, may I ask if there are any other third-party libraries that can be used as substitutes

LampeMW commented 2 months ago

Worked again by downgrading flutter to 3.19.2 and screenshot is ok with 3.0.0. Don't know tho what is the latest flutter version that still works.

@diegomontiel Screenshot 3.0.0 requires Flutter 3.22.0 or later, how did you get these to work together?

diegomontiel commented 2 months ago

Worked again by downgrading flutter to 3.19.2 and screenshot is ok with 3.0.0. Don't know tho what is the latest flutter version that still works.

@diegomontiel Screenshot 3.0.0 requires Flutter 3.22.0 or later, how did you get these to work together?

You're absolutely right. sorry for any confusion. I thought I had it set up in 3.19.2 using fvm but I never changed the Android Studio path. I guess it helped me resolving dependencies and updating my environment sdk? Not sure what made OP error disappear for me.