Azure communications Web Calling issue - azure-communication-services

When i use the CallClient of #azure/communication-calling SDK to create a CallAgent, i'm getting 'No CommunicationTokenCredential provided' error even though i'm passing a valid CommunicationTokenCredential
Ex: this.callAgent = await this.callClient.createCallAgent(tokenCredential);
I'm able to successfully deploy a standalone react app & run the following sample application and make a web call as suggested in Microsoft docs. https://github.com/Azure-Samples/communication-services-web-calling-tutorial
But, when I integrate this into my existing React App, I start having issues in creating a CallAgent with the following error:
'azure:ACS:error 27/10/2021, 18:13:48:96 CallClient1:CallAgent1 op:Initialize failed, message=No CommunicationTokenCredential provided,'
I am passing the CommunicationTokenCredential properly while calling the createCallAgent(token) (verified by printing the token as well).
But still, I get this error. Has anyone else faced this issue?

Related

Error : No such host is Known in Asp.net Core Application while configuring Azure key vault

I am facing an issue while configuring Azure Key vault in Asp.net core Web API project .
Below is the code snippet as well as error for reference and I tried to find the root cause but no luck.
Error while Run() method execution.
Exception details
Please help me out in solving this issue .Thanks in advance.
It can be issue from .net end mostly ,in .NET Core 3.0.100 or 3.1. This seems to occur when running under the debugger in Visual Studio mostly and when long parallel calls are made and retrypolicy may help stop this from giving exception for sometime and tries again.
So Please try to Upgrade/Update the .NET Project SDK if any updates
available in Visual Studio.
Try running with command line
Also in the message of error you can see retry faild after 4 tries..
You can check ReloadInterval Property which is used in 3.0 and 3.1
builder.AddAzureKeyVault(
new Uri(Configuration["KeyVault:URI"]),
new DefaultAzureCredential(
new DefaultAzureCredentialOptions
{
ExcludeSharedTokenCacheCredential = true,
VisualStudioTenantId = Configuration["AzureAd:TenantId"]
}),
new AzureKeyVaultConfigurationOptions()
{
ReloadInterval = TimeSpan.FromMinutes(15)
}
);
You could try catching this exception and implementing a retry mechanism for your code if this exception is thrown so that it could try with retry time and delay required for next attempt.
Azure Key Vault throttling guidance | Microsoft Docs
SecretClientOptions options = new SecretClientOptions()
{
Retry =
{
Delay= TimeSpan.FromSeconds(2),
MaxDelay = TimeSpan.FromSeconds(16),
MaxRetries = 5,
Mode = RetryMode.Exponential
}
};
var client = new SecretClient(new Uri("https://keyVaultName.vault.azure.net"), new DefaultAzureCredential(),options);
//Retrieve Secret
secret = client.GetSecret(secretName);
Also see GitHub discussion
If still issue remains, it may be calling several times due to
network issue also.So please check the network , firewall and if there is any DNS issue for that endpoint.
Check URI if endpoint is incorrect or Managed Identity does not have
Data owner or Reader role.Please make sure that you have proper
permissions to access azure keyvault and give proper access
policies atleast get , list and create if needed .
Make sure to have one of the roles(RBAC) provided here to access the
keyvault .
References:
asp.net core - How to configure Azure KeyVault refresh interval
with the Azure.Security.KeyVault libraries - Stack Overflow
azure sdk .net issues(github)

Voximal with Google Streaming as STT

I installed latest voximal stack.
Calls are working.
I setup recognition to use Google Cloud Streaming for STT pasting the JSON credentials into browser, the credentials file created at /usr/share/voximal.
But when I try to test parrot.vxml with a call it fail to create the google_streaming resource and drop the call.
Any clues?
Please enable the logs (interpreter debug) and check the /var/log/voximal/debig.log...
You probably see in the root cause there.

IBM Watson Studio API suddenly started throwing an error when trying to upload a model

