-
Notifications
You must be signed in to change notification settings - Fork 122
signInWithSocialWebUI throws a NullPointerException on 2.2.0 but not on 1.37.10 #2282
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
Comments
@MrBenjoo we are not able to reproduce this issue. It seems in your case the token received on callback is null and that is not the expected behavior. We have a PR out to capture the NPE and display the error, but in the mean time, is other social plugins like facebook working? |
@banji180 I am getting the same exception after signing in with apple or facebook. Maybe it is unrelated, but i am seeing this in the logs each time the exception is thrown:
|
ok thanks for the quick response, but I don't think this is the root cause. It seems the token is coming back as null, but since we are not able to reproduce, we are updating the SDK shortly to catch and display the token is null error. Once we release this update, we will update you. |
We have released library version 2.2.2 to attempt to resolve this issue. Please let us know if that works for you! |
@tjleing Yes, it seems that it works now. Thanks! |
|
Before opening, please confirm:
Language and Async Model
Kotlin - Coroutines
Amplify Categories
Authentication
Gradle script dependencies
Environment information
Please include any relevant guides or documentation you're referencing
https://docs.amplify.aws/lib/auth/social/q/platform/android/#update-androidmanifestxml
Describe the bug
Calling
Amplify.Auth.signInWithSocialWebUI(AuthProvider.google(), callingActivity)
throws a nullpointerexception.It works when using
core-kotlin:0.21.10
andaws-auth-cognito:1.37.10
, i am able to sign in without problems.Reproduction steps (if applicable)
No response
Code Snippet
Log output
java.lang.NullPointerException at com.amplifyframework.auth.cognito.actions.AuthorizationCognitoActions$initializeFetchAuthSession$$inlined$invoke$1.execute(Action.kt:89) at com.amplifyframework.statemachine.ConcurrentEffectExecutor$execute$1$1.invokeSuspend(ConcurrentEffectExecutor.kt:26) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664) Suppressed:
kotlinx.coroutines.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@c4f97ba, Dispatchers.Default]
amplifyconfiguration.json
GraphQL Schema
Additional information and screenshots
Also, I never got this exception on version 2.0.0.
The text was updated successfully, but these errors were encountered: