'W/Choreographer(11277): Frame time is 13.988632 ms in the future! Check that graphics HAL is generating vsync timestamps using the correct timebase

W/Choreographer(11277): Frame time is 13.988632 ms in the future!  Check that graphics HAL is generating vsync timestamps using the correct timebase.

This is the error produce at run time. Flutter is not updating setState content and giving this error, The code is given below

    import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'dart:math';

void main() {
  runApp(
    MaterialApp(
      home: Scaffold(
        backgroundColor: Colors.redAccent,
        appBar: AppBar(
          backgroundColor: Colors.red,
          title: Center(child: Text('Dicee')),
        ),
        body: MyApp(),
      ),
    ),
  );
}

class MyApp extends StatefulWidget {
  @override
  MyAppState createState() => MyAppState();
}

class MyAppState extends State<MyApp> {
  int leftDiceNumber = 1;
  @override
  Widget build(BuildContext context) {
    leftDiceNumber = 4;
    return Center(
      child: Row(
        children: <Widget>[
          Expanded(
            child: FlatButton(
              onPressed: () {
                setState(() {
                  leftDiceNumber = (Random().nextInt(6) + 1);
                  print('images/dice$leftDiceNumber.png');
                });
              },
              child: Image.asset('images/dice$leftDiceNumber.png'),
            ),
          ),
          Expanded(
            child: FlatButton(
              onPressed: () {
                setState(() {
                  leftDiceNumber = 5;
                });
              },
              child: Image.asset('images/dice6.png'),
            ),
          ),
        ],
      ),
    );
  }
}

please help me out of this



Solution 1:[1]

In my case, this was a type mismatch error which apparently the logger could not catch. I was using int in my Model class whereas in firestore the value was in String.

Syncing their types resolved the error!

Solution 2:[2]

I had this error when trying to use two Firebase projects in my app. It seems that a lot of the Firebase data is persisted between restarts.

To fix it, I had to comment out my call to Firebase.initializeApp() and run the app once. This seemed to clear out whatever was causing the error.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 M.AQIB
Solution 2 Joe Muller