Skip to content

Not able to call fromCognitoIdentityPool on iOS (browser) #531

Closed
@raRaRa

Description

Describe the bug

I just noticed that Chrome on iOS devices fails when calling fromCognitoIdentityPool. But it works on my desktop machine just fine with Chrome and Safari.

Example code:

    this.cachedCredentials = await fromCognitoIdentityPool({
      // Required. The unique identifier for the identity pool from which an identity should be
      // retrieved or generated.
      identityPoolId: this.options.IdentityPoolId,
      clientConfig: { region: this.options.Region },
    })();

The error I get:

DEBUG endpoints Resolving endpoint from template: {
  "url": "https://cognito-identity.{Region}.{PartitionResult#dnsSuffix}",
  "properties": {},
  "headers": {}
}

ERROR[object Object]

I believe the error is related to TypeError: JSON.stringify cannot serialize cyclic structures

Expected Behavior

I expect it to run through the last step where it errors out, which should resolve to:

endpoints Resolved endpoint: {
  "headers": {},
  "properties": {},
  "url": "https://cognito-identity.eu-west-1.amazonaws.com/"
}

Current Behavior

Currently it errors on

DEBUG endpoints Resolving endpoint from template: {
  "url": "https://cognito-identity.{Region}.{PartitionResult#dnsSuffix}",
  "properties": {},
  "headers": {}
}

Reproduction Steps

Just run fromCognitoIdentityPool from Chrome in iOS

Possible Solution

No response

Additional Information/Context

@aws-sdk/credential-providers is on version 3.664.0

SDK version used

1.21.1

Environment details (OS name and version, etc.)

iPhone 13 Pro, Google Chrome

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.closing-soonThis issue will automatically close in 5 days unless further comments are made.third-partyThis issue is related to third-party libraries or applications.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions