Skip to content

No Internet fails #661

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

Closed
LeeHounshell opened this issue Apr 9, 2017 · 13 comments
Closed

No Internet fails #661

LeeHounshell opened this issue Apr 9, 2017 · 13 comments

Comments

@LeeHounshell
Copy link

Step 1: Are you in the right place?

yes

Step 2: Describe your environment

  • Android device: _____Nvidia Shield Tablet
  • Android OS version: _____Marshmallow
  • Google Play Services version: _____25.3.0
  • Firebase/Play Services SDK version: _____10.0.1
  • FirebaseUI version: ____1.2.0

Step 3: Describe the problem:

Can not interact with tablet after attempt to login using email with no Internet connectivity.

Steps to reproduce:

  1. _____Turn off Internet on Tablet
  2. _____Start test app with Firebase-UI
  3. _____try to login using "email"

Observed Results:

Spinner appears: 'Checking for existing accounts.' The spinner runs forever. I can not interrupt it.
The test app runs forever but only shows 'Checking for existing accounts.' There is no way to get out
except turn off the tablet or kill the test app.

Expected Results:

I expected a message stating "No Internet Available" and a return to my Login activity.
It would be nice if the message also had a button to take the user directly to 'Settings'
so Internet can be easily enabled.

Relevant Code:

@SUPERCILEX
Copy link
Collaborator

Hmmm, that seems to be a problem with the Auth team because we have an onComplete listener that should remove the dialog if the request fails. My guess is that they don't have a timeout for the request, but I'd have to debug to make sure.

@LeeHounshell
Copy link
Author

LeeHounshell commented Apr 18, 2017 via email

@SUPERCILEX
Copy link
Collaborator

Oh true. That should happen actually... I'll look into it.

@LeeHounshell
Copy link
Author

LeeHounshell commented Apr 18, 2017 via email

@SUPERCILEX
Copy link
Collaborator

@LeeHounshell Yeah, but ideally we don't have to care about that. I'd prefer to keep problems from Firebase Auth separate from FirebaseUI-Auth, but that's @samtstern's call.

As for your issue, I can't repro and the bug shouldn't happen: https://github.com/firebase/FirebaseUI-Android/blob/master/auth/src/main/java/com/firebase/ui/auth/ui/FragmentBase.java#L22.

@SUPERCILEX
Copy link
Collaborator

Do you have any more details on how to repro the issue? That would really help debug! 😄

@samtstern samtstern modified the milestone: 2.0.0 Apr 26, 2017
@gsalehali
Copy link

I have a similar problem. when the user opens the app, if there is no network connection, the screen stays blank waiting for internet connection. the user can not interact with the app that include pressing the back button.
I tried to add an exit button to a Snackbar, that shows when there is no internet connection, but it behaves in unpredictable way. it requires many clicks to exit and that the number of clicks is not consistent each time as well!
is there any way that make the user able to exit the app, (not completely destroying the app)?

@SUPERCILEX
Copy link
Collaborator

@gsalehali we're going to be getting rid of those pesky progress dialogs anyway, so this issue should be fixed. 😃

@sipersso
Copy link

sipersso commented Jun 9, 2017

I can reproduce by doing the following

(For google auth):
1: Start the app with connectivity on and show firebase ui
2: Turn app phone to flightmode in the screen where you can select auth method
3: Try to sign in with google account
Expected: Sign in activity finishes with ErrorCodes.NO_NETWORK
Actual: The sign in screen is still shown and firebase ui is not finished. Screen flickers so I guess the auth picker activity is restarted.

(For email auth):
1: Start the app with connectivity on and show firebase ui
2: Turn app phone to flightmode in the screen where you can select auth method
3: Enter an email and press next
Expected: Sign in activity finishes with ErrorCodes.NO_NETWORK
Actual: A dialog flashes with the text checking for existing accounts.

Firebase UI version 1.2.0

@arunavo4
Copy link

every thing runs fine when there is internet connection but when i turn off internet
then
after i start the app , the app crashes:
with this error....
java.lang.NullPointerException: Attempt to invoke interface method 'void com.google.firebase.auth.FirebaseAuth$AuthStateListener.onAuthStateChanged(com.google.firebase.auth.FirebaseAuth)' on a null object reference

//code

    //Initializing the authStateListener
    mAuthListener = new FirebaseAuth.AuthStateListener() {
        @Override
        public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {
            FirebaseUser user = firebaseAuth.getCurrentUser();
            updateUI(user);

@long1eu
Copy link

long1eu commented Aug 30, 2017

I have a request for this too. There isn't a way to tell if there is no internet connection once the LoginActivity is shown.

@MohamedAbdelrazek
Copy link

when there is no Internet the App Open the main Activity Instead of LoginActivty.

@samtstern
Copy link
Contributor

This is a very old issue which I believe was fixed in one of @SUPERCILEX's auth rewrites. Closing this out, if anyone experiences an issue with FirebaseUI and connectivity detection please open a new issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants