Skip to content

signOut CognitoSignOutResult different behavior on iOS and Android #5402

Open
@lokalathlet

Description

@lokalathlet

Description

The "signedOutLocally" result in airplane Mode is different on iOS (false) and Android (true).
My expectation is, that I can signOut successful on both environments -> "signedOutLocally": true

See the logs for iOS and Android:
iOS:
`┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────

    │ [debug] | 13:12:12 481ms | ::signOut result: CognitoSignOutResult {

    │   "exception": "NetworkException {\n  \"message\": \"The request failed due to a network error.\",\n  \"recoverySuggestion\": \"Ensure that you have an active network connection\",\n  \"underlyingException\": \"POST https://cognito-idp.eu-central-1.amazonaws.com/? failed: SocketException: Failed host lookup: 'cognito-idp.eu-central-1.amazonaws.com' (OS Error: nodename nor servname provided, or not known, errno = 8)\"\n}",

    │   "signedOutLocally": false

    │ }

    └──────────────────────────────────────────────────────────────────────────────────────────────────────────────

Android:
┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────

I/flutter ( 4454): │ [debug] | 13:30:42 760ms | ::signOut result: CognitoSignOutResult {

I/flutter ( 4454): │ "hostedUiException": "HostedUiException {\n "message": "Failed to perform Hosted UI sign out",\n "recoverySuggestion": "See underlyingException for more details",\n "underlyingException": "PlatformException(CANCELLED, com.amazonaws.amplify.amplify_auth_cognito.HostedUiException$CANCELLED, Cause: null, Stacktrace: com.amazonaws.amplify.amplify_auth_cognito.HostedUiException$CANCELLED\n\tat com.amazonaws.amplify.amplify_auth_cognito.AmplifyAuthCognitoPlugin.cancelCurrentOperation(AmplifyAuthCognitoPlugin.kt:587)\n\tat com.amazonaws.amplify.amplify_auth_cognito.AmplifyAuthCognitoPlugin.onNewIntent(AmplifyAuthCognitoPlugin.kt:542)\n\tat io.flutter.embedding.engine.FlutterEngineConnectionRegistry$FlutterEngineActivityPluginBinding.onNewIntent(FlutterEngineConnectionRegistry.java:799)\n\tat io.flutter.embedding.engine.FlutterEngineConnectionRegistry.onNewIntent(FlutterEngineConnectionRegistry.java:437)\n\tat io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.on

I/flutter ( 4454): │ "globalSignOutException": null,

I/flutter ( 4454): │ "revokeTokenException": "RevokeTokenException {\n "message": "Failed to revoke token",\n "recoverySuggestion": "See underlyingException for more details",\n "underlyingException": "NetworkException {\n \"message\": \"The request failed due to a network error.\",\n \"recoverySuggestion\": \"Ensure that you have an active network connection\",\n \"underlyingException\": \"POST https://cognito-idp.eu-central-1.amazonaws.com/? failed: SocketException: Failed host lookup: 'cognito-idp.eu-central-1.amazonaws.com' (OS Error: No address associated with hostname, errno = 7)\"\n}"\n}",

I/flutter ( 4454): │ "signedOutLocally": true

I/flutter ( 4454): │ }

I/flutter ( 4454): └──────────────────────────────────────────────────────────────────────────────────────────────────────────────
`

Categories

  • Analytics
  • API (REST)
  • API (GraphQL)
  • Auth
  • Authenticator
  • DataStore
  • Notifications (Push)
  • Storage

Steps to Reproduce

  1. SignIn successfully
  2. AirPlane Mode on
  3. SignOut

Screenshots

No response

Platforms

  • iOS
  • Android
  • Web
  • macOS
  • Windows
  • Linux

Flutter Version

3.24.0

Amplify Flutter Version

2.3.0

Deployment Method

Amplify Gen 2

Schema

No response

Metadata

Metadata

Assignees

Labels

authIssues related to the Auth CategorybugSomething is not working; the issue has reproducible steps and has been reproduced

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions