QuickAlert icon indicating copy to clipboard operation
QuickAlert copied to clipboard

GIF not loaded after upgrading to Flutter 3.27.1

Open matteoberla opened this issue 11 months ago • 0 comments

Describe the bug

======== Exception caught by image resource service ================================================
The following assertion was thrown resolving an image codec:
Assertion failed: org-dartlang-sdk:///lib/_engine/engine/image_format_detector.dart:407:12
bytes.getUint8(_position) == 0x2c
is not true

When the exception was thrown, this was the stack: 
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 288:3  throw_
dart-sdk/lib/_internal/js_dev_runtime/private/profile.dart 110:39            assertFailed
dart-sdk/lib/_internal/js_dev_runtime/private/profile.dart 110:39            [_skipGraphicBlock]
lib/_engine/engine/image_format_detector.dart 334:7                          isAnimated
lib/_engine/engine/image_format_detector.dart 47:32                          detectImageType
lib/_engine/engine/canvaskit/image.dart 620:32                               tryDetectImageType
lib/_engine/engine/canvaskit/image.dart 14:31                                <fn>
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 610:19          <fn>
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 634:23          <fn>
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 532:3           _asyncStartSync
lib/_engine/engine/canvaskit/image.dart 9:18                                 skiaInstantiateImageCodec
lib/_engine/engine/canvaskit/renderer.dart 219:7                             <fn>
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 610:19          <fn>
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 634:23          <fn>
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 532:3           _asyncStartSync
lib/_engine/engine/canvaskit/renderer.dart 215:20                            instantiateImageCodec
lib/ui/painting.dart 687:28                                                  <fn>
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 610:19          <fn>
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 634:23          <fn>
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 532:3           _asyncStartSync
lib/ui/painting.dart 682:15                                                  instantiateImageCodecWithSize
packages/flutter/src/painting/binding.dart 147:15                            instantiateImageCodecWithSize
packages/flutter/src/painting/image_provider.dart 765:18                     <fn>
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 610:19          <fn>
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 634:23          <fn>
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 581:31          <fn>
dart-sdk/lib/async/zone.dart 1422:47                                         _rootRunUnary
dart-sdk/lib/async/zone.dart 1324:19                                         runUnary
dart-sdk/lib/async/future_impl.dart 204:18                                   handleValue
dart-sdk/lib/async/future_impl.dart 902:44                                   handleValueCallback
dart-sdk/lib/async/future_impl.dart 931:13                                   _propagateToListeners
dart-sdk/lib/async/future_impl.dart 707:5                                    [_completeWithValue]
dart-sdk/lib/async/future_impl.dart 777:7                                    <fn>
dart-sdk/lib/async/zone.dart 1414:13                                         _rootRun
dart-sdk/lib/async/zone.dart 1317:19                                         run
dart-sdk/lib/async/zone.dart 1225:7                                          runGuarded
dart-sdk/lib/async/zone.dart 1265:23                                         callback
dart-sdk/lib/async/schedule_microtask.dart 40:11                             _microtaskLoop
dart-sdk/lib/async/schedule_microtask.dart 49:5                              _startMicrotaskLoop
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 186:7           <fn>
Image provider: AssetImage(bundle: null, name: "assets/quickalert/confirm.gif")
Image key: AssetBundleImageKey(bundle: PlatformAssetBundle#2699e(), name: "assets/quickalert/confirm.gif", scale: 1)
====================================================================================================

I've just updated to 3.27.1 but the GIFs are not showed on Web anymore, it was working fine before with the same code.

Flutter 3.27.1 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 17025dd882 (3 settimane fa) • 2024-12-17 03:23:09 +0900
Engine • revision cb4b5fff73
Tools • Dart 3.6.0 • DevTools 2.40.2

Flutter doctor with no issues found. Any suggestion?

matteoberla avatar Jan 09 '25 13:01 matteoberla