New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 [firebase_auth_web] Cannot read properties of undefined (reading 'auth') #9228
Comments
@rutaba1 https://pub.dev/packages/flutterfire_ui/changelog#0431 |
@darshankawar Updating to latest dependencies is causing persistence issue that's why I'm trying to stick to the old versions |
There's an active PR to fix persistence issue that you subscribe to for further updates. |
Hey @rutaba1. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically. If you have more information that will help us get to the bottom of this, just add a comment! |
Since there haven't been any recent updates here, I am going to close this issue. @rutaba1 if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this. |
Bug report
Describe the bug
I am using flutter fire on my flutter web app and flutterfire_ui plugin for auth. I'm initialising the firebase dependencies in index.html file like this:
<script src="https://www.gstatic.com/firebasejs/9.9.0/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/9.9.0/firebase-firestore.js"></script>
<script src="https://www.gstatic.com/firebasejs/9.9.0/firebase-analytics.js"></script>
<script src="https://www.gstatic.com/firebasejs/9.9.0/firebase-auth.js"></script>
<script src="https://www.gstatic.com/firebasejs/9.9.0/firebase-firestore.js"></script>
<script src="https://www.gstatic.com/firebasejs/9.9.0/firebase-storage.js"></script>
<script src="https://www.gstatic.com/firebasejs/9.9.0/firebase-remote-config.js"></script>
But as soon as I hit sign in button I get an exception. Btw I'm using signInWithEmail with flutterfire_ui.
TypeError: Cannot read properties of undefined (reading 'auth')
at Object.getAuthInstance (http://localhost:57052/packages/firebase_auth_web/src/interop/auth.dart.lib.js:1037:70)
at get [_delegate] (http://localhost:57052/packages/firebase_auth_web/firebase_auth_web.dart.lib.js:81:49)
at new firebase_auth_web.FirebaseAuthWeb.new (http://localhost:57052/packages/firebase_auth_web/firebase_auth_web.dart.lib.js:476:9)
at firebase_auth_web.FirebaseAuthWeb..delegateFor (http://localhost:57052/packages/firebase_auth_web/firebase_auth_web.dart.lib.js:86:14)
at FirebaseAuthPlatform.instanceFor (http://localhost:57052/packages/firebase_auth_platform_interface/src/types.dart.lib.js:1665:77)
at get [_delegate] (http://localhost:57052/packages/firebase_auth/firebase_auth.dart.lib.js:91:135)
at firebase_auth.FirebaseAuth..signInWithCredential (http://localhost:57052/packages/firebase_auth/firebase_auth.dart.lib.js:272:68)
at signInWithCredential.next ()
at runBody (http://localhost:57052/dart_sdk.js:43013:34)
at Object._async [as async] (http://localhost:57052/dart_sdk.js:43044:7)
at firebase_auth.FirebaseAuth..signInWithCredential (http://localhost:57052/packages/firebase_auth/firebase_auth.dart.lib.js:271:20)
at email_flow.EmailFlow.new.signIn (http://localhost:57052/packages/flutterfire_ui/src/auth/configs/email_link_provider_configuration.dart.lib.js:13647:47)
at signIn.next ()
at runBody (http://localhost:57052/dart_sdk.js:43013:34)
at Object._async [as async] (http://localhost:57052/dart_sdk.js:43044:7)
at email_flow.EmailFlow.new.signIn (http://localhost:57052/packages/flutterfire_ui/src/auth/configs/email_link_provider_configuration.dart.lib.js:13646:20)
at email_flow.EmailFlow.new.onCredentialReceived (http://localhost:57052/packages/flutterfire_ui/src/auth/configs/email_link_provider_configuration.dart.lib.js:13710:40)
at onCredentialReceived.next ()
at runBody (http://localhost:57052/dart_sdk.js:43013:34)
at Object._async [as async] (http://localhost:57052/dart_sdk.js:43044:7)
at email_flow.EmailFlow.new.onCredentialReceived (http://localhost:57052/packages/flutterfire_ui/src/auth/configs/email_link_provider_configuration.dart.lib.js:13691:20)
at [onCredentialReceived] (http://localhost:57052/packages/flutterfire_ui/src/auth/configs/email_link_provider_configuration.dart.lib.js:14050:20)
at email_flow.EmailFlow.new.onCredentialReceived$ (http://localhost:57052/packages/flutterfire_ui/src/auth/configs/email_link_provider_configuration.dart.lib.js:14038:45)
at onCredentialReceived$.next ()
at runBody (http://localhost:57052/dart_sdk.js:43013:34)
at Object._async [as async] (http://localhost:57052/dart_sdk.js:43044:7)
at email_flow.EmailFlow.new.onCredentialReceived (http://localhost:57052/packages/flutterfire_ui/src/auth/configs/email_link_provider_configuration.dart.lib.js:14029:20)
at email_flow.EmailFlow.new.setCredential (http://localhost:57052/packages/flutterfire_ui/src/auth/configs/email_link_provider_configuration.dart.lib.js:13642:12)
at email_flow.EmailFlow.new.setEmailAndPassword (http://localhost:57052/packages/flutterfire_ui/src/auth/configs/email_link_provider_configuration.dart.lib.js:14025:12)
at [_submit] (http://localhost:57052/packages/flutterfire_ui/src/auth/configs/email_link_provider_configuration.dart.lib.js:11983:16)
at http://localhost:57052/packages/flutterfire_ui/src/auth/widgets/password_input.dart.lib.js:120:23
at [_finalizeEditing] (http://localhost:57052/packages/flutter/src/widgets/widget_inspector.dart.lib.js:37361:9)
at editable_text.EditableTextState.new.performAction (http://localhost:57052/packages/flutter/src/widgets/widget_inspector.dart.lib.js:37217:37)
at text_input.TextInput.._handleTextInputInvocation (http://localhost:57052/packages/flutter/src/services/text_formatter.dart.lib.js:2300:64)
at _handleTextInputInvocation.next ()
at runBody (http://localhost:57052/dart_sdk.js:43013:34)
at Object._async [as async] (http://localhost:57052/dart_sdk.js:43044:7)
at [_handleTextInputInvocation] (http://localhost:57052/packages/flutter/src/services/text_formatter.dart.lib.js:2243:20)
at OptionalMethodChannel._handleAsMethodCall (http://localhost:57052/packages/flutter/src/services/restoration.dart.lib.js:1647:57)
at _handleAsMethodCall.next ()
at runBody (http://localhost:57052/dart_sdk.js:43013:34)
at Object._async [as async] (http://localhost:57052/dart_sdk.js:43044:7)
at [_handleAsMethodCall] (http://localhost:57052/packages/flutter/src/services/restoration.dart.lib.js:1644:20)
at http://localhost:57052/packages/flutter/src/services/restoration.dart.lib.js:1640:126
at http://localhost:57052/packages/flutter/src/services/restoration.dart.lib.js:6504:33
at Generator.next ()
at runBody (http://localhost:57052/dart_sdk.js:43013:34)
at Object._async [as async] (http://localhost:57052/dart_sdk.js:43044:7)
at http://localhost:57052/packages/flutter/src/services/restoration.dart.lib.js:6501:24
at Object.invoke2 (http://localhost:57052/dart_sdk.js:203786:7)
at ui._ChannelCallbackRecord.new.invoke (http://localhost:57052/dart_sdk.js:140854:15)
at ui._Channel.new.push (http://localhost:57052/dart_sdk.js:140931:54)
at ui.ChannelBuffers.new.push (http://localhost:57052/dart_sdk.js:141027:29)
at _engine.EnginePlatformDispatcher.__.invokeOnPlatformMessage (http://localhost:57052/dart_sdk.js:182711:27)
at _engine.TextEditingChannel.new.performAction (http://localhost:57052/dart_sdk.js:197986:49)
at http://localhost:57052/dart_sdk.js:198077:24
at _engine.GloballyPositionedTextEditingStrategy.new.maybeSendAction (http://localhost:57052/dart_sdk.js:189211:40)
at Object._checkAndCall (http://localhost:57052/dart_sdk.js:5603:16)
at Object.dcall (http://localhost:57052/dart_sdk.js:5608:17)
at HTMLInputElement. (http://localhost:57052/dart_sdk.js:115918:21)
Flutter doctor
Run
flutter doctor
and paste the output below:Click To Expand
Flutter dependencies
Run
flutter pub deps -- --style=compact
and paste the output below:Click To Expand
The text was updated successfully, but these errors were encountered: