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

[amplify_auth_cognito] type 'FetchAuthSessionFetching' is not a subtype of type 'FetchAuthSessionSuccess' in type cast #4635

Closed
2 of 14 tasks
hayashikun opened this issue Apr 2, 2024 · 3 comments
Assignees
Labels
auth Issues related to the Auth Category pending-close-response-required The issue will be closed if details necessary to reproduce the issue are not provided within 7 days. pending-response Issue is pending response from the issue requestor

Comments

@hayashikun
Copy link

Description

An error type 'FetchAuthSessionFetching' is not a subtype of type 'FetchAuthSessionSuccess' in type cast occurs after calling Amplify.Auth.fetchAuthSession().

This is the stacktrace reported to Sentry.
image

Categories

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

Steps to Reproduce

We have not been able to reproduce it, but it is occurring at our distribution environments.

Screenshots

No response

Platforms

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

Flutter Version

3.19.3

Amplify Flutter Version

1.7.0

Deployment Method

Custom Pipeline

Schema

No response

@Jordan-Nelson Jordan-Nelson added pending-triage This issue is in the backlog of issues to triage auth Issues related to the Auth Category labels Apr 2, 2024
@Jordan-Nelson
Copy link
Contributor

@hayashikun Thanks for taking the time to open the issue.

Amplify Auth uses a state machine internally to fetch/refresh the user's session. From the info provided, it seems that the state machine is expecting the state machine to eventually resolve to a success state (or throw and exception), but that is not happening. It is not immediately clear to me how this could occur. I have a few follow up questions to try narrow down the issue.

  • Is the stack trace that you provided the full stack trace? Do you have any additional logs?
  • Do you have any info as to what APIs are being called or what the end user is doing when this occurs?
  • Do you use the fetchAuthSession() API in your application? If so, do you use the forceRefresh option?
  • Do you use the federateToIdentityPool() API?
  • I see you specified this is happening on Windows. Can you confirm Windows is the OS running on the end user's device where this is occurring? Do your users use any other platforms? If so, which platforms are they using and is the issue occurring on those platforms?

@Jordan-Nelson Jordan-Nelson added Investigating and removed pending-triage This issue is in the backlog of issues to triage labels Apr 2, 2024
@Jordan-Nelson Jordan-Nelson self-assigned this Apr 2, 2024
@Jordan-Nelson
Copy link
Contributor

@hayashikun if you are still facing this issue can you please provide answers to the questions above? Thank you

@Jordan-Nelson Jordan-Nelson added pending-close-response-required The issue will be closed if details necessary to reproduce the issue are not provided within 7 days. pending-response Issue is pending response from the issue requestor labels Apr 30, 2024
@Jordan-Nelson
Copy link
Contributor

@hayashikun - I am going to close this out since we have not heard back. If you are still facing this issue please take a look at the questions above. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auth Issues related to the Auth Category pending-close-response-required The issue will be closed if details necessary to reproduce the issue are not provided within 7 days. pending-response Issue is pending response from the issue requestor
Projects
None yet
Development

No branches or pull requests

2 participants