microsoftarchive / Learn-LTI

Access the Microsoft Learn http://docs.microsoft.com/learn Catalog of Learning Paths and Modules directly from your Learning Management Systems using the Microsoft Learn LTI application
https://microsoft.github.io/Learn-LTI/
MIT License
127 stars 50 forks source link

Can not deploy the App on my Subscription #124

Closed Ivan-Ada closed 3 years ago

Ivan-Ada commented 3 years ago

I am the owner of the subscription It fails on the Step #4 Registering Azure AD App. Have tried 2 times with 2 different regions Log-07-05-2021-09-43-57.log Log-07-05-2021-09-50-57.log

leestott commented 3 years ago

@Ivan-Ada

So it looks there was a error in the deployment please ensure you remove all resources before trying to redeploy including removal of keys from Azure Key Vault see https://github.com/microsoft/Learn-LTI/blob/main/docs/TROUBLESHOOTING.md

You can remove the services running this powershell script https://github.com/microsoft/Learn-LTI/blob/main/deployment/Cleanup.ps1

Ivan-Ada commented 3 years ago

@leestott thank you for your reply!

The subscription I used for deployment contained no resources related to LTI app at all. I have just tried to redeploy it on 2 another subscriptions, unfortunately with the same result (an the same error message):

Exception.Message [ Encountered an Error while creating AAD App ] Exception.Type [ System.Management.Automation.RuntimeException ]

leestott commented 3 years ago

Hi @Ivan-Ada

Thanks for confirming can you confirm you have these prerequisites

To begin, you will need the following installed.

Azure CLI DotNet Core SDK Node.js Powershell Git

You will need a valid a Azure subscription and Azure Active Directory setup.

Can you confirm if your subscription has service Principal/Owner permissions of the Azure Subscription you are deploying too?

leestott commented 3 years ago

@Ivan-Ada

Regarding the error.. Could you please check with your AAD admin if you are are allowed to create app registrations?

Ivan-Ada commented 3 years ago

@Ivan-Ada

Regarding the error.. Could you please check with your AAD admin if you are are allowed to create app registrations?

@leestott I have just manually created an Dummy-AAD-app, thus I have the permissions required.

leestott commented 3 years ago

@Ivan-Ada Excellent can you try this again?

Please send me the error log if you receive an error.

I believe this issue may of been simply that you didn't have an Azure Active Directory available to register the App within.

Ivan-Ada commented 3 years ago

@Ivan-Ada Excellent can you try this again?

Please send me the error log if you receive an error.

I believe this issue may of been simply that you didn't have an Azure Active Directory available to register the App within.

I didn't have all the required libraries installed (at least Node.js was missing). I have installed everything ant run it again: now I have an error on the step 10: Exception.Message [ Errors while building Function App [ AssignmentLearnContent ] ] Exception.Type [ System.Management.Automation.RuntimeException ] Log-11-05-2021-11-07-03.log

leestott commented 3 years ago

@Ivan-Ada

Are you sure you have installed all the prerequisites https://github.com/microsoft/Learn-LTI/blob/main/docs/DEPLOYMENT_GUIDE.md

Please make sure you have installed everything this looks like a .Net Core SDK wasnt installed?

DotNet Core SDK https://dotnet.microsoft.com/download?WT.mc_id=learnlti-github-cxa Make sure you install the .Net Core SDK

Error Log: [ 11.05.2021 11:11:39 ] - [INFO] - Installing FunctionApp -- AssignmentLearnContent [ 11.05.2021 11:11:39 ] - [INFO] - Publishing Project [ Edna.AssignmentLearnContent.csproj ] as FunctionApp [ 11.05.2021 11:11:39 ] - [INFO] - Building [ C:\Users\Ivan.Umnov\Learn-LTI\backend\Functions\Edna.AssignmentLearnContent\Edna.AssignmentLearnContent ] --> [ Artifacts\AssignmentLearnContent ] [ 11.05.2021 11:11:40 ] - [INFO] - Microsoft (R) Build Engine version 15.9.20+g88f5fadfbe for .NET Core Copyright (C) Microsoft Corporation. All rights reserved.

MSBUILD : error MSB1001: Unknown switch. Switch: --nologo

For switch syntax, type "MSBuild /help" [ 11.05.2021 11:11:40 ] - [ERROR] - Exception.Message [ Errors while building Function App [ AssignmentLearnContent ] ] [ 11.05.2021 11:11:40 ] - [ERROR] - Exception.Type [ System.Management.Automation.RuntimeException ] [ 11.05.2021 11:11:40 ] - [ERROR] - Error occurred while executing the Script. Please report the bug on Github (along with Error Message & Logs)

Ivan-Ada commented 3 years ago

@leestott

below are the versions of the required libraries/apps I have installed:

Azure CLI: 2.23.0 DotNet Core SDK: 2.1.503 (x64) Node.js: 14.16.1 LTS Powershell: 7.1.3.0 Git: 2.20.0.windows.1

the current version of DotNet Core available is 3.1, should I upgrade mine?

Ivan-Ada commented 3 years ago

@leestott I have updated the software discussed and the next deployment seems to be successful, thank you! However I am getting on the every deployment's step the error "DLL load failed while importing win32file: The specified module could not be found." it works.

leestott commented 3 years ago

@Ivan-Ada

So if you can share the error your now getting?

Or is the implementation now deployed successfully?

If the implementation failed you need to remove the resource group and all associated resources first before follow the troubleshooting guide https://github.com/microsoft/Learn-LTI/blob/main/docs/TROUBLESHOOTING.md

If you simply try to reinstall before removal you will get errors. SO PLEASE REMOVE ALL INSTALLED SERVICES

The root cause of the issues looks like you simply didn't have the prerequisites installed before doing the initial install.

leestott commented 3 years ago

@Ivan-Ada

Hi did you manage to get the installation working? if so can we close this issue?

Ivan-Ada commented 3 years ago

@leestott

yes it works, thank you so much!