Skip to content
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

Empty signup screen on iOS simulator/device #1613

Closed
vijayendra-tripathi opened this issue Jun 17, 2019 · 5 comments
Closed

Empty signup screen on iOS simulator/device #1613

vijayendra-tripathi opened this issue Jun 17, 2019 · 5 comments
Labels
bug Something isn't working mobile client Issues related to AWSMobileClient

Comments

@vijayendra-tripathi
Copy link

I have configured AWS Cognito using Amplify. Please review following screenshot.
SignIn

Following is screenshot of my configuration details.
Cognito-Screenshot

I am testing it on XCode 10.2.1 on Simulator with iOS 12.2. There is a similar issue #1082 but I guess I already have facebook and Userpool configured in configuration file. So it must me something else which is causing this issue.
Let me know if you need anymore details. Thanks!

@vijayendra-tripathi vijayendra-tripathi changed the title Empty Signup on iOS simulator/device Empty Signup screen on iOS simulator/device Jun 18, 2019
@vijayendra-tripathi vijayendra-tripathi changed the title Empty Signup screen on iOS simulator/device Empty signup screen on iOS simulator/device Jun 18, 2019
@gorevoy
Copy link

gorevoy commented Jun 18, 2019

I also have same issue. It because getDetails/getSession not coming to the block:

[[self.user getDetails] continueWithBlock:^id _Nullable(AWSTask<AWSCognitoIdentityUserGetDetailsResponse *> * _Nonnull task) { // not coming here }];

I only see in log:

Warning: A long-running operation is being executed on the main thread.
Break on awsbf_warnBlockingOperationOnMainThread() to debug.

BTW, it depends on device. iPhone 8+ - works fine. Xr Phone & Xr Simulator - issue reproduces.

@rohandubal rohandubal added mobile client Issues related to AWSMobileClient bug Something isn't working labels Jun 18, 2019
@royjit
Copy link
Contributor

royjit commented Sep 26, 2019

I was able to reproduce this issue when I do not have AWSUserPoolsSignIn in my podfile. Could you please verify that this is what is happening for you as well?

Can you please share your podfile?

@royjit royjit added the pending-response Issue is pending response from the issue requestor label Sep 26, 2019
@vijayendra-tripathi
Copy link
Author

@royjit @rohandubal

Looks like things have changed in API since I last used it. AWS pods version were 2.9.9 back then and today when I checked Amplify docs, they are now 2.11.1. I updated pods and used latest code as recommended by them. But I still same error. However I get following warning on console -

Warning once only: UITableView was told to layout its visible cells and other contents without being in the view hierarchy (the table view or one of its superviews has not been added to a window). This may cause bugs by forcing views inside the table view to load and perform layout without accurate information (e.g. table view bounds, trait collection, layout margins, safe area insets, etc), and will also cause unnecessary performance overhead due to extra layout passes. Make a symbolic breakpoint at UITableViewAlertForLayoutOutsideViewHierarchy to catch this in the debugger and see what caused this to occur, so you can avoid this action altogether if possible, or defer it until the table view has been added to a window. Table view: <UITableView: 0x7fa2bf87e200; frame = (4 4; 271 142); clipsToBounds = YES; autoresize = RM+BM; gestureRecognizers = <NSArray: 0x600002f591a0>; layer = <CALayer: 0x6000021b4660>; contentOffset: {0, 0}; contentSize: {271, 0}; adjustedContentInset: {0, 0, 0, 0}; dataSource: (null)>
2019-10-06 18:39:07.270339+0530 logits-api-test[5982:95896] Task <5E70DBFE-D57E-4998-899F-FCEE368CE2EC>.<1> HTTP load failed, 0/0 bytes (error code: -999 [1:89])

I use following pods -
pod 'AWSUserPoolsSignIn', '> 2.11.0'
pod 'AWSAuthUI', '
> 2.11.0'
pod 'AWSMobileClient', '~> 2.11.0'

One more thing I noticed was that when I submit facebook token submission using following function -

AWSMobileClient.default().federatedSignIn(providerName: IdentityProvider.facebook.rawValue, token: "EAAF7......v8ZD") { (userState, error)  in
            if let error = error {
                print("Federated Sign In failed: \(error.localizedDescription)")
            }
            if let userState = userState {
                print("User state: \(userState)")
            }
        }

This prints userState as "SignedIn" but I don't see user being created in Cognito at AWS.

@palpatim palpatim removed the pending-response Issue is pending response from the issue requestor label Oct 15, 2019
@royjit
Copy link
Contributor

royjit commented Feb 7, 2020

Hi @vijayendra-tripathi

Sorry for the delayed response.
Were you able to fix the issue? I tried setting up myself and I had no problem in displaying the drop in UI.
I called the UI like this:

let signInOptions = SignInUIOptions(canCancel: true)
AWSMobileClient.default().showSignIn(navigationController: self.navigationController!,
                                             signInUIOptions: signInOptions,
                                             { (userState, error) in
                                                
        })

If you want to have a user created in UserPool when you federate via a social provider, you have to use the hostedUI from Cognito.

@stale
Copy link

stale bot commented Feb 14, 2020

This issue has been automatically closed because of inactivity. Please open a new issue if are still encountering problems.

@stale stale bot closed this as completed Feb 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working mobile client Issues related to AWSMobileClient
Projects
None yet
Development

No branches or pull requests

5 participants