botframework-sdk: Error finding key for token - Skype Call
Bot Info
- SDK Platform: .NET
- SDK Version: 3.13.1
- Active Channels: Skype, Web chat
- Deployment Environment: Azure App Service
- App ID: 2ca2f4de-39c4-4d29-a812-01817f3f3092
Issue Description
The bot was working fine till yesterday. Message controller is working. The problem occurs when I try calling to the bot.
This is what I get in the output field when testing with ngrok:
iisexpress.exe Error: 0 : Error finding key for token. Available keys: e9d2Ej_yEdf2jCBDDJKVqsW-cXo, e9d2Ej_yEdf2jCBDDJKVqsW-cXo, oI2pysRK0KWZ9Jd0meQFJRHkyAE, oI2pysRK0KWZ9Jd0meQFJRHkyAE, b4ysOWItD13iQfLLeBFX9lRPDtk, b4ysOWItD13iQfLLeBFX9lRPDtk, QMrt9-4Jn43rldid1E-hByyRC_Q, QMrt9-4Jn43rldid1E-hByyRC_Q, GCxArXoN8Sqo7PweA7-z65denJQ, GCxArXoN8Sqo7PweA7-z65denJQ, M52DDXzhCd9LEhK6P6xszOFwApU, M52DDXzhCd9LEhK6P6xszOFwApU, jcZZmJ_oTfzxRl279RmddxC2rJI, jcZZmJ_oTfzxRl279RmddxC2rJI, YAJk7OgPGmt_qOu7DHj_E9cTb7s, YAJk7OgPGmt_qOu7DHj_E9cTb7s, WyM5Su8S01KUBTIgif5sIiDT_L8, WyM5Su8S01KUBTIgif5sIiDT_L8, MPL7UeVQQ_goYAnmVtQKBeh9jyc, MPL7UeVQQ_goYAnmVtQKBeh9jyc, yceHp93RzmN-kd8vCnKEulqI8Zo, yceHp93RzmN-kd8vCnKEulqI8Zo, E58u3c-zKB_0zQrLd9h6GyVr-ik, E58u3c-zKB_0zQrLd9h6GyVr-ik iisexpress.exe Warning: 0 : Invalid token. Microsoft.IdentityModel.Tokens.SecurityTokenSignatureKeyNotFoundException: IDX10501: Signature validation failed. Unable to match ‘kid’: ‘kAjFbciiCrTIdZ_LarP3k_Y28Tw’, token: ‘{ “alg”: “RS256”, “typ”: “JWT”, “kid”: “kAjFbciiCrTIdZ_LarP3k_Y28Tw”, “x5t”: “kAjFbciiCrTIdZ_LarP3k_Y28Tw” }.{ “iss”: “https://api.botframework.com”, “aud”: “2ca2f4de-39c4-4d29-a812-01817f3f3092”, “exp”: 1520414871, “nbf”: 1520414571 }’. at System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler.ValidateSignature(String token, TokenValidationParameters validationParameters) at System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler.ValidateToken(String token, TokenValidationParameters validationParameters, SecurityToken& validatedToken) at Microsoft.Bot.Connector.JwtTokenExtractor.<ValidateTokenAsync>d__15.MoveNext() — End of stack trace from previous location where exception was thrown — at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Bot.Connector.JwtTokenExtractor.<GetIdentityAsync>d__11.MoveNext()
When I am debugging using ngrok I getting the following message.
The App ID and password given is correct because the message controller works fine. But what I find weird is that Microsoft.Bot.Builder.Calling nuget package has a dependency System.IdentityModel.Tokens.Jwt (>= 4.0.4.403061554 && < 5.0.0) and Microsoft.Bot.Builder has dependency System.IdentityModel.Tokens.Jwt (>= 5.1.4) I installed the packages ignoring the dependencies. What can be going wrong?
This is my packages file
<packages>
<package id="Autofac" version="4.6.2" targetFramework="net46" />
<package id="Chronic.Signed" version="0.3.2" targetFramework="net46" />
<package id="EntityFramework" version="6.2.0" targetFramework="net46" />
<package id="Microsoft.AspNet.WebApi" version="5.2.4" targetFramework="net46" />
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.4" targetFramework="net46" />
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.4" targetFramework="net46" />
<package id="Microsoft.AspNet.WebApi.WebHost" version="5.2.4" targetFramework="net46" />
<package id="Microsoft.Azure.KeyVault.Core" version="2.0.4" targetFramework="net46" />
<package id="Microsoft.Bot.Builder" version="3.13.1" targetFramework="net46" />
<package id="Microsoft.Bot.Builder.Calling" version="3.13.1" targetFramework="net46" />
<package id="Microsoft.Bot.Connector" version="3.13.1" targetFramework="net46" />
<package id="Microsoft.IdentityModel.Logging" version="5.2.1" targetFramework="net46" />
<package id="Microsoft.IdentityModel.Protocol.Extensions" version="1.0.4.403061554" targetFramework="net46" />
<package id="Microsoft.IdentityModel.Protocols" version="5.2.1" targetFramework="net46" />
<package id="Microsoft.IdentityModel.Protocols.OpenIdConnect" version="5.2.1" targetFramework="net46" />
<package id="Microsoft.IdentityModel.Tokens" version="5.2.1" targetFramework="net46" />
<package id="Microsoft.Rest.ClientRuntime" version="2.3.10" targetFramework="net46" />
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="3.2.3" targetFramework="net46" />
<package id="Newtonsoft.Json" version="11.0.1" targetFramework="net46" />
<package id="System.IdentityModel.Tokens.Jwt" version="5.1.4" targetFramework="net46" />
<package id="WindowsAzure.Storage" version="9.1.0" targetFramework="net46" />
</packages>
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 2
- Comments: 16 (4 by maintainers)
@JasonSowers Its working for me now 😄 Is anyone still facing the issue?
I have the same problem, it worked until monday
I think I faced the same issue, too, tried for several hours.
And just like @taranais mentioned, I can assure it used to worked fine two days ago.