Skip to content
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

App create failed when publishing from composer desktop 2.0 with new resources #8283

Open
1 task done
stevengum opened this issue Jul 7, 2021 · 22 comments
Open
1 task done
Labels
Area: Publish Type: Bug Something isn't working

Comments

@stevengum
Copy link
Member

Describe the bug

The customer is publishing bot with LUIS from Composer desktop 2.0 with the option "Create new resources". The publish fails with the below error, which I describe in the repro steps.

Version

Browser

  • Electron distribution

To Reproduce

Steps to reproduce the behavior:

  1. Customer signs into composer
  2. Creates a new publishing profile
  3. Chooses the tenant with multi factor auth enabled
  4. Tries to publish and gets the below error

This error has been anonymized and formatted for readability. See the linked incident for the original error.

{
    "name": "CREATE_APP_REGISTRATION",
    "message": "App create failed! Please file an issue on Github.",
    "stack": "Error
        at new CustomizeError (C:\\Users\\John Doe\\AppData\\Local\\Programs\\Bot Framework Composer\\resources\\John.Doe.App\\extensions\\azurePublish\\dist\\extension.js:255547:25)
        at createCustomizeError2 (C:\\Users\\John Doe\\AppData\\Local\\Programs\\Bot Framework Composer\\resources\\John.Doe.App\\extensions\\azurePublish\\dist\\extension.js:255552:10)
        at BotProjectProvision.createApp (C:\\Users\\John Doe\\AppData\\Local\\Programs\\Bot Framework Composer\\resources\\John.Doe.App\\extensions\\azurePublish\\dist\\extension.js:256989:17)"
}

Expected behavior

LUIS Resource should be published successfully.

Additional context

For more information, please refer to this incident (authentication required).

@stevengum stevengum added the Type: Bug Something isn't working label Jul 7, 2021
@stevengum stevengum assigned VamsiModem and natalgar and unassigned VamsiModem Jul 7, 2021
@stevengum
Copy link
Member Author

Adding @Shameeritc and @victorlamana as FYI

@victorlamana I believe the issue you originally referenced is #8249, correct?

@victorlamana
Copy link

@stevengum hello Steven! Yeah, seems to be a similar issue

@stevengum
Copy link
Member Author

@victorlamana understood, thank you for the quick confirmation!

@stevengum
Copy link
Member Author

@natalgar, should @victorlamana & @Shameeritc try the v2.0.0-nightly.257298.f833d8e nightly build of Composer to gather more info during the debugging process?

https://github.com/microsoft/BotFramework-Composer-Nightlies/releases/tag/v2.0.0-nightly.257298.f833d8e

@natalgar
Copy link
Contributor

natalgar commented Jul 8, 2021

@stevengum yes, the new build has additional logging

@victorlamana
Copy link

OK :) I'll try again with the nightly build later today

@davidpp
Copy link

davidpp commented Jul 9, 2021

Hi!

We just hit a similar issue trying to provision resources from Composer V2 into a customer resource group. That customer also use 2FA where we do not.

Error:

App create failed after 3 retries. Error: Request failed with status code 403" --> The status code 403 error is the only difference between a regular build and the nightly one.

{"name":"CREATE_APP_REGISTRATION","message":"App create failed! Please file an issue on Github.","stack":"Error\n at new CustomizeError (/private/var/folders/kf/m3grsrb15zjdypf9b7m6778h0000gp/T/AppTranslocation/3FA91673-EB1F-406B-BC2D-4518EB8EC11F/d/Bot Framework Composer.app/Contents/Resources/app.asar.unpacked/extensions/azurePublish/dist/extension.js:224307:25)\n at createCustomizeError (/private/var/folders/kf/m3grsrb15zjdypf9b7m6778h0000gp/T/AppTranslocation/3FA91673-EB1F-406B-BC2D-4518EB8EC11F/d/Bot Framework Composer.app/Contents/Resources/app.asar.unpacked/extensions/azurePublish/dist/extension.js:224312:10)\n at BotProjectProvision.createApp (/private/var/folders/kf/m3grsrb15zjdypf9b7m6778h0000gp/T/AppTranslocation/3FA91673-EB1F-406B-BC2D-4518EB8EC11F/d/Bot Framework Composer.app/Contents/Resources/app.asar.unpacked/extensions/azurePublish/dist/extension.js:225806:17)"}

Edit: We using Composer on MacOS

@victorlamana
Copy link

Hello! This is the error I get on the nightly build:

