Botframework-emulator: Error 400 when using open bot with AppId+Password

Created on 24 Apr 2019  路  6Comments  路  Source: microsoft/BotFramework-Emulator

Version

4.3.3 on MacOS

Describe the bug

I created an echo bot using the yeoman generator following this doc, but I was unable to test the locally hosted bot in the emulator using the open bot with URL (+ AppID and password) feature. This bug only exists when we add an AppId and Password to the local bot. I got that AppId and Password from a newly created ABS Web App Bot. The workaround to this problem was to create a .bot file with the local endpoint, AppId and Password.

To Reproduce

Steps to reproduce the behavior:

  1. Follow this doc to create a bot locally.
  2. Follow this doc to create Web App bot to gather an appid and password
  3. Deployment is optional
  4. Add AppId and Password to .env of my yeoman generated bot that is hosted locally.
  5. Open the emulator and click on Open Bot
  6. Enter my localhost endpoint, AppId and Password
  7. Say hi or anything to the bot
  8. ends with a 400 directline.postActivity issue

Expected behavior

This should just work out of the box as it does with a local bot without an AppId and Password.

Additional context

The work around to this problem was to create a new bot configuration file, add the endpoint, AppId and password. Save the file and then talk to the bot. This worked fine, but took us a while to figure this out.

[bug]

All 6 comments

same behavior on Windows. I discovered this while trying to hit a remote bot, though, w/ ngrok configured correctly (as it _did_ work when I used a .bot file to connect to the remote endpoint)

hi @ovishesh & @brandonh-msft. we will take a look at this. thanks

I'm not able to repro this on a locally running bot. 400 directline.postActivity usually means auth failed with either a bad password or app id. In researching this issue I did find a minor problem with the form in that it does not appear to trim input so whitespace could be passed on to the auth calls. Please verify the input to exclude whitespace and try again. In the meantime, I'll get a PR up to trim input on the form.

image

Note that no botfile is open on the left pane and the bot is responding normally.

@stevengum was able to reproduce. we'll be taking a work item to continue the thread. cc @justinwilaby

@ovishesh, @KatieProchilo, @brandonh-msft

I upgraded to use the nightly 4.3.3-56219 and the problem seems to have been fixed. Can you try using this version of the emulator?

Closing due to inactivity and a high probability of a fix being in place

Was this page helpful?
0 / 5 - 0 ratings