ConnectorClient throws exception
var response = await connector.Conversations.SendToConversationAsync((Activity)newMessage); throws the following exceptions
Authorization for Microsoft App ID 3e12ac5b-144a-4910-96b2-c67782d6d9ab failed with status code Forbidden
Invalid token. System.IdentityModel.Tokens.SecurityTokenSignatureKeyNotFoundException: IDX10500: Signature validation failed. Unable to resolve SecurityKeyIdentifier: 'SecurityKeyIdentifier ( IsReadOnly = False, Count = 2, Clause[0] = X509ThumbprintKeyIdentifierClause(Hash = 0x3270BF5597004DF339A4E62224731B6BD82810A6), Clause[1] = System.IdentityModel.Tokens.NamedKeySecurityKeyIdentifierClause ) ', token: '{"typ":"JWT","alg":"RS256","x5t":"MnC_VZcATfM5pOYiJHMba9goEKY","kid":"MnC_VZcATfM5pOYiJHMba9goEKY"}.{"aud":"https://graph.microsoft.com","iss":"https://sts.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47/","iat":1468491953,"nbf":1468491953,"exp":1468495853,"appid":"3e12ac5b-144a-4910-96b2-c67782d6d9ab","appidacr":"1","idp":"https://sts.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47/","tid":"72f988bf-86f1-41af-91ab-2d7cd011db47","ver":"1.0"}'. at System.IdentityModel.Tokens.JwtSecurityTokenHandler.ValidateSignature(String token, TokenValidationParameters validationParameters) in c:\workspace\WilsonForDotNet45Release\src\System.IdentityModel.Tokens.Jwt\JwtSecurityTokenHandler.cs:line 943 at System.IdentityModel.Tokens.JwtSecurityTokenHandler.ValidateToken(String securityToken, TokenValidationParameters validationParameters, SecurityToken& validatedToken) in c:\workspace\WilsonForDotNet45Release\src\System.IdentityModel.Tokens.Jwt\JwtSecurityTokenHandler.cs:line 671 at Microsoft.Bot.Connector.JwtTokenExtractor.
d__9.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. d__6.MoveNext() 2016-07-14T10:30:56 PID[628632] Warning Invalid token. System.IdentityModel.Tokens.SecurityTokenSignatureKeyNotFoundException: IDX10500: Signature validation failed. Unable to resolve SecurityKeyIdentifier: 'SecurityKeyIdentifier ( IsReadOnly = False, Count = 2, Clause[0] = X509ThumbprintKeyIdentifierClause(Hash = 0x3270BF5597004DF339A4E62224731B6BD82810A6), Clause[1] = System.IdentityModel.Tokens.NamedKeySecurityKeyIdentifierClause ) ', token: '{"typ":"JWT","alg":"RS256","x5t":"MnC_VZcATfM5pOYiJHMba9goEKY","kid":"MnC_VZcATfM5pOYiJHMba9goEKY"}.{"aud":"https://graph.microsoft.com","iss":"https://sts.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47/","iat":1468491953,"nbf":1468491953,"exp":1468495853,"appid":"3e12ac5b-144a-4910-96b2-c67782d6d9ab","appidacr":"1","idp":"https://sts.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47/","tid":"72f988bf-86f1-41af-91ab-2d7cd011db47","ver":"1.0"}'. at System.IdentityModel.Tokens.JwtSecurityTokenHandler.ValidateSignature(String token, TokenValidationParameters validationParameters) in c:\workspace\WilsonForDotNet45Release\src\System.IdentityModel.Tokens.Jwt\JwtSecurityTokenHandler.cs:line 943 at System.IdentityModel.Tokens.JwtSecurityTokenHandler.ValidateToken(String securityToken, TokenValidationParameters validationParameters, SecurityToken& validatedToken) in c:\workspace\WilsonForDotNet45Release\src\System.IdentityModel.Tokens.Jwt\JwtSecurityTokenHandler.cs:line 671 at Microsoft.Bot.Connector.JwtTokenExtractor. d__9.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. d__6.MoveNext()
Yesterday everything worked fine and today the error appeared, I already triple checked that appId & password are correct. I also registered a completely new bot and validated the connection in the botframework portal.
We're seeing this on a few different bots -- I'm investigating.
Hi @RaffaelHold, are you seeing this error against the emulator, or one of the channels? If it's a channel, which channel are you seeing the error with?
Im seeing it against the emulator and skype. It happens every request so if you have ideas I can easily try them out.
I dont have the repo accessible right now, but i can try additional channels tomorrow
@RaffaelHold can you email us at [email protected]. I want you to help us diagnosing this issue by creating a minidump with heap from this error case and share it with us. Since minidumps are large, probably it makes sense to email us first and I give you a share to copy the minidump in.
@msft-shahins How's a minidump going to help you here?
I am also experiencing this issue, however it does not seem to be blocking my emulator testing. Looks like the exception is being handled by this.
Also is this related?
@suprak we haven't seen a repro of this locally and minidump will help us debugging how this problem might happen.
@msft-shahins did you see my emails? I uploaded another dump
@RaffaelHold thanks for sending the dump. We are trying to figure out the issue using the dump you provided.
How was this issue solved?