{"name":"CREATE_APP_REGISTRATION","message":"App create failed! Please file an issue on Github.","stack":"Error\n at new CustomizeError (C:\\Program Files\\Bot Framework Composer\\resources\\app.asar.unpacked\\extensions\\azurePublish\\dist\\extension.js:224307:25)\n at createCustomizeError (C:\\Program Files\\Bot Framework Composer\\resources\\app.asar.unpacked\\extensions\\azurePublish\\dist\\extension.js:224312:10)\n at BotProjectProvision.createApp (C:\\Program Files\\Bot Framework Composer\\resources\\app.asar.unpacked\\extensions\\azurePublish\\dist\\extension.js:225806:17)"}. See provision.AzureLABpub.log in your bot folder

This is the log created for the error:

{ "profileName": "AzureLABpub", "jobId": "b5825e42-7d1e-4a39-a6fd-d2c68d2157e9", "projectId": "18805.295347112682", "time": "2021-07-12T11:05:53.955Z", "log": [ "Creating Azure resources...", "Checking the Existence of the Resource Group ...", "Use the Resource Group: ldc-covid-aid at northeurope", "> Creating App Registration ...", "App create failed, retrying ...", "App create failed, retrying ...", "App create failed, retrying ...", "App create failed, retrying ...", "App create failed after 3 retries. Error: Request failed with status code 403", "{\"name\":\"CREATE_APP_REGISTRATION\",\"message\":\"App create failed! Please file an issue on Github.\",\"stack\":\"Error\\n at new CustomizeError (C:\\\\Program Files\\\\Bot Framework Composer\\\\resources\\\\app.asar.unpacked\\\\extensions\\\\azurePublish\\\\dist\\\\extension.js:224307:25)\\n at createCustomizeError (C:\\\\Program Files\\\\Bot Framework Composer\\\\resources\\\\app.asar.unpacked\\\\extensions\\\\azurePublish\\\\dist\\\\extension.js:224312:10)\\n at BotProjectProvision.createApp (C:\\\\Program Files\\\\Bot Framework Composer\\\\resources\\\\app.asar.unpacked\\\\extensions\\\\azurePublish\\\\dist\\\\extension.js:225806:17)\"}", "{\"name\":\"CREATE_APP_REGISTRATION\",\"message\":\"App create failed! Please file an issue on Github.\",\"stack\":\"Error\\n at new CustomizeError (C:\\\\Program Files\\\\Bot Framework Composer\\\\resources\\\\app.asar.unpacked\\\\extensions\\\\azurePublish\\\\dist\\\\extension.js:224307:25)\\n at createCustomizeError (C:\\\\Program Files\\\\Bot Framework Composer\\\\resources\\\\app.asar.unpacked\\\\extensions\\\\azurePublish\\\\dist\\\\extension.js:224312:10)\\n at BotProjectProvision.createApp (C:\\\\Program Files\\\\Bot Framework Composer\\\\resources\\\\app.asar.unpacked\\\\extensions\\\\azurePublish\\\\dist\\\\extension.js:225806:17)\"}. See provision.AzureLABpub.log in your bot folder" ] }

Thanks!!!! :)

@flavio-neves
Copy link

flavio-neves commented Jul 12, 2021

Hi guys,

This error is due to lack of Azure AD permission to create the App itself. You need to add your account into "Application developer" or "Application administrator".

The Composer console will try to create an Azure AD, App in Registration tab, as you may see on my screenshot.

Composer resource creation screen:

image

Azure AD Application Registration screen:

image

[Edited to add Composer screenshot as well]

@flavio-neves
Copy link

It seems only Application Developer will not suffice, maybe Application Administrator.

As a work around, create manually the application on Azure AD, save the App ID and Secret value, go to your bot resource group and create an Azure Bot (since Bot channels are deprecated) and use the App info. After that, import only the App information using composer publishing profile and save, edit the profile and choose create new resoures and the wizard will take care of the rest.

@stevengum
Copy link
Member Author

@natalgar do you have any new findings/workarounds to share?

@natalgar
Copy link
Contributor

For anyone getting a 403 response, I have some more questions to help with the debugging. If you can answer these questions the next time you run into it that would help. Thanks!

  1. Does this happen every time you provision?
  2. What type of account are you using? Is it a work, school, or Microsoft account?
  3. What is your "role" for the subscription you are using? You can find this by looking up your subscriptions in the Azure Portal.
  4. Are you creating a new resource group or updating an existing one?
  5. When the provision fails, what is the result in Azure Portal? What resources were successfully created?
  6. If the App Registration is successfully created, navigate to it in the Azure Portal. In the left side panel of the App Registration, select Authentication. Check if there are any restrictions under "Supported Account Types".

@prajwal-ainapur
Copy link

prajwal-ainapur commented Dec 9, 2021

