Skip to content

Incorrect functionality when device is offline, user is signed-in and application is launched #203

Closed
@pmellaaho

Description

@pmellaaho

Before creating a new issue, please confirm:

Which UI component?

Authenticator

Gradle script dependencies

// Put output below this line
authenticatorVersion = "1.3.0"

Environment information

# Put output below this line
Gradle 8.9

Please include any relevant guides or documentation you're referencing

No response

Describe the bug

When steps described below are followed, only ambigious "Sorry, something went wrong" -message is shown to the user by Amplify-UI i.e. the Application does not get to show any content at all. Furthermore, the only way to recover from this state is to set the device back online and then killing the app and launching it again.

With AndroidLoggingPlugin enabled I can see the following exception in Logcat:
InvalidUserPoolConfigurationException, which seems incorrect.

Reproduction steps (if applicable)

  1. Sign-in to the App
  2. Set device offline
  3. Kill the App
  4. Wait for access token to expire
  5. Launch the App

Code Snippet

// Put your code below this line.

Log output

// Put your logs below this line
RefreshUserPoolTokens Sending event ThrowError
Auth State Change: Configured(authNState=SignedIn(signedInData=SignedInData(userId=<userId>, username=<username>, signedInDate=Thu Nov 28 07:56:43 GMT+02:00 2024, signInMethod=ApiBased(authType=USER_SRP_AUTH), cognitoUserPoolTokens=CognitoUserPoolTokens(idToken = eyJra***, accessToken = eyJra***, refreshToken = eyJjd***)), deviceMetadata=com.amplifyframework.statemachine.codegen.data.DeviceMetadata$Empty@d223312), authZState=Error(exception=SessionError(exception=aws.smithy.kotlin.runtime.http.HttpException: java.net.UnknownHostException: Unable to resolve host "cognito-idp.eu-central-1.amazonaws.com": No address associated with hostname, amplifyCredential=UserPool(signedInData=SignedInData(userId=<userId>, username=<username>, signedInDate=Thu Nov 28 07:56:43 GMT+02:00 2024, signInMethod=ApiBased(authType=USER_SRP_AUTH), cognitoUserPoolTokens=CognitoUserPoolTokens(idToken = eyJra***, accessToken = eyJra***, refreshToken = eyJjd***))))))
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

No response

Additional information and screenshots

No response

Metadata

Metadata

Assignees

Labels

authenticatorThis issue relates to the Authenticator componentbugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions