BotFramework-Composer icon indicating copy to clipboard operation
BotFramework-Composer copied to clipboard

Publish fails with Failed to parse azure account information object object

Open JohnRobertGreen opened this issue 5 years ago • 3 comments

Describe the bug

When I try to publish my bot I get the following error: 400 - {"error":{"code":"BadArgument","message":"Failed to parse azure account information object object."}}

This worked on 3rd March 2021 and did not work on 4th March 2021. Between the last successful publish and the first failed publish I made significant changes to dialogs and added a new cognitive service (text analytics) to the resource group, but no changes to the LUIS resources, keys etc.

The bot runs in composer and using the emulator.

I can see that LUIS is updated (e.g. with a new intent). Weirdly in LUIS there is no prediction resource and in the LUIS notifications panel is a notification saying "A server error occurred. Please refresh the page and try again.". See screenshots.

LUIS

Version

Using Composer 1.2.1

(because I could not publish in 1.3 due to the personal account issue.)

Browser

Chrome latest

OS

Windows 10 latest

To Reproduce

Steps to reproduce the behavior:

Use az account get-access-token to get the access token. Insert this into the publish profile and save. Choose Publish to selected profile to initiate publish.

Expected behavior

Publish bot to Azure web app.

Screenshots

Last part of the publish Log

{
  "status": "DEPLOY_INFO",
  "message": "Writing to C:\\Users\\jgreen\\AppData\\Roaming\\BotFrameworkComposer\\publishBots\\de***3e\\azurewebapp\\ComposerDialogs\\generated\\luis.settings.dev.[object Object].json\n"
}
{
  "status": "DEPLOY_INFO",
  "message": "lubuild succeed"
}
{
  "status": "DEPLOY_INFO",
  "message": "start publish luis"
}
{
  "status": "DEPLOY_INFO",
  "message": "Assigning to luis app id: 39***2e"
}
{
  "status": "DEPLOY_ERROR",
  "message": "{\"name\":\"StatusCodeError\",\"statusCode\":400,\"message\":\"400 - {\\\"error\\\":{\\\"code\\\":\\\"BadArgument\\\",\\\"message\\\":\\\"Failed to parse azure account information object object.\\\"}}\",\"error\":{\"error\":{\"message\":\"Failed to parse azure account information object object.\"}},\"options\":{},\"response\":{\"statusCode\":400},\"stack\":\"StatusCodeError: 400 - {\\\"error\\\":{\\\"code\\\":\\\"BadArgument\\\",\\\"message\\\":\\\"Failed to parse azure account information object object.\\\"}}\\n    at new r (D:\\\\Program Files\\\\Microsoft Composer\\\\Bot Framework Composer\\\\resources\\\\app.asar.unpacked\\\\extensions\\\\azurePublish\\\\lib\\\\index.js:2:3724051)\\n    at q.callback (D:\\\\Program Files\\\\Microsoft Composer\\\\Bot Framework Composer\\\\resources\\\\app.asar.unpacked\\\\extensions\\\\azurePublish\\\\lib\\\\index.js:2:3726040)\\n    at q.e.callback.t.callback [as _callback] (D:\\\\Program Files\\\\Microsoft Composer\\\\Bot Framework Composer\\\\resources\\\\app.asar.unpacked\\\\extensions\\\\azurePublish\\\\lib\\\\index.js:2:3725088)\\n    at q.t._callback.t.callback.t.callback (D:\\\\Program Files\\\\Microsoft Composer\\\\Bot Framework Composer\\\\resources\\\\app.asar.unpacked\\\\extensions\\\\azurePublish\\\\lib\\\\index.js:2:3755134)\\n    at q.emit (events.js:210:5)\\n    at q.<anonymous> (D:\\\\Program Files\\\\Microsoft Composer\\\\Bot Framework Composer\\\\resources\\\\app.asar.unpacked\\\\extensions\\\\azurePublish\\\\lib\\\\index.js:2:3767714)\\n    at q.emit (events.js:210:5)\\n    at IncomingMessage.<anonymous> (D:\\\\Program Files\\\\Microsoft Composer\\\\Bot Framework Composer\\\\resources\\\\app.asar.unpacked\\\\extensions\\\\azurePublish\\\\lib\\\\index.js:2:3766546)\\n    at Object.onceWrapper (events.js:299:28)\\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)\"}"
}
400 - {"error":{"code":"BadArgument","message":"Failed to parse azure account information object object."}}

Publish profile. The *** are my obfuscation of private strings. I have a different prediction and authoring resources for LUIS.

{
  "accessToken": "eyJ0***d5A",
  "name": "jg***bot",
  "environment": "pub",
  "runtimeIdentifier": "win-x64",
  "settings": {
    "applicationInsights": {
      "InstrumentationKey": "b5e***b0e"
    },
    "cosmosDb": {
      "cosmosDBEndpoint": "",
      "authKey": "",
      "databaseId": "",
      "collectionId": "",
      "containerId": ""
    },
    "blobStorage": {
      "connectionString": "",
      "container": ""
    },
    "luis": {
      "authoringKey": "c2d***28f",
      "authoringEndpoint": "https://jg***luisauth.cognitiveservices.azure.com/",
      "endpointKey": "5fd***191",
      "endpoint": "https://australiaeast.api.cognitive.microsoft.com/",
      "region": "australiaeast"
    },
    "MicrosoftAppId": "12e***a37",
    "MicrosoftAppPassword": "TyO***OsD"
  },
  "hostname": "jg***webappbot",
  "luisResource": "jg***prediction"
}

Additional context

JohnRobertGreen avatar Mar 04 '21 22:03 JohnRobertGreen

@JohnRobertGreen,could you check if this is consistently reproducible? Just double confirm, you didn't update composer and didn't update your publish profile, right? I can't explain why this happen, we can jump into a call to debug more.

luhan2017 avatar Mar 05 '21 06:03 luhan2017

I did not update Composer. I did not update the publishing profile (excepting for setting the access token). I have just retried publishing and it works. There's been no changes at my end. I do note that errors in LUIS (no prediction resource shown and error messages in the Notification panel) are also fixed. So I'm thinking this was a problem with LUIS rather than Composer.

JohnRobertGreen avatar Mar 07 '21 03:03 JohnRobertGreen

@JohnRobertGreen Yes, thanks for the response, I also got confirmation from another customer that it is a luis issue which is already fixed and works fine now.

luhan2017 avatar Mar 08 '21 00:03 luhan2017