Kopīgot, izmantojot


Troubleshoot bot configuration issues

APPLIES TO: SDK v4

A bot can generate different types of errors, such as not being able to respond, throwing errors, or working in one channel but not in another. The first step in troubleshooting a bot is to test it in Web Chat. This will allow you to determine if the problem is specific to your bot (bot doesn't work in any channel) or to a particular channel (bot works in some channels but not others).

Test in Web Chat

  1. Open your bot resource in the Azure portal.
  2. Open the Test in Web Chat pane.
  3. Send your bot a message.

Test In Web Chat

If the bot doesn't respond with the expected output, go to Bot doesn't work in Web Chat. Otherwise, go to Bot works in Web Chat but not in other channels.

Bot doesn't work in Web Chat

There can be many reasons why a bot doesn't work. Most likely, the bot application is down and can't receive messages, or the bot receives the messages but fails to respond. Here are some of the possible causes:

  • The bot is down and can't be reached.
  • The bot is crashing.
  • The bot's endpoint is incorrect.
  • The bot is successfully receiving your messages but can't respond.

To see if the bot is running:

  1. Open the Overview pane.
  2. Copy the Messaging endpoint and paste it into your browser.

If the endpoint returns HTTP Error 404 or 405, that means the bot is reachable and the bot is able to respond to messages. To investigate timeout issues, see times out or fails with an HTTP 5xx error articles.

If the endpoint returns an error "This site can't be reached" or "can't reach this page", that means that your bot is down and you need to redeploy it.

Bot works in Web Chat but not in other channels

If the bot works as expected in Web Chat but fails in some other channel, possible reasons are:

Channel configuration issues

It's possible that channel configuration parameters, such as the bot's username and password have been set incorrectly or have changed externally. For example, a bot was configured with the Facebook channel for a particular page and the page was later deleted. The simplest solution is to remove the channel and redo the channel configuration anew.

For a list of supported channels and instructions on how to configure each one, see the Channels list in Connect a bot to channels.

Channel-specific behavior

Implementation of some features can differ by channel. For example, not all channels support Adaptive Cards. Most channels support Actions (buttons), but they're rendered in a channel-specific way. If you see differences in how some message types work in different channels, consult the channels reference article.

Below are links that can help with individual channels:

Channel outage

Occasionally, some channels might have an interruption of service. Usually, such outages don't last long. However, if you suspect an outage, consult the channel's web site or social media.

Another way to determine if a channel has an outage is to create a test bot (such as a simple Echo Bot) and add a channel. If the test bot works with some channels but not others, then the problem isn't in your production bot.

Additional information

See how-to debug a bot and the other debugging articles in that section.