tattwei46 / flutter_login_demo

A demo login app with Flutter and Firebae
369 stars 215 forks source link

Cannot create a user #17

Closed polroti closed 2 years ago

polroti commented 4 years ago

I'm getting this error: Tried calling: signUp("emailTExt", "password")

pls help

lewatt23 commented 4 years ago

@manoj997 did you find a solution ? am having the same problem

polroti commented 4 years ago

flutter clean on the project directory should solve it.

apos37 commented 4 years ago

I am also having this problem. Flutter clean did not work for me.

I/flutter (27609): Error: NoSuchMethodError: The method 'signUp' was called on null. I/flutter (27609): Receiver: null I/flutter (27609): Tried calling: signUp("myemail@gmail.com", "testing") E/flutter (27609): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: NoSuchMethodError: Class 'NoSuchMethodError' has no instance getter 'message'. E/flutter (27609): Receiver: Instance of 'NoSuchMethodError' E/flutter (27609): Tried calling: message E/flutter (27609): #0 Object.noSuchMethod (dart:core-patch/object_patch.dart:53:5) E/flutter (27609): #1 _LoginSignupPageState.validateAndSubmit. (package:myapp/screens/login_signup.dart:63:29) E/flutter (27609): #2 State.setState (package:flutter/src/widgets/framework.dart:1233:30) E/flutter (27609): #3 _LoginSignupPageState.validateAndSubmit (package:myapp/screens/login_signup.dart:61:9)

Seems to be a problem with the validateAndSubmit() function here: catch (e) { print('Error: $e'); setState(() { _isLoading = false; _errorMessage = e.message; /*<-- the error link takes me to e.message */ _formKey.currentState.reset(); });

polroti commented 4 years ago

@mrgandy dude try this below!

Seems like you have to make a new instance to the baseAuth object final BaseAuth auth = new BaseAuth();

plus, everytime you run it, do a flutter clean

polroti commented 2 years ago

Since there's no response/resolution, closing this issue