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.

500 Error when changing AppId/Pass. Requires Emulator restart.

See original GitHub issue

Related (probably): https://github.com/microsoft/BotBuilder-Samples/issues/1523

I’ve seen this happen before, too.

Version

4.4.1-60043 (although I’m fairly certain this isn’t new)

Describe the bug

In order for a change to MicrosoftAppId / MicrosoftAppPassword to take effect in the Emulator, the whole Emulator application must be restarted, not just the opened bot or the “Live Chat” window. I have a feeling this is tied to caching it for an endpoint, but I haven’t tested different endpoints.

This can be a problem in the following scenarios:

  1. Having a typo in appId/pass and then trying to change it. It will appear to never work unless user restarts Emulator
  2. Testing a local bot with and without an appId/appPass
  3. Testing multiple bots on the localhost endpoint
  4. Needing to change the password while testing – maybe user accidentally uploads to repo

To Reproduce

Get two valid AppIds/AppPasswords. I’ll refer to them as AppA/PassA, AppB/PassB.

FAIL:

  1. Start a bot with AppA/PassA set in appsettings.json
  2. Connect to the bot in Emulator using Open Bot, using AppA/PassA
  3. Stop the bot
  4. Change the bot to use AppB/PassB in appsettings.json
  5. Close Live Chat window in Emulator
  6. Open Bot in Emulator with AppB/PassB
  7. Receive 500 Error
  8. Close Emulator entirely
  9. Open Bot in Emulator with AppB/PassB
  10. Success

SUCCESS:

  1. Start a bot with AppA/PassA set in appsettings.json
  2. Connect to the bot in Emulator using Open Bot, using AppA/PassA
  3. Stop the bot
  4. Change the bot to use AppB/PassB in appsettings.json
  5. Close Emulator entirely
  6. Open Bot in Emulator with AppB/PassB
  7. Success

Expected behavior

Opening a new Bot session in Emulator should not use an old AppId/AppPassword.

Additional context

I’ve tested various ways of stopping/restarting the bot and with/without ngrok. Pretty sure this is an Emulator issue.

The completely breaks in C#, presenting the 500 error and then not connecting. In Node, it seems to first try to connect with the old AppId/Pass, but then tries to connect with the new one and works. See image:

image

Note that when connecting in Emulator, I used 94ea2b04-ccba-437e-b3f1-3f0376fcbc98. It showed the error in console, but actually worked in the Emulator.

[bug]

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
mdrichardsoncommented, Jul 15, 2019

@tonyanziano Confirmed fix! Good work!

1reaction
mdrichardsoncommented, Jun 26, 2019

@tonyanziano Still outstanding. I haven’t tested this in awhile, though.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Untitled
Opgerold brood met zalm, Iaapa 2015 app, Id pass point blank gratis, ... Error 101 task start failed, Waves s1 imager alternative, Will...
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