botframework-sdk: Operation returned an invalid status code 'Gone'
Bot Info
- Bot Framework SDK Version: 4.3.2
- SDK Platform: .NET Core 2.2
- Active Channels: Skype Webchat
- Deployment Environment: Azure App Service (West US)
I am facing the below issue after deploying the bot. The bot is working fine in the local emulator, but facing issue in skype and webchat (Haven’t tested in Facebook).
Code
` LuisApplication luisApplication = new LuisApplication(
_configuration["luisAppId"],
_configuration["LuisAPIKey"],
"https://" + _configuration["LuisAPIHostName"]); ;
var recognizer = new LuisRecognizer(luisApplication);
// Issue is with this line.
RecognizerResult recognizerResult = await recognizer.RecognizeAsync(turnContext,
cancellationToken);`
Error Message
Operation returned an invalid status code ‘Gone’
Exception
Microsoft.Azure.CognitiveServices.Language.LUIS.Runtime.Models.APIErrorException: Operation returned an invalid status code ‘Gone’ at Microsoft.Azure.CognitiveServices.Language.LUIS.Runtime.Prediction.ResolveWithHttpMessagesAsync(String appId, String query, Nullable1 timezoneOffset, Nullable1 verbose, Nullable1 staging, Nullable1 spellCheck, String bingSpellCheckSubscriptionKey, Nullable1 log, Dictionary2 customHeaders, CancellationToken cancellationToken) at Microsoft.Azure.CognitiveServices.Language.LUIS.Runtime.PredictionExtensions.ResolveAsync(IPrediction operations, String appId, String query, Nullable1 timezoneOffset, Nullable1 verbose, Nullable1 staging, Nullable1 spellCheck, String bingSpellCheckSubscriptionKey, Nullable`1 log, CancellationToken cancellationToken) at Microsoft.Bot.Builder.AI.Luis.LuisRecognizer.RecognizeInternalAsync(ITurnContext turnContext, CancellationToken cancellationToken) at Microsoft.Bot.Builder.AI.Luis.LuisRecognizer.RecognizeAsync(ITurnContext turnContext, CancellationToken cancellationToken) at Airlines.Dialogs.AirlinesRootDialog.GetLuisConfigNameAsync(ITurnContext turnContext, CancellationToken cancellationToken) in C:\XXXX\Bots\XXXXXX-src\Dialogs\XXXRootDialog.cs:line 179 at Airlines.Dialogs.AirlinesRootDialog.OnTurnAsync(ITurnContext turnContext, CancellationToken cancellationToken) in C:\XXXX\Bots\XXXXXX-src\Dialogs\XXXRootDialog.cs:line:line 69 at Microsoft.Bot.Builder.MiddlewareSet.ReceiveActivityWithStatusAsync(ITurnContext turnContext, BotCallbackHandler callback, CancellationToken cancellationToken) at Microsoft.Bot.Builder.BotAdapter.RunPipelineAsync(ITurnContext turnContext, BotCallbackHandler callback, CancellationToken cancellationToken)
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 22
Dileep, one reason this error happens is if the LUIS model hasn’t yet been published yet. The ‘Gone’ is some kind of an indication that the resource being called is not present.
I see! Let me see if I can repro this for you.
Try a raw query from your browser to match what your code is attempting to call… Something like this:
https://westus.api.cognitive.microsoft.com/luis/v2.0/apps/01234567-89ab-cdef-0123-4567890abdef?subscription-key=fedcba0987654321fedcba0987654321&q='hello'
It should give a legit looking result like:
@mprabhu11, I have published LUIS app. if it’s not published means how is it working in bot emulator or accessing through API? It has to show same issue in debugging too But that’s not the case. Facing issue once I deployed it.