Open Zen12 opened 2 years ago
This is interesting. Are you certain that your code works with other login methods? I'm asking because the stacktrace seems to point to a crash in:
which is invoked before we even get to logging in users and should not depend on the authentication type. The stacktrace seems to point more specifically to the ctor of AndroidJavaClass
: new AndroidJavaClass("com.unity3d.player.UnityPlayer")
. As far as I can tell, this may be because the thread isn't attached to JNI, which would imply you're calling this from a background thread. While we do have to fix it, I'd like to first understand if I'm on the right track. Can you confirm:
AndroidJNI.AttachCurrentThread()
before creating the app configuration fixes the crash?Thanks for the quick answer. The issue was with threads. I was expecting Google Sign In to call the callback in UnityThread, it is calling from the background thread.
Hey, thanks for confirming. I'll reopen the issue though as we still want to do the right thing, even when not called from the Unity thread.
What happened?
Hi,
We are implementing authentification, we are facing an issue with Google Authentification (Facebook auth works OK)
When we try to auth via Google Credentials, the app crashes (mono and il2cpp)
Repro steps
Integrate a plugin in the project (Unity 2020.3.14) -> Integrate Google Sign In 1.0.4 (https://github.com/googlesamples/google-signin-unity/releases/tag/v1.0.4) -> SignIn with previous plugin -> Use realm login with needed credentials.
Version
10.6.0
What SDK flavour are you using?
MongoDB Realm (i.e. Sync, auth, functions)
What type of application is this?
Unity
Client OS and version
Android
Code snippets
Stacktrace of the exception/crash you're getting
Relevant log output