Skip to content

Authenticated user commands such as fetchUserAttributes, fetchAuthSession, getCurrentUser hang without response #14490

@Dante-Capobianco

Description

@Dante-Capobianco

Before opening, please confirm:

Amplify APIs

Authentication

Amplify Version

v6

Amplify Categories

No response

Backend

None

Environment information

# Put output below this line


Describe the bug

When trying to call fetchAuthSession or user attributes or get current user in the frontend (to see if user exists before signing them in, nothing happens. It just hangs there with no message or network call & the console statements I put right after it do not hit (but the ones before do). I am using await & I have properly configured my Amplify because other commands like confirmsignup work (make the network call & return a response)

A simple example is the following:

console.log('hit1')
console.log(await fetchUserAttributes());
      console.log('hit2')

Expected behavior

Expect network call to be made then to get error because no user found to catch.

Reproduction steps

  1. Install aws amplify and aws-amplify-auth
  2. set up amplify using .configure
  3. make calls to these functions

Code Snippet

// Put your code below this line.

Log output

// Put your logs below this line


aws-exports.js

No response

Manual configuration

No response

Additional configuration

No response

Mobile Device

No response

Mobile Operating System

No response

Mobile Browser

No response

Mobile Browser Version

No response

Additional information and screenshots

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions