Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Error: Member not found" with Flutter Firebase Auth package

 /Flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth_platform_interface-6.2.0/lib/src/method_channel/utils/exception.dart:14:11: Error: Member not found: 'Error.throwWithStackTrace'.
 Error.throwWithStackTrace(exception, stackTrace);
       ^^^^^^^^^^^^^^^^^^^
/Flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth_platform_interface-6.2.0/lib/src/method_channel/utils/exception.dart:17:9: Error: Member not found: 'Error.throwWithStackTrace'.
Error.throwWithStackTrace(
     ^^^^^^^^^^^^^^^^^^^
/D:/Flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth_platform_interface-6.2.0/lib/src/method_channel/utils/exception.dart:12:7: Error: A non-null value must be returned since the return type 'Never' doesn't allow null.

Never convertPlatformException(Object exception, StackTrace stackTrace) {
   ^
FAILURE: Build failed with an exception.

My pubsec.yaml has only:

  • cloud_firestore:
  • firebase_core:
  • uuid:
  • firebase_auth: ^3.3.8
  • provider: ^6.0.2

I got this error after importing firebase packages.

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel master, 2.6.0-12.0.pre.657, on Microsoft Windows [Version 10.0.19044.1526], locale en-IN)
[√] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
[√] Chrome - develop for the web
[√] Android Studio (version 2020.3)
[√] Android Studio (version 2021.1)
[√] Connected device (3 available)

• No issues found!
like image 777
Amarjeet Patidar Avatar asked Jan 17 '26 21:01

Amarjeet Patidar


1 Answers

I tried using latest version but It didn't worked. Lower version firebase_auth: 2.0.0 worked for me.

like image 75
Amarjeet Patidar Avatar answered Jan 19 '26 12:01

Amarjeet Patidar



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!