-
Notifications
You must be signed in to change notification settings - Fork 200
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
AWS Cognito Identity Pool is not configured #3459
Comments
Hi @Krishna-Dockare, thanks for opening this issue. I was not able to reproduce it using the code snippet you provided, the session was returned successfully and there's no errors when printed. The "CredentialsProvider": {
"CognitoIdentity": {
"Default": {
"PoolId": "[YOUR_IDENTITY_POOL_ID]",
"Region": "[YOUR_REGION]"
}
}
}, If the file looks ok, could you please enable verbose logging and share the logs that are printed when you call You can enable verbose logging by doing this before calling Amplify.Logging.logLevel = .verbose Thanks! |
In amplifyconfiguration.json, CredentialProvider is not available. {
"UserAgent": "aws-amplify-cli/2.0",
"Version": "1.0",
"api": {
"plugins": {
"awsAPIPlugin": {
"dockareappchat": {
"endpointType": "GraphQL",
"endpoint": "https://*************.amazonaws.com/graphql",
"region": "******",
"authorizationType": "AMAZON_COGNITO_USER_POOLS"
}
}
}
},
"auth": {
"plugins": {
"awsCognitoAuthPlugin": {
"UserAgent": "aws-amplify/cli",
"Version": "0.1.0",
"IdentityManager": {
"Default": {}
},
"AppSync": {
"Default": {
"ApiUrl": "https://***************.amazonaws.com/graphql",
"Region": "********",
"AuthMode": "AMAZON_COGNITO_USER_POOLS",
"ClientDatabasePrefix": "*********_AMAZON_COGNITO_USER_POOLS"
}
},
"CognitoUserPool": {
"Default": {
"PoolId": "*********",
"AppClientId": "***********",
"Region": "******"
}
},
"Auth": {
"Default": {
"authenticationFlowType": "USER_SRP_AUTH",
"mfaConfiguration": "OFF",
"mfaTypes": [
"SMS"
],
"passwordProtectionSettings": {
"passwordPolicyMinLength": "***",
"passwordPolicyCharacters": []
},
"signupAttributes": [],
"socialProviders": [],
"usernameAttributes": [],
"verificationMechanisms": [
"PHONE_NUMBER"
]
}
}
}
}
}
} and this is the verbose log for Amplify.Auth.fetchSession:
The issue is happening all of a sudden as we have not altered any amplify code, it was working fine early. |
@Krishna-Dockare You need to have the You can try doing |
@ruisebas , I have done |
@Krishna-Dockare Would you be able to share your amplify configuration which has the credentials provider info. Your config should have something like:
Also just to make sure, |
@harsh62 , I have already shared amplify configuration in this reply: |
If the configuration doesn't have the credentials provider, unfortunately getting identity id and AWSCredentials won't work. |
In production environment also we are not having the CredentialsProvider but it is working fine there. But in dev environment I am unable to query/observe query from Amplify |
Would you be able to share the following in details?
This way I can compare what is the difference in the configuration and how it is working. Would you be able to share how you are managing multiple environments using Amplify? Since this is something that is officially not supported but I want to know how its being managed. |
@harsh62
|
@Krishna-Dockare I see that both dev and prod returns the same result for Authorization. i.e. Would you be able to share code snippets around the observe query and how you are switching between environments i.e. how you are providing dev and prod configs to Amplify? |
@harsh62 I am changing the environments using terminal command here is the snippet of code for observe query:
|
@Krishna-Dockare When you switch between environments, and if you are using a simulator to test, could you please reset the simulator and then run the application? From what I see is that after switching between environments, the DataStore pugin is not in an ideal state to run |
@harsh62 The issue is happening even on devices not just simulators. So, I don't think resetting the simulator will help. |
Hi @Krishna-Dockare, here's some additional debugging context related to |
Hi @lawmicha , We are getting this error : We have a scenario where users will be added to multiple participant groups(channels) and the users will be subscribing to the group and observing the changes. Will there be any limit for the number of channels that a user can subscribe to and may I what could be the reason that is causing the above mentioned error. When the cognito user created newly, the issue is not there. |
Hi @lawmicha
and this error:
|
Hi @Krishna-Dockare, there seems to be a lot going on. Could you open a new issue for each problem you are facing? For example, For |
Also is the error coming from Android DataStore? I can see the message "DataStore subscriptionProcessor failed to start." thrown here: https://github.com/aws-amplify/amplify-android/blob/956ba11edd7f906e2ada953ec04a1a182ca3df29/aws-datastore/src/main/java/com/amplifyframework/datastore/syncengine/Orchestrator.java#L345 You can open an issue over in the Android repo over at https://github.com/aws-amplify/amplify-android/issues/new?assignees=&labels=&projects=&template=1.bug_report.yaml |
Please create a new issue with relevant details if you want our team to look into it. |
This issue is now closed. Comments on closed issues are hard for our team to see. |
Describe the bug
when I am trying to Fetch the Amplify auth session as per the following code:
and when I tried to print the session. I am getting following error:
I can see the cognitoTokens are available but it gives credentials error and identityIdError
Steps To Reproduce
Expected behavior
It should give the user Identity Id and not the errors.
Amplify Framework Version
2.25.2
Amplify Categories
Auth
Dependency manager
Swift PM
Swift version
5
CLI version
12.4.0
Xcode version
15.0.1
Relevant log output
Is this a regression?
No
Regression additional context
No response
Platforms
iOS
OS Version
17.1.1
Device
iPhone xr
Specific to simulators
No
Additional context
The issue is happening only in Dev environment, Production environment is working fine.
The text was updated successfully, but these errors were encountered: