-
Notifications
You must be signed in to change notification settings - Fork 372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Luis Bot -> Error: Response status code does not indicate success: 403 (Forbidden). #3299
Comments
@cxbuilders , so you started a local runtime by a deployed config. could you check the generated folder of your bot? We are using this pattern to load the luis config file: could you check the generated folder of your bot and your settings to see whether they match. |
@luhan2017 This is a vanilla bot in the latest version. I created the bot, enabled luis, ran the provisioncomposer.js script, filled in the settings in the appsettings and that's it. |
@cxbuilders , Oh, I know why this happen, in the deployment process, we are assigning the authored luis resource to the prediction luis service, which binds the endpointKey. So you should missed this part. You can try the following:
|
@luhan2017 Not completely clear. Are you saying I missed something or this is a bug? |
@cxbuilders I mean you missed the deployment step, you can't just do provision and use the settings to start a local bot, you missed a luis endpoint assignment process which is in the deployment process. |
@luhan2017 Yeah but the provisionComposer.js script is the deployment script, right? Which I did run as mentioned |
@cxbuilders
|
I am having a similar error. It was working fine a couple of days ago but now when trying to run the bot on local with Luis integration it is returning this strange error without any further help that which kind of authentication is failed. |
@mudasar , could you help paste your error message here? |
@luhan2017 I thought that was called Publishing.. Also how is this not a bug? |
@luhan2017 As I really needed this I dived more into the issue and found the following. When you start a bot in Composer and additional application is created in Luis with the (composer) in the name. This is also where the generated folder comes into play, only for the local usage of Luis. When I checked the (composer) app in Luis I noticed that the Prediction resource has the Authoring key. I am not sure if that was meant to be, but either of the following is true;
So to me this has nothing to do with Publishing, but goes wrong when starting the bot for local usage. Could you please mark this as a bug again? |
@cxbuilders sure, there is a logic in composer, if user don't add luis:endpointKey, we will take luis:authoringKey as the luis: endpointKey. Previously in composer, we auto generated the luis authoring and prediction endpoint by this pattern: https://${luis.region}.api.cognitive.microsoft.com which works fine for a while. But recently, there is a change in the luis side which update the naming pattern as this: Could you check in you luis portal to check the endpoint url of your prediction and authoring resource? If that is the new pattern (https://{your-resource-name}.api.cognitive.microsoft.com), that should be the problem and we have a PR to fix this. #3364 . Sorry for the confusing, please let me know if it works or not. |
No I have the https://westus.api.cognitive.microsoft.com/ url. Today I removed the resource group and created it all from scratch;
This is still the issue that the wrong key is used for the (composer) Luis model as I mentioned in the previous message. This is only happening locally, in Azure the bot runs fine. I have the feeling that we're running in circles here, if no-one just gives this a try to see if it replicates. |
I have got it fixed. I think the issue is with Composer when you change something in the settings (config) you have to some times restart the Composer and then restart the bot. The config changes are not reflected. |
@cxbuilders, I have tried your steps can't repro this error in my side. Could you share more information here? for your reproduce steps, did you update the local configuration after publishing the bot? what is your exact config of the local setting? For local setting, It currently has the authoringKey and endpointKey properties, if endpointKey is not used, we will use the authoring service for both authoring and prediction. I saw a screenshot at the beginning of this thread, you are using both authoringKey and endpointKey. If you have assigned an endpointKey(which comes from the luis prediction service) in the local setting to start a local bot, you should manually add the prediction resource to your luis app as the following. Could you double check on whether the endpointKey is associated with the luis app? It's weird that I can't paste any screenshot now, will add the screenshot later. |
@luhan2017 Whatever combination of steps I try, it always fails, whilst around 2 weeks ago I never had issues. Would it be possible to have a call about this, as that would be a whole lot simpler to show my side. |
@cxbuilders , sorry for the late response, sure, let's have a call on this. I am not sure how can we do this, what is your timezone? I am in Beijing. Please ping me when you are available. |
@luhan2017 I have sent you a mail (what I think is your mail) let me know if you received it. |
@cxbuilders , I didn't receive your email, did you send it to luhan@microsoft.com? |
So what was the solution at the end or was this a misconfiguration issue? |
I am facing the same issue and shared details with @alanlong9278 |
The solution shared by @DnlCYan worked for me as well |
When a new bot is created with Luis enabled, in the Emulator it throws an error:
Response status code does not indicate success: 403 (Forbidden).
Version
ffde16f
To Reproduce
Steps to reproduce the behavior:
1.Create new echo based bot
2. Switch to Luis and add trigger with intent and some utterances
3. Run provision script
4. Copy settings from script in Bot settings in Composer
5. Start Bot & Run emulator
6. Type something to see the error
4. See error
The text was updated successfully, but these errors were encountered: