Skip to content

GIFs stop playing on Flutter web after about 1min #161800

@RobertRoeb

Description

@RobertRoeb

Steps to reproduce

Add fireball.gif to lib
Add "lib/fireball.gif" to yaml
Run the app with a GIF.

Expected results

fireball should be playing all the time

Actual results

Stops playing the fireball after around 30s every time, on Flutter web since 3.27.x on all browsers I have, recent Safari, recent Chrome and recent Firefox, doesn't stop on OS X native, on Android and I believe not on Linux native either. Probably related to new image handlers...

Code sample

import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'GIF error Demo',
      home: const MyHomePage(title: 'GIF error Demo'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            const Text(
              'Here is the fireball:',
            ),
            Image( width: 40, height: 40, fit: BoxFit.fill, image: AssetImage( "lib/fireball.gif") ),
          ],
        ),
      ),
    );
  }
}

Image

Screenshots or Video

On MacOS native and Android, the fireball keeps being a fire

Logs

Logs
[Paste your logs here]

Flutter Doctor output

flutter doctor -v

[!] Flutter (Channel stable, 3.27.2, on macOS 15.1 24B2082 darwin-arm64, locale de-DE)
    • Flutter version 3.27.2 on channel stable at /Users/robert/flutter
    ! The dart binary is not on your path. Consider adding /Users/robert/flutter/bin to your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 68415ad1d9 (4 days ago), 2025-01-13 10:22:03 -0800
    • Engine revision e672b006cb
    • Dart version 3.6.1
    • DevTools version 2.40.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.

Metadata

Metadata

Labels

P1High-priority issues at the top of the work lista: assetsPackaging, accessing, or using assetsc: renderingUI glitches reported at the engine/skia or impeller rendering levelengineflutter/engine related. See also e: labels.found in release: 3.27Found to occur in 3.27found in release: 3.28Found to occur in 3.28has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-webWeb applications specificallyteam-webOwned by Web platform team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions