1

I am trying to use google authentication to log in to my app. Previously, I had this code running perfectly on my other laptop, but now that I have moved the same code and setup to another machine I am facing issues.

I have added SHA1 and SHA256 keys into my firebase, added the google-services.json file in my app folder. Currently, when I click my button to sign in with google, it shows me my account and let's me click it. However, upon clicking, it automatically redirects me to the messages_codecs.dart file and highlights this line throw PlatformException(code: errorCode, message: errorMessage as String?, details: errorDetails, stacktrace: errorStacktrace);

I was initially facing this identical error upon clicking on my sign in button, but then realized I was not using a AVM with google play store enabled. After changing that, it brings me through the sign in process, but after gives the same error.

You can find my whole file structure here. It is inside this question - StreamBuilder issue - snapshot.connectionState == ConnectionState.waiting when a TextFormField widget is clicked.,

I have searched and tried every solution online but nothing seems to work

Here is my flutter doctor -v

[√] Flutter (Channel master, 3.1.0-0.0.pre.966, on Microsoft Windows [Version 10.0.22000.613], locale en-US)
    • Flutter version 3.1.0-0.0.pre.966 at C:\Users\aryan\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision df52b510ca (18 hours ago), 2022-05-27 06:13:06 -0400
    • Engine revision 436f18b5a2
    • Dart version 2.18.0 (build 2.18.0-149.0.dev)
    • DevTools version 2.13.1

[√] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
    • Android SDK at C:\Users\aryan\AppData\Local\Android\sdk
    • Platform android-32, build-tools 32.1.0-rc1
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
    • All Android licenses accepted.

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

[!] Visual Studio - develop for Windows (Visual Studio Community 2019 16.7.5)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
    • Visual Studio Community 2019 version 16.7.30523.141
    • Windows 10 SDK version 10.0.18362.0
    X Visual Studio is missing necessary components. Please re-run the Visual Studio installer for the "Desktop development with C++" workload, and include these components:
        MSVC v142 - VS 2019 C++ x64/x86 build tools
         - If there are multiple build tool versions available, install the latest
        C++ CMake tools for Windows
        Windows 10 SDK

[√] Android Studio (version 2021.2)
    • Android Studio at C:\Program Files\Android\Android Studio
    • 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.12+7-b1504.28-7817840)

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

[√] Connected device (4 available)
    • sdk gphone x86 (mobile) • emulator-5554 • android-x86    • Android 11 (API 30) (emulator)
    • Windows (desktop)       • windows       • windows-x64    • Microsoft Windows [Version 10.0.22000.613]
    • Chrome (web)            • chrome        • web-javascript • Google Chrome 102.0.5005.61
    • Edge (web)              • edge          • web-javascript • Microsoft Edge 101.0.1210.53

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

! Doctor found issues in 1 category.
Aryan V
  • 111
  • 2
  • 9

0 Answers0