Hi @natalgar ,

I am also facing same issue. Please find the required details below as asked in your earlier comment.

Does this happen every time you provision?
- Yes.This happens all the time

What type of account are you using? Is it a work, school, or Microsoft account?
- It is a Microsoft Paid Subscription through one of the vendor

What is your "role" for the subscription you are using? You can find this by looking up your subscriptions in the Azure Portal.
- My role is "Owner access", So authorization shouldn't be a cause for the issue

Are you creating a new resource group or updating an existing one?
- I tried both. It's not working in both option. When i try creating a new resource group, it creates the new group but again fails at app registration part

When the provision fails, what is the result in Azure Portal? What resources were successfully created?
- No resource is created. Only resource group gets created if you take the new resource group option

Hope this helps in fixing the issue. Any alternative solution in the meanwhile is highly appreciated.

@sinnypan
Copy link

sinnypan commented Dec 29, 2021

Hi @natalgar,@dmvtech ,

I am also facing same issue. Please find the required details below:

Does this happen every time you provision?

  • No. But its happens all the time for my client's windows computer. He never be able to publish to azure.

What type of account are you using? Is it a work, school, or Microsoft account?

  • It is a customer-paid subscription, and its work MS account.

What is your "role" for the subscription you are using? You can find this by looking up your subscriptions in the Azure Portal.

  • The role is "Contributor", and we've tested he can create app and Azure resources using Azure portal

Are you creating a new resource group or updating an existing one?

  • Creating new resources (the first option)

image

We're using the latest version 2.1.1, we even tried nightbird version, still the same. Do you have any thoughts about this? Thanks!

@manan0701
Copy link

manan0701 commented Mar 4, 2022

It seems only Application Developer will not suffice, maybe Application Administrator.

As a work around, create manually the application on Azure AD, save the App ID and Secret value, go to your bot resource group and create an Azure Bot (since Bot channels are deprecated) and use the App info. After that, import only the App information using composer publishing profile and save, edit the profile and choose create new resoures and the wizard will take care of the rest.

Thanks, @flavio-neves for the suggestion regarding permissions. I have been facing the same issue and I assigned every admin permission to the user and still getting the error log.

@lesniara
Copy link

lesniara commented Mar 9, 2022

Anyone got this working? Is there a way to create the profile on Azure, perhaps? Using composer v2.1.2
Thanks

Having the same issue:

Error:
Provision failure {"name":"CREATE_APP_REGISTRATION","message":"App create failed! Please file an issue on Github.","stack":"Error\n at new CustomizeError (C:\\Users\\alex\\AppData\\Local\\Programs\\Bot Framework Composer\\resources\\app.asar.unpacked\\extensions\\azurePublish\\dist\\extension.js:276418:25)\n at createCustomizeError (C:\\Users\\alex\\AppData\\Local\\Programs\\Bot Framework Composer\\resources\\app.asar.unpacked\\extensions\\azurePublish\\dist\\extension.js:276423:10)\n at BotProjectProvision.createApp (C:\\Users\\alex\\AppData\\Local\\Programs\\Bot Framework Composer\\resources\\app.asar.unpacked\\extensions\\azurePublish\\dist\\extension.js:277931:17)"}. See provision.ACDBotPublishingProfile.log in your bot folder

The file the error refers to:

{
"profileName": "ACDAzurePublishingProfile",
"jobId": "c857f53a-ae48-4e94-b6ee-4196cb1278c1",
"projectId": "77154.25052250133",
"time": "2022-03-09T20:33:42.192Z",
"log": [
"Creating Azure resources...",
"Checking the Existence of the Resource Group ...",
"Use the Resource Group: ACDBot at westus",
"> Creating App Registration ...",
"App create failed, retrying ...",
"App create failed, retrying ...",
"App create failed, retrying ...",
"App create failed, retrying ...",
"App create failed after 3 retries. Error: Request failed with status code 401",
"{"name":"CREATE_APP_REGISTRATION","message":"App create failed! Please file an issue on Github.","stack":"Error\n at new CustomizeError (C:\\Users\\alex\\AppData\\Local\\Programs\\Bot Framework Composer\\resources\\app.asar.unpacked\\extensions\\azurePublish\\dist\\extension.js:276418:25)\n at createCustomizeError (C:\\Users\\alex\\AppData\\Local\\Programs\\Bot Framework Composer\\resources\\app.asar.unpacked\\extensions\\azurePublish\\dist\\extension.js:276423:10)\n at BotProjectProvision.createApp (C:\\Users\\alex\\AppData\\Local\\Programs\\Bot Framework Composer\\resources\\app.asar.unpacked\\extensions\\azurePublish\\dist\\extension.js:277931:17)"}",
"{"name":"CREATE_APP_REGISTRATION","message":"App create failed! Please file an issue on Github.","stack":"Error\n at new CustomizeError (C:\\Users\\alex\\AppData\\Local\\Programs\\Bot Framework Composer\\resources\\app.asar.unpacked\\extensions\\azurePublish\\dist\\extension.js:276418:25)\n at createCustomizeError (C:\\Users\\alex\\AppData\\Local\\Programs\\Bot Framework Composer\\resources\\app.asar.unpacked\\extensions\\azurePublish\\dist\\extension.js:276423:10)\n at BotProjectProvision.createApp (C:\\Users\\alex\\AppData\\Local\\Programs\\Bot Framework Composer\\resources\\app.asar.unpacked\\extensions\\azurePublish\\dist\\extension.js:277931:17)"}. See provision.ACDAzurePublishingProfile.log in your bot folder"
]
}

