awslabs / amazon-kinesis-video-streams-webrtc-sdk-ios

iOS SDK for interfacing with the Amazon Kinesis Video Streams Signaling Service.
Apache License 2.0
64 stars 29 forks source link

Error to get channel endpoint: Error Domain=com.amazonaws.AWSCognitoIdentityErrorDomain Code=8 "(null)" #23

Closed pankeshpatel closed 3 years ago

pankeshpatel commented 3 years ago

Hi all,

I have followed the step, suggested on page WebRTC SDK for iOS. I have configured Cognito userpool and Cognito IdentiyPool as follows:

  1. "Enable access to unauthenticated identities" is checked under "Unauthenticated identities" in Identity Pool setting.
  2. Edited the Trust Relationship for unauth role in IAM to and retry (suggested here )
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "",
      "Effect": "Allow",
      "Principal": {
        "Federated": "cognito-identity.amazonaws.com"
      },
      "Action": "sts:AssumeRoleWithWebIdentity"
    }
  ]
}

However, I am getting the following error

Error to get channel endpoint: Error Domain=com.amazonaws.AWSCognitoIdentityErrorDomain Code=8 "(null)" UserInfo={__type=NotAuthorizedException, message=Identity pool - us-east-1:XXXX-XXX-XXX-XXX-XXXXX does not have identity providers configured.

MushMal commented 3 years ago

Unauthenticated access is not supported. We are looking at it but no definitive dates

pankeshpatel commented 3 years ago

Thanks @MushMal for the advice! I understand that the team has been working on this and the support has not been implemented yet. However, just for testing/demo, How can I temporarily address this issue.

Please advise!

MushMal commented 3 years ago

There is no straight forward way with unauthenticated users. Try to use auth

pankeshpatel commented 3 years ago

@MushMal Thanks for the advice!
I have been using as "authorized user" ?(meaning that authorized user login first (exists in AWS Cognito), then connect as master/viewer). Are you suggesting the same? and Are you suggesting make any changes in code?

MushMal commented 3 years ago

Sorry for the delay. I am not sure what you mean entirely. The instructions in the readme step-by-step configuration. We have not had any issues related to Cognito auth.

unicornss commented 3 years ago

@pankeshpatel

pankeshpatel commented 3 years ago

@unicornss : Thanks for the response.

I have not configured any Authentication Providers in Identity Pool. Do you want me to configured any authentication providers to resolve this error?

MushMal commented 3 years ago

@pankeshpatel there is a step-by-step instruction in the readme how to configure Cognito. Please follow those and if you have any issues with Cognito re-open this issue.

Please go ahead and resolve this

pankeshpatel commented 3 years ago

@MushMal : my Cognito configurations work perfectly. We have our own iOS app (which works perfectly) without having any configuration in Authentication Providers of Identity Pool. So, I do not think so that there is any issue in Authentication Providers configuration.

@MushMal: I have been still getting the same error, after following the readme guide. Please let me know if you have any question related to my Cognito Configuration.

MushMal commented 3 years ago

Not sure what could be the issue. The sample is tested in a specific scenario only. I would like others to chime in if they have any issues related to Cognito configuration. @unicornss @dswamina I am looking for some guidance in this case. If the issue is reproducible with stock application and the custom is following the instructions step-by-step then I am not sure what's wrong with Cognito.

unicornss commented 3 years ago

@MushMal Sure, will check if any thing has changed recently.

dswamina commented 3 years ago

Can you try using this documentation - https://docs.aws.amazon.com/kinesisvideostreams-webrtc-dg/latest/devguide/kvswebrtc-sdk-ios.html under the heading "Configure Amazon Cognito for the iOS WebRTC SDK".

Might be possibly related to this as well- https://github.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-ios/issues/24

hassanctech commented 3 years ago

@pankeshpatel did the suggestion from @dswamina work for you? If so, please go ahead and close this issue.