Amplify-ios: Exception while singing in

Created on 29 Jun 2020  路  4Comments  路  Source: aws-amplify/amplify-ios

Describe the bug
I'm getting an exception when trying to sign in using username and password.
The signIn function receives nil when retrieving the user from the user pool, which results in Thread 12: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) exception
In file AWSMobileClientExtensions.swift line 190

Here's the content of my awsconfiguration.json

{
    "UserAgent": "aws-amplify/cli",
    "Version": "0.1.0",
    "IdentityManager": {
        "Default": {}
    },
    "CognitoUserPool": {
        "Default": {
            "PoolId": "POOL_ID",
            "AppClientId": "CLIENT_ID",
            "AppClientSecret": "SECRET",
            "Region": "REGION"
        }
    },
    "Auth": {
        "Default": {}
    }
}
{
    "UserAgent": "aws-amplify-cli/2.0",
    "Version": "1.0",
    "auth": {
        "plugins": {
            "awsCognitoAuthPlugin": {
                "UserAgent": "aws-amplify/cli",
                "Version": "0.1.0",
                "IdentityManager": {
                    "Default": {}
                },
                "CognitoUserPool": {
                    "Default": {
                        "PoolId": "POOL_ID",
                        "AppClientId": "CLIENT_ID",
                        "AppClientSecret": "SECRET",
                        "Region": "REGION"
                    }
                },
                "Auth": {
                    "Default": {}
                }
            }
        }
    }
}

To Reproduce
Steps to reproduce the behavior:
Follow the steps in iOS Authentication guide - https://docs.amplify.aws/lib/auth/getting-started/q/platform/ios

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment(please complete the following information):

  • Amplify Framework Version: 1.0.2
  • Dependency Manager: CocoaPods
  • Swift Version: 5.2
  • Xcode Version: 11.5
  • Amplify CLI version: 4.22.0

Device Information (please complete the following information):

  • Device: Simulator

    • iOS Version: iOS 13.5

auth bug

All 4 comments

@AboulEinein We believe we've discovered the bug and are working on a fix now.

I have the same issue

We have released a new version which should fix the issue. Could you please try out the latest release 1.0.4 - https://github.com/aws-amplify/amplify-ios/releases/tag/v1.0.4

@royjit I just tested it and it's working. Thank you!

Was this page helpful?
0 / 5 - 0 ratings