Open reimager opened 3 months ago
Hey @reimager - It would be extremely helpful if you could provide a reproduction so we can properly diagnose the issue and get this resolved.
It would also be useful if you could provide the platform this is occurring on. It might be worth adding some logging around the sign in process and the profile to see when this occurs to help with the reproduction.
I responded to a similar problem in another thread. Linking here as my response might be relevant in tracking down the issue.
I also get this error if I add a listener callback like this:
@override
void initState() {
super.initState();
auth.authStateChanges().listen((User? user) {
if (user == null) {
setState(() {
userSignedIn = false;
});
} else {
setState(() {
userSignedIn = true;
});
}
});
}
I get this error when signing out from ProfileScreen if anything else besides Navigator is called. Even if a listener like above post exist. I just need some way to trigger UI changes if the user sign out.
Is there an existing issue for this?
What plugin is this bug for?
Firebase UI Auth
What platform(s) does this bug affect?
No response
List of dependencies used.
flutter pub deps -s list
Steps to reproduce
I'm not able to reproduce - but I get dozens of crash reports from live usage. I have no idea how users even get to the profile screen when currentUser is null. Given that its somewhat rare I would suspect a corner case like deleting the account or some odd action like that.
So it appears that there are some cases where currentUser is null
Expected Behavior
Maybe just show text saying not logged in?
Actual Behavior
An exception is thrown
Additional Information
No response