BotFramework-Composer
BotFramework-Composer copied to clipboard
Failed to bind LUIS prediction resource when publishing bot from composer desktop 2.0
Describe the bug
After creating a new publish profile with new resources, then publish the bot from Composer desktop 2.0, the publish fails with the error fail to bind LUIS prediction resource to LUIS applications.
Version
Browser
No browser, just composer desktop 2.0.
- [x ] Electron distribution
- [ ] Chrome
- [ ] Safari
- [ ] Firefox
- [ ] Edge
OS
- [ ] macOS
- [x ] Windows
- [ ] Ubuntu
To Reproduce
Steps to reproduce the behavior:
- Have a bot with LUIS built in Composer 2.0 desktop.
- Choose to publish it on new resources.
- Create a new publish profile with new resources and wait for the provision step to finish.
- Go to publish and choose the publish profile created earlier.
- Press Publish and wait for a few seconds
Actual result: the publish fails with this error
NOTE: this node "luisResource": "luis prediction resource here" is correctly populated in the publishing profile.
Expected behavior
The expected result should be: the publish should be successful.
Screenshots
Additional context
If the user manually binds the prediction resources in the LUIS.ai portal, the error still happens.
FYI custsomers are hitting this and LUIS requested that we promote handling of this. (more info coming).
In essence: Composer isn’t assigning the prediction keys to the LUIS apps so it ends up being unable to call the LUIS apps.
Thanks @scheyal
Working with @natalgar; we could not reproduce the issue.
Looking into who should be a suitable owner to look into this.
Hi folks, When adding a prediction key to Composer, even during development, I will populate both the authoring and endpoint keys appropriately in the advanced settings.
See below
Having an endpoint key means you won't run out of quota by using the authoring key for endpoint requests. When this happens, you get 403s constantly. By providing the endpoint key we expect the prediction resource should be assigned to that application.
When checking the LUIS portal, no prediction resource is assigned.
@srinaath , @dmvtech - please see @hazemelh details. Looks like a bug (with a delayed repro b/c first you have to reach the quota to hit the condition).
@benbrown can you please chime in on this one. I know that we worked through much of this when we were working on the LUIS provisioning and publishing. I can connect with the customer to see the setup if needed.
Composer does NOT currently bind the endpoint key to the LUIS apps when starting the bot locally. So if you specify the endpoint key in the advanced settings, you must manually bind the same key via the LUIS portal.
However, during the PUBLISH, it definitely should do that binding. In the publishing profile, are both the endpoint and authoring key specified?
yes, both authoring and prediction keys were specified when I repro-ed this.
Status update. We are investigating internally and will update when we have more findings.
I am having this issue as well- reproduced on behalf of a customer. Thanks for update @dmvtech
Another customer raised a support case where he faces the issue. Today in my bot, I was not able to repro, but the customer was. The log he shared is:
"Accepted for publishing..."
"Abs settings incomplete, skip linking bot with webapp ..."
"appPasswordHint incomplete, return ..."
"Building the bot app..."
"Build succeeded!"
"start publish luis"
"Assigning to luis app id: 06a7b182-8966-4528-b72a-46760ba91c84"
"Assigning to luis app id: a51afb52-80ac-4179-be61-fcd81bb9e00c"
"{\n "stack": "Error: Request failed with status code 400\n at createError (C:\\Users\\gec\\AppData\\Local\\Programs\\Bot Framework Composer\\resources\\app.asar.unpacked\\extensions\\azurePublish\\dist\\extension.js:102540:17)\n at settle (C:\\Users\\gec\\AppData\\Local\\Programs\\Bot Framework Composer\\resources\\app.asar.unpacked\\extensions\\azurePublish\\dist\\extension.js:102554:14)\n at IncomingMessage.handleStreamEnd (C:\\Users\\gec\\AppData\\Local\\Programs\\Bot Framework Composer\\resources\\app.asar.unpacked\\extensions\\azurePublish\\dist\\extension.js:103498:13)\n at IncomingMessage.emit (events.js:215:7)\n at endReadableNT (_stream_readable.js:1183:12)\n at processTicksAndRejections (internal/process/task_queues.js:80:21)",\n "message": "Request failed with status code 400",\n "config": {}\n}"
"{"stack":"Error: Failed to bind luis prediction resource to luis applications. Please check if your luisResource is set to luis prediction service name in your publish profile.\n at publishLuisToPrediction (C:\\Users\\gec\\AppData\\Local\\Programs\\Bot Framework Composer\\resources\\app.asar.unpacked\\extensions\\azurePublish\\dist\\extension.js:269227:17)","message":"Failed to bind luis prediction resource to luis applications. Please check if your luisResource is set to luis prediction service name in your publish profile."}"
"Error - Failed to bind luis prediction resource to luis applications. Please check if your luisResource is set to luis prediction service name in your publish profile."
The strange fact for him: when we checked the LUIS portal, the prediction resource was assigned to the LUIS app, but compo was throwing error and the publish of the bot did not happen.
Needless to say, the publish profile contained all the nodes (inluding luisResource) with the correct values.
And last week, the same user managed to publish another bot from the same machine.
Is there a current workaround for getting your bot published here?
As of today we are hitting this same exact issue. Last week deploying worked with out issues. No changes to the our local or cloud environments. Composer 2.1.1 in use. This is quite a major letdown as this effectively blocks our ability to do client releases.
The actions Composer takes internally during publishing can be seen in this deployment pipeline sample...
https://github.com/gabog/ComposerCICDSamples/blob/main/build/yaml/templates/buildAndDeployModels.yaml
From the ci/cd instructions page here
You may consider publishing directly using steps like these rather than the built-in publishing system.
@benbrown Thanks! We have been looking into this already a bit so this might now be the time to push it through. If for nothing else more information on the failing bits always helps.
@mhtmht are you a part of multiple Azure tenants? One possible source of this error is if the key you using is owned by a different tenant than supplied during the API call...
@dmvtech Sorry, I also faced the same issue, did we found the root cause or any plan to fix it?
@mhtmht are you a part of multiple Azure tenants? One possible source of this error is if the key you using is owned by a different tenant than supplied during the API call...
Yes actually I am. Weirdly this was not a problem with any of the other environments under the same multi tenant setup.
But just to report back on the issues we were having. All the problems have magically disappeared during the time away the component in question. No deployment issue anymore. Also why things now work and didn’t a week ago is shrouded in mystery. No changes to the setup or method of deployment.
For me it started working after I started and stopped the bot in Composer before publishing it.