BotBuilder-Samples icon indicating copy to clipboard operation
BotBuilder-Samples copied to clipboard

[csharp_dotnetcore][14.nlp-with-dispatch] msbot clone services does not work

Open plzm opened this issue 8 years ago • 5 comments

The README contains the following command to clone the bot: msbot clone services --name "" --luisAuthoringKey "" --folder "DeploymentScripts/MsbotClone" --location "ie, westus"

Ran into two problems with this.

  1. --location ""ie, westus" is incorrect - no ie region. Fixed by changing to --location "westus"

  2. The command does not seem to pick up the resource group name correctly. msbot help says the bot name is used for a resource group if no resource group name is specified. Command fails as follows whether I do not specify a resource group name, or whether I explicitly do.

My command with resource group name specified: msbot clone services --name "nlp-with-dispatch" --luisAuthoringKey "[HIDDEN]" --folder "DeploymentScripts/MsbotClone" --location "westus" --groupName "bot-nlp-with-dispatch" --verbose

This repeatably yields the following error. Yes, I have updated CLI, Powershell, etc. to latest of all. Note the "undefined" passed to the az commands by msbot.


The following services will be created by this operation: Service Location SKU Resource Group Azure App Site Plan westus S1 bot-nlp-with-disp… Azure AppInsights Service West US 2 F0 bot-nlp-with-disp… Azure Blob Storage Service westus Standard_LRS bot-nlp-with-disp… Azure Bot Service Registration Global bot-nlp-with-disp… Azure LUIS Cognitive Service westus S0 bot-nlp-with-disp… Azure LUIS Cognitive Service westus S0 bot-nlp-with-disp… Azure LUIS Cognitive Service westus S0 bot-nlp-with-disp… (Dispatch) Azure QnA Maker Service westus S0 bot-nlp-with-disp… Azure Search Service westus Standard bot-nlp-with-disp… Azure WebApp Service (Bot) westus bot-nlp-with-disp… Azure WebApp Service (QnA) westus bot-nlp-with-disp… Would you like to perform this operation? [y/n]y Checking az botservice version az -v Fetching subscription account az account show Creating resources in subscription: undefined undefined Creating Azure group [bot-nlp-with-dispatch] az group create -g bot-nlp-with-dispatch -l westus Creating Azure Bot Service [nlp-with-dispatch] az bot create -g undefined --name nlp-with-dispatch --kind webapp --location westus --insights-location "West US 2" --version v4 [az bot] To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code AKE8DTCD7 to authenticate.

[az bot] obtained msa app id and password. Provisioning bot now. (Please be patient, this may take several minutes) az bot create -g undefined --name nlp-with-dispatch --kind webapp --location westus --insights-location "West US 2" --version v4 exit code: 1 WARNING: The behavior of this command has been altered by the following extension: botservice WARNING: To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code AKE8DTCD7 to authenticate. WARNING: obtained msa app id and password. Provisioning bot now. ERROR: Resource group 'undefined' could not be found.

plzm avatar Oct 29 '18 12:10 plzm

  1. You are correct. The "ie, westus" was supposed to denote an example of what the --location argument should look like and should only contain the region itself (e.g. "westus", "australiaeast", "westeurope")

  1. Was not able to repro @plzm 's issue

Used following commands in C# sample 14. nlp-with-dispatch

With --groupName:

  • msbot clone services -n ashleyhogroupnamedelete --luisAuthoringKey b7xxxxxxxxxxxxxxxxxxxxxxxxxxxx67 -f DeploymentScripts/MsBotClone -l westus --subscriptionId xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --verbose --groupName ashleyhogroupnamed2

Without --groupName:

  • msbot clone services -n ashleyhodeletemeplease --luisAuthoringKey b7xxxxxxxxxxxxxxxxxxxxxxxxxxxx67 -f DeploymentScripts/MsBotClone -l westus --subscriptionId xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --verbose

Both created services and deployed to Azure portal successfully.


Note: was only able to get commands to work in windows Command Prompt & Windows PowerShell as the "az" commands in general don't work in git bash I noticed

Zerryth avatar Nov 02 '18 16:11 Zerryth

My own logs:

The following services will be created by this operation:
...
<SERVICES LISTED HERE>
...
Would you like to perform this operation? [y/n]y
Checking az botservice version
az -v
Fetching subscription account
az account show --subscription xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Creating resources in subscription: Bot Framework Support Team xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Creating Azure group [ashleyhogroupnamed2]
az group create -g ashleyhogroupnamed2 -l westus
Creating Azure Bot Service [ashleyhogroupnamedelete]
az bot create -g ashleyhogroupnamed2 --name ashleyhogroupnamedelete --kind webapp --location westus --insights-location "West US 2"  --version v4
[az bot] To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code F64NMWTVQ to authenticate.

[az bot] obtained msa app id and password. Provisioning bot now.
 (Please be patient, this may take several minutes)
Fetching bot extended information [ashleyhogroupnamedelete]
az bot show -g ashleyhogroupnamed2 -n ashleyhogroupnamedelete
...

Zerryth avatar Nov 02 '18 20:11 Zerryth

I am experiencing a similar issue in that the clone command ends with: You did not complete clone process.

  • Following the az -v command we see this message in red: operable program or batch file.ot recognized as an internal or external command,
  • Then a listing of all the options appears and the clone aborts
  • our msbot version is : 4.0.7

Our command is as follows: msbot clone services --name "botName" --luisAuthoringKey "XXXXXXXXXXXXXXX" --folder "DeploymentScripts/MsbotClone" --location "westus" --subscriptionId "XXXXXXXXXXXXXX"

amylepore avatar Nov 14 '18 21:11 amylepore

See https://github.com/Microsoft/botbuilder-tools/issues/768#issuecomment-444760635 for instructions on how to clone successfully

Zerryth avatar Dec 06 '18 16:12 Zerryth

I encountered the same issue, and I managed to find out that it's due to the default output format, which is set to "table", I need to reset it to "json" format, by running "az configure".

radezheng avatar Feb 18 '19 07:02 radezheng