Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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 the repository of the project.

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.
like image 632
Ali ijaz Avatar asked Nov 16 '25 17:11

Ali ijaz


1 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 tried and of course failed to talk to the paused main thread after a debug break point or crash occurred first (Async task failed successfully). The resulting ChromeProxyService errors are a red herring. Your VSCode debugger shows a red pop-up over functions that result in an unhandled exception, 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.

like image 186
Benno Avatar answered Nov 19 '25 10:11

Benno



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!