Skip to content

InvalidUserPoolConfigurationException #3106

@cypressApp

Description

@cypressApp

Hi,

Hope you are well.

I want to implement authentication in my android project. after initializing amplify and adding auth the the user pool was created in the my aws account. then add api and push
However, during sign up at first I get this error:

Could not initialize Amplify AmplifyException{message=Failed to read JSON from resource = 0, cause=com.amplifyframework.core.Resources$ResourceLoadingException: No such resource with ID = 0, recoverySuggestion=If you are attempting to load a custom configuration file, please ensure that it exists in your application project under app/src/main/res/raw/<YOUR_CUSTOM_CONFIG_FILE>.}

I found amplifyconfiguration.json in /src driectory and copy this to res/raw/ then I get this error:

InvalidUserPoolConfigurationException{message=The user pool configuration is missing or invalid., cause=null, recoverySuggestion=Please check the user pool configuration in your amplifyconfiguration.json file.}

amplifyconfiguration.json:

{ "aws_project_region": "eu-north-1", "aws_cognito_identity_pool_id": "xxxxxxxxx", "aws_cognito_region": "xxxxxx", "aws_user_pools_id": "xxxxxxx", "aws_user_pools_web_client_id": "xxxxxxxxxxxxx", "oauth": { "domain": "xxxxxxxxxxx", "scope": [ "phone", "email", "openid", "profile", "aws.cognito.signin.user.admin" ], "redirectSignIn": "xxxxc", "redirectSignOut": "xxxxx", "responseType": "code" }, "federationTarget": "COGNITO_USER_POOLS", "aws_cognito_username_attributes": [ "EMAIL" ], "aws_cognito_social_providers": [], "aws_cognito_signup_attributes": [ "EMAIL" ], "aws_cognito_mfa_configuration": "OFF", "aws_cognito_mfa_types": [ "SMS" ], "aws_cognito_password_protection_settings": { "passwordPolicyMinLength": 8, "passwordPolicyCharacters": [] }, "aws_cognito_verification_mechanisms": [ "EMAIL" ], "aws_appsync_graphqlEndpoint": "https:/xxxxxxxxx1.amazonaws.com/graphql", "aws_appsync_region": "xxxxx", "aws_appsync_authenticationType": "API_KEY", "aws_appsync_apiKey": "xxxxxx" }
the dependencies are:

`
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.0.4")
implementation("com.amplifyframework:aws-auth-cognito:2.29.2")

implementation("com.amplifyframework:core:2.29.2")
implementation("com.amplifyframework:aws-auth-cognito:2.29.2")

`

I also checked the user pool id and other parameters, there are all the same as what is created in aws accourt.

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions