Search code examples
flutterdartflutter-dependencies

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.

Solution

  • For others searching for this issue and coming across this page: I was hitting a similar error, unrelated to Firebase, and the solution was what's captured in Benno's answer above but a bit buried in the details.

    This error message was a red herring in my case. What was actually happening is that I had another error (did not set up CORS policy correctly), which caused the main thread to crash and then causing an async call to not get captured. Once I fixed the other error, all was working as expected.

    I missed that detail originally in Benno's response and hope to save time for others (and thank you Benno!).