I'm using the latest ibm_watson_machine_learning SDK (python)
Until a few days/weeks ago my code was working fine but now I get an error when running
client.repository.store_model(model='./model.tar.gz', meta_props=model_metadata)
Here is some sample code:
https://github.com/IBMDecisionOptimization/oplrunonwml
Exception has occurred: IndexError
list index out of range
File "C:\Temp\oplrunonwml\oprunonwmlv2.py", line 126, in main
model_details = client.repository.store_model(model='./model.tar.gz', meta_props=model_metadata)
File "C:\Temp\oplrunonwml\oprunonwmlv2.py", line 215, in <module>
main(sys.argv[1:])
I get this error while using various different models (OPL/Cplex/Docplex) and they all fail with this error.
What's strange, is that the model is uploaded correctly in the Deployment Space and I can use it without problems in deployment/jobs on the UI or on other scripts.
The code was working fine without any changes a few weeks ago so I assume something's changed on the API side
Update:
I'm using a Cloud Lite account.
I'm also using the latest version of the SDK
client = APIClient(wml_credentials)
print(client.version) # 1.0.29
print(client.version_param) #2020-08-01
I deleted all my IBM services (ObjectStorage,WatsonStudio) and created new ones but I still get the same error.
I would suspect the WML v2 instances deployement.
*** With V2 plan, user need to use updated Python SDK (ibm-watson-machine-learning 1.0.38) ***
If you had a v1 iunstance before and according to your plan, it might have been keeping working withoutmirgation for a while.
May be you reached the end of this compatibility period.
Can you clarify your plan type?
See https://medium.com/#AlainChabrier/migrate-your-python-code-for-do-in-wml-v2-instances-710025796f7
Alain

Amplify gets an appClientId from nowhere and now can't update the stack

I'm developing an application using Amplify
Everything was doing fine, I have done some changes on my dev environment to include Social login, and it was working fine locally
Then when I tried to deploy using Amplify Console CD it was failing, after digging into it I found the solution here using a custom script for the amplify simplepush
Just to put this on context
After having everything working again, I was happy to push my changes to staging
So, I have changed my branch, checkout the staging environment and tried to push
And then I got stuck in an error raised saying that it can't find the AppClientID
Resource Name: XXXXXXXXXXX (AWS::Cognito::UserPoolClient)
Event Type: update
Reason: User pool client does not exist. (Service: AWSCognitoIdentityProviderService; Status Code: 400; Error Code: ResourceNotFoundException; Request ID: YYYYYYYYYYYYYYYYYY
URL: https://console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/xxxxxxxxxxx
The URL goes to a The page you are looking for does not exist. page
The client Id, true, it doesn't exist, and I have no idea why it is trying to update it
So I looked at both
amplify/#current-cloud-backend/amplify-meta.json
and
amplify/backend/amplify-meta.json
Both contain a line of code like this (on the auth->output section):
"AppClientID": "XXXXXXXXXX"
The #current-cloud-backend is supposed to come from the cloud, so I'm not supposed to touch it, but I have no idea how it did get that code, the dev appClient is not this code either.
So, I tried changing the code to (on the amplify/backend/amplify-meta.json file):
"AppClientID": "MY-VALID-ID"
and then pushing again
But the error continues, and then the amplify/backend/amplify-meta.json was updated with the wrong id again
Any idea what might be causing it and how to fix it?

Where do I find the Spotify auth.js script?

I'm trying to use Spotify's auth.authenticateWithFacebook API and am getting the following error in the console log:
Uncaught Error: Failed to read "sp://import/scripts/api/auth.js"
This occurs when the following is execute:
var auth = sp.require('sp://import/scripts/api/auth');
Is the auth module public yet?
I am trying this as a result of a response to "How do I connect my Spotify App to Facebook Connect?" where they suggest the use of the auth module.
I have downloaded the latest client preview with no difference.
thanks!
Download the preview version from this post.
This is a really old post, but in case anyone ends up here from a search engine or a related SO post, I'd just like to add that Facebook authentication has since been added to the API (version 1.x.). Please see this page for documentation around auth.