adityadroid/Messio

Application wont proceed further

Closed this issue · 22 comments

Hi, I have created my own package and followed all your steps. On application start after pressing Sign in with google I get a dialog box with account selection However when I select my gmail , application, there will be a quick flicker on
the screen then application shows me the start page where it asks me to "Sign In with google". I get following error:

W/ActivityThread(29757): handleWindowVisibility: no activity for token android.os.BinderProxy@81c22e0
I/flutter (29757): #0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:569:7)
I/flutter (29757): #1      MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:316:33)
I/flutter (29757): <asynchronous suspension>
I/flutter (29757): #2      MethodChannel.invokeMapMethod (package:flutter/src/services/platform_channel.dart:344:48)
I/flutter (29757): <asynchronous suspension>
I/flutter (29757): #3      GoogleSignIn._callMethod (package:google_sign_in/google_sign_in.dart:218:23)
I/flutter (29757): <asynchronous suspension>
I/flutter (29757): #4      GoogleSignIn._addMethodCall (package:google_sign_in/google_sign_in.dart:257:20)
I/flutter (29757): #5      GoogleSignIn.signIn (package:google_sign_in/google_sign_in.dart:324:48)
I/flutter (29757): #6      AuthenticationProvider.signInWithGoogle (package:blabla/providers/AuthenticationProvider.dart:18:28)
I/flutter (29757): <asynchronous suspension>
I/flutter (29757): #7      AuthenticationRepository.signInWithGoogle (package:blabla/repositories/AuthenticationRepository.dart:11:30)
I/flutter (29757): #8      AuthenticationBloc.mapClickedGoogleLoginToState (package:blabla/blocs/authentication/AuthenticationBloc.dart:77:42)
I/flutter (29757): <asynchronous suspension

Hi, I have created my own package and followed all your steps. On application start after pressing Sign in with google I get a dialog box with account selection However when I select my gmail , application, there will be a quick flicker on
the screen then application shows me the start page where it asks me to "Sign In with google". I get following error:

W/ActivityThread(29757): handleWindowVisibility: no activity for token android.os.BinderProxy@81c22e0
I/flutter (29757): #0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:569:7)
I/flutter (29757): #1      MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:316:33)
I/flutter (29757): <asynchronous suspension>
I/flutter (29757): #2      MethodChannel.invokeMapMethod (package:flutter/src/services/platform_channel.dart:344:48)
I/flutter (29757): <asynchronous suspension>
I/flutter (29757): #3      GoogleSignIn._callMethod (package:google_sign_in/google_sign_in.dart:218:23)
I/flutter (29757): <asynchronous suspension>
I/flutter (29757): #4      GoogleSignIn._addMethodCall (package:google_sign_in/google_sign_in.dart:257:20)
I/flutter (29757): #5      GoogleSignIn.signIn (package:google_sign_in/google_sign_in.dart:324:48)
I/flutter (29757): #6      AuthenticationProvider.signInWithGoogle (package:blabla/providers/AuthenticationProvider.dart:18:28)
I/flutter (29757): <asynchronous suspension>
I/flutter (29757): #7      AuthenticationRepository.signInWithGoogle (package:blabla/repositories/AuthenticationRepository.dart:11:30)
I/flutter (29757): #8      AuthenticationBloc.mapClickedGoogleLoginToState (package:blabla/blocs/authentication/AuthenticationBloc.dart:77:42)
I/flutter (29757): <asynchronous suspension

Can you post your code?
Or link to the project repo, preferably.

Can you post your code?
Or link to the project repo, preferably.

https://github.com/nepal12/blabla

Can you post your code?
Or link to the project repo, preferably.

https://github.com/nepal12/blabla

I checked your code. This seems to be an issue with the google-services.json file in your andorid/app directory.
Try removing that file and downloading and adding it again. Make sure:

  1. That the SHA1 you enter while generating google-services.json is correct.
  2. The package name is correct.

Refer
Firestore Token retrieval failed: INVALID_SENDER

@nepal12 is the issue solved?

I think I've clarified your doubts. Feel free to open this issue back if needed.

I am also not able to login to app but i had added both sha, enabled google login, enabled database and storage.

I am also not able to login to app but i had added both sha, enabled google login, enabled database and storage.

Can you post logs ?

I will be able to post log tomorrow. So, please wait for some time.

I will be able to post log tomorrow. So, please wait for some time.

okay.

When i build this app and install it then i am not able to login but when i install this app running it from vscode then i am able to login. Is this an issue or anything else ?

When i build this app and install it then i am not able to login but when i install this app running it from vscode then i am able to login. Is this an issue or anything else ?

Are you using the same build environment in both places? I think you have different android SDK setup for VSCode and AS. You should either use the same SDK on both the places and use the SHA1 from that SDK. (SHA1 is generated using the debug key, which is generally the part of the android SDK unless you explicitly set it).

What you can do is:

  1. Use any one editor and use the SHA1 from that editor to generate google-services.json.
    Or
  2. Use a common android SDK in both the editors.

Sorry for this much disturbance. I want to know that how to add another user. I had logged in from two devices with different accounts.

When i build this app and install it then i am not able to login but when i install this app running it from vscode then i am able to login. Is this an issue or anything else ?

Are you using the same build environment in both places? I think you have different android SDK setup for VSCode and AS. You should either use the same SDK on both the places and use the SHA1 from that SDK. (SHA1 is generated using the debug key, which is generally the part of the android SDK unless you explicitly set it).

What you can do is:

  1. Use any one editor and use the SHA1 from that editor to generate google-services.json.
    Or
  2. Use a common android SDK in both the editors.

Ok

I had already tried to add user by username option but not able to add user.

What issue are you facing while adding users? Can you explain/post logs?

Screenshot (52)

This is the screen shot of error while adding user

Screenshot (50)

This the screenshot while logging in to application.

These rules are defined in database.

Screenshot (53)

In the last two lines remove the condition which checks for uid matching.
I'll write a separate post on firebase rules towards the end of this series.

Screenshot (55)

like this ?

Yes. This will work.

Closing the issue for now. Feel free to open it back if the issue persists.