@prajwal-ainapur
Copy link

@lesniara I resolved the issue. The account with which you are logged in needs contributor access both for the subscription as well as the active directory. Once you get that sorted, the app should be published easily.

@lesniara
Copy link

contributor access both for the subscription as well as the active directory

Thanks @prajwal-ainapur the issue was that my personal hotmail account, that has the azure subscription, was not added to my windows accounts like my company account was. Once I did that the publishing/provisioning happened.

@pablodiloreto
Copy link

Hello team! The context that start this issue is that you are working with a personal account into a default directory in your Azure Subscription. To resolve it, you do not need to create ANY resource in manual mode: you need to create a user in your Azure AD Directory (for example user1@xxxxxxxx.onmicrosoft.com) and give to this user a permission to create and register applications in your Azure AD Directory (for example Global Admin, Contributor, etc).

After that, you need to give to the same created user permissions to the Azure subscription (or resource group) where you will deploy your bot from Bot Framework Composer (for example Owner).

Lastly, you need to login to your Bot Framework Composer with this new user, and there the error will be gone.

I repeat: it is not an application error, it is an error because you are working with a personal user and not a business user. Working with a business, in this case, has no cost.

@dsivajagan
Copy link

dsivajagan commented Feb 9, 2023

Any fix/work around on this issue as I am also facing the same issue?. I tried the work arounds as suggested above, but no luck.

Pasting the exception here from the log file
{
"profileName": "adasfd",
"jobId": "95dd6834-2e35-471e-b668-7b11ff6ee353",
"projectId": "9392.584853167762",
"time": "2023-02-09T03:37:06.576Z",
"log": [
"Creating Azure resources...",
"Checking the Existence of the Resource Group ...",
"Use the Resource Group: OBAResourceGroup at eastus",
"> Creating App Registration ...",
"App create failed, retrying ...",
"App create failed, retrying ...",
"App create failed, retrying ...",
"App create failed, retrying ...",
"App create failed after 3 retries. Error: self signed certificate in certificate chain",
"{"name":"CREATE_APP_REGISTRATION","message":"App create failed! Please file an issue on Github.","stack":"Error\n at new CustomizeError (/Applications/Bot Framework Composer.app/Contents/Resources/app.asar.unpacked/extensions/azurePublish/dist/extension.js:276418:25)\n at createCustomizeError (/Applications/Bot Framework Composer.app/Contents/Resources/app.asar.unpacked/extensions/azurePublish/dist/extension.js:276423:10)\n at BotProjectProvision.createApp (/Applications/Bot Framework Composer.app/Contents/Resources/app.asar.unpacked/extensions/azurePublish/dist/extension.js:277931:17)"}",
"{"name":"CREATE_APP_REGISTRATION","message":"App create failed! Please file an issue on Github.","stack":"Error\n at new CustomizeError (/Applications/Bot Framework Composer.app/Contents/Resources/app.asar.unpacked/extensions/azurePublish/dist/extension.js:276418:25)\n at createCustomizeError (/Applications/Bot Framework Composer.app/Contents/Resources/app.asar.unpacked/extensions/azurePublish/dist/extension.js:276423:10)\n at BotProjectProvision.createApp (/Applications/Bot Framework Composer.app/Contents/Resources/app.asar.unpacked/extensions/azurePublish/dist/extension.js:277931:17)"}. See provision.adasfd.log in your bot folder"
]
}

@amitkadu
Copy link

Same issue for me, tried all possible answers provided here like providing contributor access on subscription, Application developer role on AD. But none help. @pablodiloreto @prajwal-ainapur

@gersepa
Copy link

gersepa commented Jan 30, 2024

Is there any resolution to this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Publish Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests