ChromeProxyService: Failed to evaluate expression 'handlePrimaryPointer':InternalError: No frame with index 45

Viewed 10538

Code that I have written for Admin LogIn :

import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:flutter/material.dart';

class FirebaseServices {
  static Future<DocumentSnapshot> adminSignIn(id) async {
    var res =
        await FirebaseFirestore.instance.collection("admin").doc(id).get();
    return res;
  }
}

I am getting errors are given below:

+ ChromeProxyService: Failed to evaluate expression 
 'handlePrimaryPointer':InternalError: No frame with index 45.
+ ChromeProxyService: Failed to evaluate expression
 'postAcceptSlopTolerance': InternalError: No frame with index 45.
+ ChromeProxyService: Failed to evaluate expression 'FirebaseFirestore':    
  InternalError: No frame with index 32.
+ ChromeProxyService: Failed to evaluate expression 'DocumentSnapshot':    
  InternalError: No frame with index 32.
+ ChromeProxyService: Failed to evaluate expression 'Future': 
  InternalError: No frame with index 32.
+ ChromeProxyService: Failed to evaluate expression 'catch': 
  InternalError: No frame with index 32.

You can also visit Project Repository : https://github.com/SeAliijaz/Eco-Buy

I tried to Run flutter doctor -v And then:

[√] Flutter (Channel stable, 3.0.1, on Microsoft Windows [Version 10.0.19044.1706], locale en-US) • Flutter version 3.0.1 at C:\flutter_windows_2.2.3-stable\flutter
• Upstream repository https://github.com/flutter/flutter.git • Framework revision fb57da5f94 (2 weeks ago), 2022-05-19 15:50:29 -0700 • Engine revision caaafc5604 • Dart version 2.17.1 • DevTools version 2.12.2

[!] Android toolchain - develop for Android devices (Android SDK version 31.0.0) • Android SDK at C:\Users\Ali_ijaz\AppData\Local\Android\sdk X cmdline-tools component is missing Run path/to/sdkmanager --install "cmdline-tools;latest" See https://developer.android.com/studio/command-line for more details. X Android license status unknown. Run flutter doctor --android-licenses to accept the SDK licenses. See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.

[√] Chrome - develop for the web • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[X] Visual Studio - develop for Windows X Visual Studio not installed; this is necessary for Windows development. Download at https://visualstudio.microsoft.com/downloads/. Please install the "Desktop development with C++" workload, including all of its default components

[√] Android Studio (version 2020.3) • Android Studio at C:\Program Files\Android\Android Studio2 • 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.10+0-b96-7249189)

[!] Android Studio (version 4.1) • Android Studio at C:\Program Files\Android\Android Studio1 • 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 X Unable to determine bundled Java version. • Try updating or re-installing Android Studio.

[√] VS Code (version 1.67.2) • VS Code at C:\Users\Ali_ijaz\AppData\Local\Programs\Microsoft VS Code • Flutter extension version 3.42.0

[√] Connected device (4 available) • SM G955F (mobile) • 192.168.39.10:5555 • android-arm64 • Android 7.0 (API 24) • Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19044.1706] • Chrome (web) • chrome • web-javascript • Google Chrome 102.0.5005.63 • Edge (web) • edge • web-javascript • Microsoft Edge 102.0.1245.30

[√] HTTP Host Availability • All required HTTP hosts are available

! Doctor found issues in 3 categories.

4 Answers

If you are unable to add debug break-points and view the state of variables in the debugger, this is caused by a recent Flutter bug and you can apply the fixes down one paragraph.

If debugging works just fine, keep in mind that ChromeProxyService error messages are expected after your program was paused on a break point or unhandled exception if Async code was still executing at the time. It tells us Async code failed to run after the main thread was paused by the debugger (Async task failed successfully). The resulting ChromeProxyService errors are a red herring. Your debugger shows a red pop-up over functions that trigger unhandled exceptions, that's your next clue.

If debugging break points are broken: Upgrade to Flutter v3.0.0 or downgrade to v2.10.4 using the workaround further down.

Flutter 3 upgrade:

Run flutter channel stable followed by flutter upgrade --force

For older versions of Flutter, a workaround is documented here https://github.com/flutter/flutter/issues/101224#issuecomment-1092324782:

flutter downgrade v2.10.4

(Find Flutter install dir using: flutter doctor -v)

cd <path to flutter install dir>/flutter/packages/flutter_tools

update dwds constraint in packages/flutter_tools/pubspec.yaml to 11.5.2

run flutter pub get in packages/flutter_tools directory

remove your cache: rm -rf ../../bin/cache

rebuild flutter: flutter pub get in packages/flutter_tools directory (it triggers the flutter rebuild)

This issue caused VS Code to show no local variables when debugging my Flutter project using the web-javascript renderer. I was not able to view the error message until switching the debug option to "Debug my code + packages".

Downgrading Google Chrome to version 99.0.4844.74 also works around the issue.

Try upgrading your flutter project to a higher version, this seems like a flutter problem than your code.

I have seen some funny errors like this, if flutter clean+ restart doesn't work then I upgrade the project.

I had a similar error debugging flutter for web in chrome. ChromeProxyService: Failed to evaluate expression '...':InternalError: No frame with index ...

Turns out I was parsing a string incorrectly and an exception was being thrown in an async method. For whatever reason my IDE was breaking in browser_client.dart with this obscure message.

Running the same code as a windows desktop app revealed the actual error immediately.

Related