BotFramework-Emulator
BotFramework-Emulator copied to clipboard
Add LUIS resource doesn't recognize I'm the owner of the resource
Version
4.3.3.57327
Describe the bug
Add LUIS resource doesn't recognize that I am the owner of the service
To Reproduce
try to add luis model, you get this

I'm the owner

Expected behavior
To let me pick my resources
[bug]
For some reason the connection is being closed by the service that provides the programmatic key when authorized with an ARM token:

Since there is no programmatic key, it's not possible to retrieve any apps so it tells you to try and create a new LUIS app.
I've reached out to the LUIS team and am awaiting their feedback. The API works just fine; I was able to hit it directly with Postman and successfully retrieved my global authoring key.
Note-to-self: It would be worth diffing older versions of the Emulator with master as the functionality used to work. If older versions of the emulator still work, then there is a code change somewhere; otherwise it's a change in the service.
The LUIS team thinks the request we are sending is malformed.
Just checked this today and it works in 4.2.0 and 4.3.0 on Windows.
The bug is still in master, I'm currently looking for the regression.
Update:
If I use Fiddler and set the following environment variables like so on Windows:
set http_proxy=http://127.0.0.1:8888
set https_proxy=http://127.0.0.1:8888
set NODE_TLS_REJECT_UNAUTHORIZED=0
The code in master works...
Second Update:
The break seems to be due to us bumping to electron 4.x.x, in which case they switch out the usage of OpenSSL to BoringSSL.
Cross linking electron/electron#18557
Using electron-fetch doesn't yield any better outcomes compared to the original dependency (using node-fetch in fetchProxy.ts)
This seems blocked at the moment because the version of electron now being used in the emulator does not like the LUIS service server (due electron using BoringSSL which is stricter than OpenSSL).
Using the net or electron-fetch module in electron doesn't remedy the situation as the client (electron main process) still closes the socket.
One way to become unblocked would be to reconfigure the LUIS server, either so it's acceptable by clients using BoringSSL or to allow CORS of some variance (and perform the call from the client).
Another possibility would be to setup a proxy of our own (perhaps using Service Bus) to take ARM token from the emulator and retrieve the LUIS authoring key on behalf of the user.
Closing as LUIS is on the path of depreciation. If you still find this is the issue we need to fix, please reopen