7

Often when rendering from a list, I see Flutter throwing the following, from beneath example, see PositionedTilesState:

ChromeProxyService: Failed to evaluate expression 'tiles'. 
ChromeProxyService: Failed to evaluate expression '[     '. 
ChromeProxyService: Failed to evaluate expression 'StatelessColorfulTile'. 
ChromeProxyService: Failed to evaluate expression 'PositionedTilesState'. 

Have you see this, and found a solution?

Example:

import 'package:flutter/material.dart';
import 'package:example/dart/concepts/color/unique_color_generator.dart';

// PositionedTiles
class PositionedTiles extends StatefulWidget {
  final String? title;
  const PositionedTiles({Key? key, required this.title}) : super(key: key);

  @override
  State<StatefulWidget> createState() => PositionedTilesState();
}

// PositionedTilesState
class PositionedTilesState extends State<PositionedTiles> {
  List<Widget> tiles = [
    StatelessColorfulTile(),
    StatelessColorfulTile(),
  ];

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Row(children: tiles),
      floatingActionButton: FloatingActionButton(
          child: const Icon(Icons.sentiment_very_satisfied), onPressed: swapTiles),
    );
  }

  swapTiles() {
    setState(() {
      tiles.insert(1, tiles.removeAt(0));
    });
  }
}

// StatelessColorfulTile
class StatelessColorfulTile extends StatelessWidget {
  final Color myColor = UniqueColorGenerator.getColor();

  StatelessColorfulTile({Key? key}) : super(key: key);
  @override
  Widget build(BuildContext context) {
    return Container(
        color: myColor, child: const Padding(padding: EdgeInsets.all(70.0)));
  }
}
Chris G.
  • 23,930
  • 48
  • 177
  • 302
  • 2
    We have a similar problem in a newly started web project, and we don't know the reason for this error message... but it doesn't influence the execution of the program either. In our case the logs only appear in debug mode – Pablo Insua Mar 04 '22 at 12:07
  • In my case I cannot debug correctly, since I cannot see the runtime values , so it affects me greatly, try downgrading chrome, I do not know if this works https://stackoverflow.com/questions/71521564/chromeproxyservice-failed-to-evaluate-expression-handleprimarypointer-intern – user14624595 Apr 08 '22 at 06:00
  • Does this answer your question? [ChromeProxyService: Failed to evaluate expression 'handlePrimaryPointer':InternalError: No frame with index 45](https://stackoverflow.com/questions/71521564/chromeproxyservice-failed-to-evaluate-expression-handleprimarypointerinterna) – Benno Jun 06 '22 at 06:28

2 Answers2

2

Error with Firebase_core _Web

ChromeProxyService: Failed to evaluate expression '

FirebaseCore': InternalError: Expression evaluation in async frames is not supported. No frame with index 14..

here is the solution by yurrpt Arda
https://github.com/firebase/flutterfire/issues/9934

WidgetsFlutterBinding.ensureInitialized();
  if (kIsWeb) {
  await Firebase.initializeApp(
    options: const FirebaseOptions(
       apiKey: "",
       authDomain: "",
       databaseURL: "", // **DATABASEURL MUST BE GIVEN.**
       projectId: "",
       storageBucket: "",
       messagingSenderId: "",
       appId: ""),  
  );
} else {
  await Firebase.initializeApp();
K D
  • 205
  • 3
  • 10
1

Apparently there was an issue between Chrome (above version 100) and Flutter (below version 2.10.5).

How to fix it? Check your flutter version in terminal with flutter --version. If it is below 2.10.5, you can get the most recent Flutter with terminal with flutter upgrade

After upgrading flutter to 3.0.0 all works for me now. I followed this issue github and this answer on SA

drpawelo
  • 2,348
  • 23
  • 17