Bot : 502 Bad Gateway in "test in web chat"

Sam 6 Reputation points
2021-03-03T08:22:56.177+00:00

Hi,

I published a bot to Azure that was based on the QnA Maker bot (I downloaded the source code, modified it, and re-published it under a different bot name)

Then, testing the bot with the "test in web chat" I get a 502 bad gateway. It does not seem to be a timeout as the error appears instantly

Does someone have experience with a similar problem ?

Thank you

Azure AI Bot Service
Azure AI Bot Service
An Azure service that provides an integrated environment for bot development.
941 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Sam 6 Reputation points
    2021-03-07T22:08:23.727+00:00

    HI @romungi-MSFT

    Thank you so much for your answer and suggestion. I will share my experience here as it might help others.
    The reason the bot channel service was not responding with the 502 Bad Gateway is because the web app was not running at all, it had silently failed to start.

    To see that, in the web app service, click on the URL and if it doesn't say something about web sockets, it's probably not running.

    Then, I got some help to realize that in the web app service we can actually browse the logs : the app was not starting because there was a file named <somethingjsonresource>.metaproj and basically the fact there is any file other than the *.csproj ending with pro is enough to block the web app from starting (it says there are multiple project files.... !)

    So I re-published after renaming this file and now it all works

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.