question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

getting error applicationId of undefined for luis while integrating bot composer luis todo bot using Botbuilder-js sdk

See original GitHub issue

Issue

we are using bot builder-JS SDK with version 4.11.0 . We are taking the bot files from the bot composer and trying to run bot with that files. We integrated the files and able to run the bot but when we are using luis it is asking for the secret keys and we are passing it through expression as we get from the bot composer but it was unable to get the keys.

When we checked in the bot composer folder the folder structure is like this image

From here we have . dialog file for every parent and child dialogs in recognizer folder and there is appsettings.json and luis.settings.composer.westus.json file. The content in the dialog file will be like this, there are expressions to get the keys

{
  "$kind": "Microsoft.LuisRecognizer",
  "id": "LUIS_additem",
  "applicationId": "=settings.luis.additem_en_us_lu.appId",
  "version": "=settings.luis.additem_en_us_lu.version",
  "endpoint": "=settings.luis.endpoint",
  "endpointKey": "=settings.luis.endpointKey"
}

So, we kept the secret keys in two .json files but when we run the bot it is unable to get the keys from the json files and getting error that application ID of undefined for luis image

Solutions we tried

We removed the expression in the .dialog file and placed the secret keys in the file bot working fine.

Our question

Is there any function in botbuilder-js SDK that it will take the settings from the appsettings.json file? Or is there any way to set the settings so that when the bot runs it will take from the appsettings.json or .env file

@stevengum please help us in solving this issue.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:17 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
GLakshmiSravanthicommented, Jan 16, 2021

@dmvtech tried with prediction resources but unable to resolve the Issue. I tried to check in code of botbuilder-js modules, correct me if I gave wrong information.

checked from where getting the error "Invalid applicationId value detected: undefined Please make sure your applicationId is a valid LUIS Application Id, e.g. "b31aeaf3-3511-495b-a07f-571fc873214b"." got to know that it is from validateLuisApplication() function and this function is used in constructor to check the Luis key. I tried to log the values of application because from that taking the applicationId, endpoint, endpointKey values.

image

Tried two scenario’s Without giving the applicationId and endpointKey in ToDoBotWithLuisSample-0.en-us.lu.dialog file image Logs image If the equations for applicationId and endpointKey getting the values are undefined.

With giving the applicationId and endpointKey in ToDoBotWithLuisSample-0.en-us.lu.dialog file tempsnip Logs tempsnip If we gave the direct values application getting the values.

could you please explain us why applicationId and endpointKey are getting the their default values i.e. undefined when we tried to give the applicationId by an equation.

1reaction
dmvtechcommented, Dec 16, 2020

I am investigating this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Botbuilder-Js SDK is not picking up the Secret keys from ...
Issue: - we are using bot builder-JS SDK with version 4.11.0 . We are taking the bot files from the bot composer and...
Read more >
Add natural language understanding to your bot - Bot Service
This topic walks you through adding LUIS to a flight booking application to recognize different intents and entities contained within user input ...
Read more >
Chatbots: Simplified — LUIS - DataDrivenInvestor
I'm going to focus on a basic use case that utilises LUIS and handles the response accordingly. Node endpoint ft. adapter. Firstly, the...
Read more >
Known issues - Microsoft Open Source
The information in this documentation is not guaranteed to work for Bot Framework SDK versions past 4.9.1. Known issues. HTTP 401 Error when...
Read more >
Developing A Chatbot Using Microsoft's Bot Framework, LUIS ...
Because JavaScript is one of my primary coding languages, I chose the Node.js version of the Bot Builder SDK. To run it, you'll...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found