Closed ABVN-Thien closed 1 year ago
Hi Thien,
This can occur if the route is not globally unique. To fix this, please update the name of your backend in the parameter.json file and the manifest.yaml file (whatever you change update the name to, it must have the same name in both files!).
If you are running the terraform container, please run bash /home/user/iac-azure-modular/remove_azure_resources.sh
to remove your existing resources in Azure. Then you should be all good to re-run the container as normal. The pwsh container handles resource removal on its own.
Best, Alex
Hi Alex,
I removed the azure resources as command you suggested. I ran again the deployment for back-end app but it still hit issue as below:
50398dcb89ef:~/btp-bridge-framework/backend$ npm start
> ms-teams-backend@1.0.0 start
> node app.js
[2023-06-07T03:30:49.642Z] ERROR Error: 2 validation issue(s)
Issue #0: invalid_type at connectionString
Required
Issue #1: invalid_type at containerName
Required
at new ZodError (/home/user/btp-bridge-framework/backend/node_modules/zod/lib/src/ZodError.js:40:28)
at ZodObject.parse (/home/user/btp-bridge-framework/backend/node_modules/zod/lib/src/parser.js:190:17)
at new BlobsStorage (/home/user/btp-bridge-framework/backend/node_modules/botbuilder-azure-blobs/lib/blobsStorage.js:71:79)
at Object.<anonymous> (/home/user/btp-bridge-framework/backend/bots/botActivityHandler.js:550:17)
at Module._compile (node:internal/modules/cjs/loader:1196:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1250:10)
at Module.load (node:internal/modules/cjs/loader:1074:32)
at Function.Module._load (node:internal/modules/cjs/loader:909:12)
at Module.require (node:internal/modules/cjs/loader:1098:19)
at require (node:internal/modules/cjs/helpers:108:18)
Pls note that we have to run the manual deployment as current authorization is not allowed to run with automation ./btpsa
Is there any missing in configuration? Pls advise.
Thank you Alex. -Thien
Hi Alex, We found that ConnectionString and containerName are part of dotenv file. we tried to maintain and can deploy the backend app fine.
The sample values:
MICROSOFT_BLOB_CONNECTION_STRING=DefaultEndpointsProtocol=https;AccountName=btpbridgeaccount;AccountKey=iadbnQgmiPcF4jR0A3XOouIgRzb5W08r1ow9I5CMCpjm4P3AH3dBxjvipFqhYp+j4jYwna88aXns+AStEobzUw==;EndpointSuffix=core.windows.net
MICROSOFT_BLOB_CONTAINER_NAME=btpbridgecontainer
Hence, the next question is, what is the meaning of each variable in .env, and is it required to maintain all values?
Hi Thien,
That error is related to missing values in the .env file. You don't need to maintain all of the values from the .env-example.
The automation pipeline will generate the following backend .env file for you on a successful run:
MicrosoftAppId=<the application id of your application registration>
MicrosoftAppPassword=<the secret attached to the application registration>
MicrosoftTenantId=<your Azure tenant Id>
MICROSOFT_BLOB_CONTAINER_NAME=<the name of the storage account>
MICROSOFT_BLOB_CONNECTION_STRING=<connection string is tied to the primary location of the storage account and needed to access it>
connectionName=<bot service Oauth connection name>
samlScope=<authorization scopes for the bot service>
samlResourceUrl=<application id of the enterprise application registration>
xsuaaClientId=<xsuaa client id of the application version>
xsuaaClientSecret=<xsuaa client secret of the application version>
frontendUrl=<url of the frontend application in BTP>
frontendFallbackUrl=<same value as the frontend url>
configServerUrl=<url of the config server - the config app url in BTP>
samlAlias=<last portion of the reply url - everything after alias/>
REACT_APP_SCROLL_PAGE_SIZE=<recommended to be 400 - css value>
Additionally, I would probably avoid mixing and matching the automation tool with manual setup. In my opinion, it is much easier to mess something up by switching between the two guides.
Please let me know if you have any further questions.
Best, Alex
--random-route
hit the error