Describe the bug
Google Sign-in does not complete, does not return to AWSMobileClient.sharedInstance().showSignIn, does not call AWSMobileClient.sharedInstance().addUserStateListener registered listeners, and reports no error (error == null).
AWSMobileClient.sharedInstance().showSignIn(navigationController: nav,signInUIOptions: SignInUIOptions(canCancel: false, logoImage: UIImage( named:"LaunchArt4x4Garage"),backgroundColor: UIColor.red), { (userState, error) in
if(error == nil){ //Successful signin
NSLog("AWSMobileClientHelper(swift): checkLogin: user completed signed in. okay.");
DispatchQueue.main.async { loginCheckCompletion(nil); }
}
})
Note, Google sign in works with the following legacy objective code (the app is being upgraded to use AWSMobileClient in swift)
[AWSAuthUIViewController presentViewControllerWithNavigationController:navigationController
configuration:config
completionHandler:^(id<AWSSignInProvider> _Nonnull signInProvider, NSError * _Nullable errorAWSAuthUIViewController) {
LOG_LOCATION();
if (errorAWSAuthUIViewController) {
NSLog(@"Error displaying AWSAuthUIViewController: %@", errorAWSAuthUIViewController);
signIncompletionHandler(errorAWSAuthUIViewController);
} else {
NSLog(@"Login Success");
[self presentTermsAndConditionsViewController:navigationController];
signIncompletionHandler(nil);
}
}];
To Reproduce
Steps to reproduce the behavior:
AWSMobileClient.sharedInstance().signOut();)AWSMobileClient.sharedInstance().showSignIn)Which AWS service(s) are affected?
AWSMobileClient with AWSGoogleSignInProvider
Expected behavior
User should be signed in when shin in dialog is dismissed and callbacks and listeners should be called.
Environment(please complete the following information):
Device Information (please complete the following information):
Additional context
awsconfiguration.json
{
"UserAgent": "MobileHub/1.0",
"Version": "1.0",
"CredentialsProvider": {
"CognitoIdentity": {
"Default": {
"PoolId": "xxxxxxxxx",
"Region": "us-east-1"
}
}
},
"IdentityManager": {
"Default": {}
},
"CognitoUserPool": {
"Default": {
"PoolId": "us-east-xxxxxxxx",
"AppClientId": "xxxxxx",
"AppClientSecret": "xxxxxx",
"Region": "us-east-1"
}
},
"S3TransferUtility": {
"Default": {
"Bucket": "xxxxxxxxx",
"Region": "us-east-1"
}
},
"S3": {
"Default": {
"Bucket": "xxxxxxxxx",
"Region": "us-east-1"
}
},
"Cognito": {
"Default": {
"Region": "us-east-1"
}
},
"DynamoDBObjectMapper": {
"Default": {
"Region": "us-east-1"
}
},
"ContentManager": {
"Default": {
"Bucket": "xxxxxxxxx",
"Region": "us-east-1",
"CloudFrontURL": "https://xxxxxxxx.cloudfront.net"
}
},
"PinpointAnalytics": {
"Default": {
"AppId": "xxxxxxxx",
"Region": "us-east-1"
}
},
"PinpointTargeting": {
"Default": {
"Region": "us-east-1"
}
},
"UserFileManager": {
"Default": {
"Bucket": "xxxxxxxx",
"Region": "us-east-1"
}
},
"GoogleSignIn": {
"ClientId-WebApp": "xxxxxxxxx-xxxxxxxx.apps.googleusercontent.com",
"ClientId-iOS": "xxxxxxxxxx-xxxxxxxxxx.apps.googleusercontent.com",
"Permissions": "email,profile,openid"
},
"FacebookSignIn": {
"AppId": "xxxxxxxxxxxx",
"Permissions": "public_profile"
}
}
Start app
Observe: Logs
2018-12-14 15:49:06.471090-0500 modlist[4217:1407835] application didFinishLaunchingWithOptions
2018-12-14 15:49:06.557225-0500 modlist[4217:1407835] Pinpoint is ready.
2018-12-14 15:49:06.558150-0500 modlist[4217:1407835] application didFinishLaunchingWithOptions: done.
2018-12-14 15:49:06:558 modlist[4217:1407835] AWSMobileClient -> sharedInstance...
2018-12-14 15:49:06:558 modlist[4217:1407835] didFinishLaunching:withOptions:resumeSessionWithCompletionHandler:
2018-12-14 15:49:06:558 modlist[4217:1407835] Configuring SignInProvider : CognitoUserPool.
2018-12-14 15:49:06:558 modlist[4217:1407835] Registering SignInProvider AWSCognitoUserPoolsSignInProvider from awsconfiguration.json.
2018-12-14 15:49:06:558 modlist[4217:1407835] Configuring SignInProvider : FacebookSignIn.
2018-12-14 15:49:06:558 modlist[4217:1407835] Registering SignInProvider AWSFacebookSignInProvider from awsconfiguration.json.
2018-12-14 15:49:06:558 modlist[4217:1407835] Configuring SignInProvider FacebookSignIn
2018-12-14 15:49:06:558 modlist[4217:1407835] Configuring SignInProvider : GoogleSignIn.
2018-12-14 15:49:06:558 modlist[4217:1407835] Registering SignInProvider AWSGoogleSignInProvider from awsconfiguration.json.
2018-12-14 15:49:06:561 modlist[4217:1407835] Configuring SignInProvider : GoogleSignIn.
2018-12-14 15:49:06:561 modlist[4217:1407835] Calling didFinishLaunching
Call: AWSMobileClient.sharedInstance().signOut();
Observe: Sign out logs
2018-12-14 15:51:22.575276-0500 modlist[4217:1407835] AWSMobileClientHelper(swift): user signed out
2018-12-14 15:51:22.575391-0500 modlist[4217:1407835] GarageCollectionViewController: receiveSignOutNotification:
2018-12-14 15:51:22.575455-0500 modlist[4217:1407835] LoginHelper: checkLogin:completionHandler:
2018-12-14 15:51:22.575489-0500 modlist[4217:1407835] AWSMobileClientHelper(swift): checkLogin: entered.
2018-12-14 15:51:22:575 modlist[4217:1407835] AWSMobileClient -> sharedInstance...
2018-12-14 15:51:22:576 modlist[4217:1407835] Configuring SignInProvider : CognitoUserPool.
2018-12-14 15:51:22:576 modlist[4217:1407835] Configuring SignInProvider : FacebookSignIn.
2018-12-14 15:51:22:576 modlist[4217:1407835] Configuring SignInProvider : GoogleSignIn.
2018-12-14 15:51:22:576 modlist[4217:1407835] Presenting SignInViewController
2018-12-14 15:51:22:576 modlist[4217:1407835] Initializing the AWSSignInViewController...
2018-12-14 15:51:22:577 modlist[4217:1407835] URL: file:///var/containers/Bundle/Application/xxxxxxx/modlist.app/Frameworks/AWSAuthUI.framework/AWSAuthUI.bundle/
2018-12-14 15:51:22:578 modlist[4217:1407835] assetsBundle: NSBundle </var/containers/Bundle/Application/xxxxxxx/modlist.app/Frameworks/AWSAuthUI.framework/AWSAuthUI.bundle> (not yet loaded)
2018-12-14 15:51:22:587 modlist[4217:1407835] Sign-In Loading...
2018-12-14 15:51:22:593 modlist[4217:1407835] User Pools Enabled. Setting up the view...
2018-12-14 15:51:22:593 modlist[4217:1407835] Operating on Button View=AWSFacebookSignInButton
2018-12-14 15:51:22.594464-0500 modlist[4217:1407835] <CATransformLayer: 0x283d55c60> - changing property contentsGravity in transform-only layer, will have no effect
2018-12-14 15:51:22.595560-0500 modlist[4217:1407835] [framework] CUIThemeStore: No theme registered with id=0
2018-12-14 15:51:22:598 modlist[4217:1407835] Operating on Button View=AWSGoogleSignInButton
2018-12-14 15:51:22:598 modlist[4217:1407835] Google Frame: 280.000000 40.000000
2018-12-14 15:51:22:598 modlist[4217:1407835] Google Button: 280.000000 40.000000
2018-12-14 15:51:22.598562-0500 modlist[4217:1407835] <CATransformLayer: 0x283d56800> - changing property contentsGravity in transform-only layer, will have no effect
2018-12-14 15:51:22.599410-0500 modlist[4217:1407835] [framework] CUIThemeStore: No theme registered with id=0
Select the "Sign in with Google" button
Observe: Sign-in dialog dismisses. Logs show AWSGoogleSignInProvider, no error returned.
Logs:
2018-12-14 15:54:37.963790-0500 modlist[4217:1408494] [BoringSSL] nw_protocol_boringssl_get_output_frames(1301) [C10.1:2][0x10470fae0] get output frames failed, state 8196
2018-12-14 15:54:37.964163-0500 modlist[4217:1408494] [BoringSSL] nw_protocol_boringssl_get_output_frames(1301) [C10.1:2][0x10470fae0] get output frames failed, state 8196
2018-12-14 15:54:37.965141-0500 modlist[4217:1408494] TIC Read Status [10:0x0]: 1:57
2018-12-14 15:54:37.965237-0500 modlist[4217:1408494] TIC Read Status [10:0x0]: 1:57
2018-12-14 15:54:38:450 modlist[4217:1407835] result = <AWSGoogleSignInProvider: 0x2828baac0>, error = (null)
2018-12-14 15:54:38.456388-0500 modlist[4217:1408994] [BoringSSL] nw_protocol_boringssl_get_output_frames(1301) [C11.1:2][0x107304e50] get output frames failed, state 8196
2018-12-14 15:54:38.457246-0500 modlist[4217:1408994] [BoringSSL] nw_protocol_boringssl_get_output_frames(1301) [C11.1:2][0x107304e50] get output frames failed, state 8196
2018-12-14 15:54:38.458307-0500 modlist[4217:1408994] TIC Read Status [11:0x0]: 1:57
2018-12-14 15:54:38.458425-0500 modlist[4217:1408994] TIC Read Status [11:0x0]: 1:57
Observe: Registered state Listener not called. (AWSMobileClient.sharedInstance().addUserStateListener(self))
Observe: AWSMobileClient.sharedInstance().showSignIn callback not called.
I have found that Google logins are returning in "guest" mode only, if that helps troubleshoot.
The app registered for notifications:
``` @objc public static func addUserStateListeners() {
NSLog("AWSMobileClientHelper(swift): addUserStateListeners(): called.")
AWSMobileClient.sharedInstance().addUserStateListener(self) { (userState, info) in
switch (userState) {
case .guest:
NSLog("AWSMobileClientHelper(swift): StateListener: user is in guest mode.")
case .signedOut:
NSLog("AWSMobileClientHelper(swift): StateListener: user signed out")
case .signedIn:
NSLog("AWSMobileClientHelper(swift): StateListener: user is signed in.")
case .signedOutUserPoolsTokenInvalid:
NSLog("AWSMobileClientHelper(swift): StateListener: need to login again.")
case .signedOutFederatedTokensInvalid:
NSLog("AWSMobileClientHelper(swift): StateListener: user logged in via federation, but currently needs new tokens")
default:
NSLog("AWSMobileClientHelper(swift): StateListener: unsupported")
}
}
}
```
Upon Facebook login,
AWSMobileClientHelper(swift): StateListener: user is signed in.
Upon Google login,
AWSMobileClientHelper(swift): StateListener: user is in guest mode.
Also, the configuration is exactly the same as used in an Android app that is using AWSMobileClient that is working with Google and Facebook login.
Sometimes calls to showSignIn return error 27 (maybe unrelated):
2018-12-17 18:59:20.709500-0500 modlist[6959:2271426] AWSMobileClientHelper(swift): checkLogin: showSignIn() callback: userState = Optional(AWSMobileClient.UserState.signedIn)
2018-12-17 18:59:20:709 modlist[6959:2271426] Obtaining an identity id in another thread failed or didn't complete within 5 seconds.
I can switch back and forth between Facebook and Google, but because Google is in guest mode, the app will redisplay the login screen again because my code is checking AWSMobileClient.sharedInstance().initialize { (userState, error) in returns signed out.
Why is Google returning in Guest mode?
After login with a Google user, initialize is returning "guest" as the user state upon calls to initialize()
AWSMobileClient.sharedInstance().initialize { (userState, error) in returns userState "guest" for Google. The sample code was calling:
DispatchQueue.main.async { AWSMobileClient.sharedInstance().signOut() } for the default case resulting in all Google users getting signed out immediately (because I call initialize on viewWillAppear to verify that the user is singed in and has a non-nil identityId)
Sample Code Followed:
``` @IBOutlet weak var signInStateLabel: UILabel!
override func viewDidLoad() {
super.viewDidLoad()
AWSMobileClient.sharedInstance().initialize { (userState, error) in
if let userState = userState {
switch(userState){
case .signedIn:
DispatchQueue.main.async {
self.signInStateLabel.text = "Logged In"
}
case .signedOut:
AWSMobileClient.sharedInstance().showSignIn(navigationController: self.navigationController!, { (userState, error) in
if(error == nil){ //Successful signin
DispatchQueue.main.async {
self.signInStateLabel.text = "Logged In"
}
}
})
default:
AWSMobileClient.sharedInstance().signOut()
}
} else if let error = error {
print(error.localizedDescription)
}
}
}```
(from: https://aws-amplify.github.io/docs/ios/authentication)
Why are Google users returning from initialize with userState as "guest"?
I continue to have a variety of problems with the AWSMobileClient. Calls to login or getIdentifyId are returning error 8 or error 27.
After more refactoring, I have a method called checkLoginWithNav in swift that is called by an Objective C wrapper. Unfortunately, I am now back to getting the error (which I understood was fixed by the latest API, to manage concurrent requests properly).
2018-12-20 12:03:27:979 modlist[8819:2981297] Obtaining an identity id in another thread failed or didn't complete within 5 seconds and also sometimes error 27.
In a nutshell, the main view on an Objective C app checks for login before loading any data (from DynamoDB) or before getting the identityId.
[[LoginHelper sharedInstance] checkLogin:self.navigationController completionHandler:^(NSError * _Nullable error) {
The LoginHelper is a singleton that then calls
[AWSMobileClientHelper checkLoginWithNav:navigationController loginCheckCompletion:^(NSString * _Nullable result) {
which is code taken from the amplify documentation:
(The code is bloated with error messages and attempts to resolve login concurrency and other problems with AWSMobileClient sign in) I hope it provides some insight. What should be an easy drop in continues to be problematic to the point of regret.
@objc public static func checkLogin(nav: UINavigationController, loginCheckCompletion: @escaping (_ error: String?) -> Void) {
NSLog("AWSMobileClientHelper(swift): checkLogin: entered.");
AWSMobileClient.sharedInstance().initialize { (userState, error) in
if (error != nil) {
NSLog("AWSMobileClientHelper(swift): checkLogin: error: " + error.debugDescription);
} else {
NSLog("AWSMobileClientHelper(swift): checkLogin: initialize() userState: " + userState!.rawValue);
}
if let userState = userState {
switch(userState){
case .signedIn, .guest:
NSLog("AWSMobileClientHelper(swift): checkLogin: case .signedIn: user is already signed in. okay.");
AWSMobileClient.sharedInstance().getIdentityId().continueWith(block: { (task) -> Any? in
NSLog("AWSMobileClientHelper(swift): checkLogin: case .signedIn: AWSMobileClient.sharedInstance().getIdentityId().continueWith:");
if (task.error == nil){
NSLog("AWSMobileClientHelper(swift): checkLogin: case .signedIn: AWSMobileClient.sharedInstance().getIdentityId().continueWith: no error. call loginCheckCompletion()");
loginCheckCompletion(nil);
} else {
NSLog("AWSMobileClientHelper(swift): checkLogin: case .signedIn: AWSMobileClient.sharedInstance().getIdentityId().continueWith: has error." + (task.error?.localizedDescription)!);
//AWSMobileClient.sharedInstance().signOut()
// This is my attempt to get things working again when errors have caused an inability to sign in repeatedly
AWSMobileClient.sharedInstance().clearCredentials()
AWSMobileClient.sharedInstance().clearKeychain()
loginCheckCompletion(task.error?.localizedDescription);
}
return task;
})
case .signedOut:
NSLog("AWSMobileClientHelper(swift): checkLogin: case .signedOut: signing in user via showSignIn...");
AWSMobileClient.sharedInstance().showSignIn(navigationController: nav,signInUIOptions: SignInUIOptions(canCancel: false, logoImage: UIImage( named:"LaunchArt4x4Garage"),backgroundColor: UIColor.modListAccentColor), { (userState, error) in
NSLog("AWSMobileClientHelper(swift): checkLogin: showSignIn() callback: userState = " + userState.debugDescription);
if (error != nil) {
NSLog("AWSMobileClientHelper(swift): checkLogin: showSignIn() callback:" + error.debugDescription);
}
AWSMobileClient.sharedInstance().getIdentityId().continueWith(block: { (task) -> Any? in
if (task.error == nil){
loginCheckCompletion(nil);
} else {
NSLog("AWSMobileClient.sharedInstance().getIdentityId(): returned error " + task.error!.localizedDescription);
loginCheckCompletion(task.error?.localizedDescription);
}
return task;
});
});
default:
NSLog("AWSMobileClientHelper(swift): checkLogin: userState is not logged in or out?! Sign Out User. userState: " + userState.rawValue);
AWSMobileClient.sharedInstance().signOut()
}
} else if let error = error {
NSLog("AWSMobileClientHelper(swift): userState was nil.");
NSLog(error.localizedDescription)
loginCheckCompletion(error.localizedDescription);
}
}
}
So, in summary:
Why are Google users signed in a guest ?
Why is the API returning "Obtaining an identity id in another thread failed or didn't complete within 5 seconds." when it should be handling concurrent calls correctly? My code does not call initialize() nor getIdentityId() concurrently.
Thanks.
Hello @BillBunting
Sorry that you are having issues using AWSMobileClient. Thank you for such detailed explanation. It is very helpful. This is a bug in the SDK. The session is not recorded correctly for Google Sign In I believe. I will root cause it and reply back here to give an idea of when we can get a fix released.
Thanks,
Rohan
I continue to receive unexpected errors when the new AWSMobileClient with showSignIn and getUserId methods should be handling token refresh and maintaining an active login when called?
2018-12-20 16:50:12:708 modlist[9151:3088456] GetCredentialsForIdentity failed. Error is [Error Domain=com.amazonaws.AWSCognitoIdentityErrorDomain Code=8 "(null)" UserInfo={__type=NotAuthorizedException, message=Access to Identity 'us-east-1:xxxxxxx' is forbidden.}]
and then the event listener (AWSMobileClient.sharedInstance().addUserStateListener(self))
2018-12-20 16:50:12.804806-0500 modlist[9151:3088453] AWSMobileClientHelper(swift): StateListener: user logged in via federation, but currently needs new tokens
The prior call to AWSMobileClient.sharedInstance().initialize() returned a singed in state and getUserId returned a valid userId.
Am I doing something wrong? This should be working?
I worked around the issue by repeatedly calling AWSMobileClient.sharedInstance().initialize { (userState, error) until sign-in is successful. Sometimes a call to initialize will return nil for both the userState and error. I'm looking forward to an update of AWSMobileClient soon.
Hello @BillBunting
I have identified a fix for this issue and this issue will be fixed in a future release.
Thanks for your patience.
Best,
Rohan
@rohandubal Thank you for attending to this issue. I am unable to release a new version of my app until Google sign-in and other issues with AWSMobileClient sign-in/sign-up and token refresh are resolved. The app is currently getting a lot of error 8, error 27, and error 28 returned to AWSMobileClient.sharedInstance().getIdentityId() or .showSignIn() in addition to issues with Google Sign-in. For planning reasons, when can I expect a new version of AWSMobleClient? Thank you.
Hello @BillBunting
This issue will be fixed in our next release which should be very soon.
I will keep this thread posted as soon as the release is out.
Thanks,
Rohan
Hi @BillBunting,
We have just released version 2.8.2 of the SDK. Please check if this fixes the issue for you.
@rohandubal , @minbi , Thank you! Preliminary testing shows it works now. I can now sign-in with Google, sign-out, sign in again with Facebook (or Cognito User Pool with username/password), sign-out, and sign in with Google; no issues found. What a relief! The Google issue appears to be resolved.
I need to test token expiration to see that the token is automatically refreshed (it was working prior with Facebook, so I'm not expecting any issues).
The remaining issue I still notice is that after calling:
AWSMobileClient.sharedInstance().initialize { (userState, error) in
with userState returning .signedOut then calling:
AWSMobileClient.sharedInstance().showSignIn(navigationController: nav,signInUIOptions: SignInUIOptions(canCancel: false, logoImage: UIImage( named:"LaunchArt4x4Garage"),backgroundColor: UIColor.modListAccentColor), { (signInUserState, error) in with a signInUserState returning .signedIn then task.result is null with an error:
AWSMobileClientHelper(swift): checkLogin: AWSMobileClient.sharedInstance().getIdentityId(): returned error The operation couldn鈥檛 be completed. (AWSMobileClient.AWSMobileClientError error 27.)
In such cases, the code just repeats the sign-in progress initialize(), showSignIn(), followed by getIdentityId() where it will succeed the second time, or later time.
As evidenced by the logs:
2019-01-03 20:58:31.374275-0500 modlist[11037:3281374] AWSMobileClientHelper(swift): checkLogin: showSignIn() callback: signInUserState = Optional(AWSMobileClient.UserState.signedIn)
**2019-01-03 20:58:31:374 modlist[11037:3281343] Obtaining an identity id in another thread failed or didn't complete within 5 seconds.**
2019-01-03 20:58:31.375025-0500 modlist[11037:3281343] AWSMobileClientHelper(swift): **checkLogin: AWSMobileClient.sharedInstance().getIdentityId(): returned error The operation couldn鈥檛 be completed. (AWSMobileClient.AWSMobileClientError error 27.)**
2019-01-03 20:58:31.375073-0500 modlist[11037:3281343] Location (class: selector): LoginHelper: checkLogin:completionHandler:
2019-01-03 20:58:31.375193-0500 modlist[11037:3281343] checkLogin: checkLoginWithNav callback has error code: 27 error: The operation couldn鈥檛 be completed. (AWSMobileClient.AWSMobileClientError error 27.)
2019-01-03 20:58:31:375 modlist[11037:3281321] Request headers:
{
"Content-Type" = "application/x-amz-json-1.1";
Host = "cognito-identity.us-east-1.amazonaws.com";
"User-Agent" = "aws-sdk-iOS/2.8.2 iOS/12.1.2 en_US MobileHub/1.0";
"X-Amz-Date" = 20190104T015831Z;
"X-Amz-Target" = "AWSCognitoIdentityService.GetId";
}
**2019-01-03 20:58:31.375271-0500 modlist[11037:3281343] checkLogin: Login Failed. Try Again! attempt: 1 because: Error Domain=AWSMobileClient.AWSMobileClientError Code=27 "(null)"**
2019-01-03 20:58:31:375 modlist[11037:3281321] Request body:
{"IdentityPoolId":"us-east-1:38c69a5f-2af0-480b-a8ad-xxxxxx","Logins":{"accounts.google.com":"xxxx removed xxxx"}}
2019-01-03 20:58:31:449 modlist[11037:3281374] Response headers:
{
"Content-Length" = 63;
"Content-Type" = "application/x-amz-json-1.1";
Date = "Fri, 04 Jan 2019 01:58:31 GMT";
"x-amzn-requestid" = "xxxxxx-xxxx-xxxx-xxxx-xxxxx";
}
2019-01-03 20:58:31:450 modlist[11037:3281374] Response body:
{"IdentityId":"us-east-1:xxxxx"}
2019-01-03 20:58:31:473 modlist[11037:3281334] Request headers:
{
"Content-Type" = "application/x-amz-json-1.1";
Host = "cognito-identity.us-east-1.amazonaws.com";
"User-Agent" = "aws-sdk-iOS/2.8.2 iOS/12.1.2 en_US MobileHub/1.0";
"X-Amz-Date" = 20190104T015831Z;
"X-Amz-Target" = "AWSCognitoIdentityService.GetCredentialsForIdentity";
}
2019-01-03 20:58:31:474 modlist[11037:3281334] Request body:
{"Logins":{"accounts.google.com":".xxxx. removed.xxxx. "}
**2019-01-03 20:58:31.477035-0500 modlist[11037:3281203] checkLogin: Login Failed. Try Again! attempt: 1 because: Error Domain=AWSMobileClient.AWSMobileClientError Code=27 "(null)"**
2019-01-03 20:58:31.477229-0500 modlist[11037:3281203] Location (class: selector): LoginHelper: checkLogin:completionHandler:
2019-01-03 20:58:31.477339-0500 modlist[11037:3281203] AWSMobileClientHelper(swift): checkLogin: entered.
2019-01-03 20:58:31.477443-0500 modlist[11037:3281203] AWSMobileClientHelper(swift): checkLogin: initialize() userState: signedIn
2019-01-03 20:58:31.477499-0500 modlist[11037:3281203] AWSMobileClientHelper(swift): checkLogin: case .signedIn: user is already signed in. okay.
2019-01-03 20:58:31.485208-0500 modlist[11037:3281203] AWSMobileClientHelper(swift): checkLogin: case .signedIn: AWSMobileClient.sharedInstance().getIdentityId().continueWith:
2019-01-03 20:58:31.485264-0500 modlist[11037:3281203] AWSMobileClientHelper(swift): checkLogin: case .signedIn: AWSMobileClient.sharedInstance().getIdentityId().continueWith: no error.
2019-01-03 20:58:31.485304-0500 modlist[11037:3281203] AWSMobileClientHelper(swift): checkLogin: case .signedIn: AWSMobileClient.sharedInstance().getIdentityId() returns identityId: us-east-1:xxxx-xxxx-xxxx-xxxx-xxxxxxx
The error suggests there is a request to getIdentityId() in another thread, but in my code, there should not be any other requests that I am aware of (I even have the calls to initialize(), sign-in, and getIdentityId() coming from Objective-C using a singleton using dispatch_sync(self.queue... to a custom queue for good measure (due to prior attempts to work around the Google bug too). Regardless, with the code I have in place to repeat failed logins due to errors such as error 27, the login will succeed on the repeated attempts.
I'll let you know if anything comes up during our next release's beta testing starting soon now that this blocker is removed. I appreciate your assistance to resolve this issue.
Thank you,
-Bill.
Thanks for confirming. Feel free to open a new issue if anything arises.
Most helpful comment
Hello @BillBunting
I have identified a fix for this issue and this issue will be fixed in a future release.
Thanks for your patience.
Best,
Rohan