Azure Web App is not working - Application Error - Flask Backend and ReactJS Frontend

Arghya 1 Reputation point
2022-09-22T02:39:53.143+00:00

I have created a web app service with the below configuration:

  1. Runtime Stack Python 3.9
  2. Deployment mode- Code

My app has Flask in backend and ReactJS in Frontend. I have followed this guideline configure-language-python while building the flask part. Then for ReactJS I had created the build folder using npm build in my local machine.
Then I am deploying this whole code base using Azure DevOps (In the App service I have set my deployment as Azure Repos)

The app is running locally with no error. Really don't know what is the issue when I deploy the app on Azure!! I have also followed the guideline to set the WEBSITES_PORT=8000 via azure command line. Despite this I am getting the below error:

![243609-azureapperror.jpg][2]  

This is really frustrating as there is no specific pointer to the error.

Please help.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,909 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. brtrach-MSFT 15,256 Reputation points Microsoft Employee
    2022-09-23T04:05:36.43+00:00

    @Arghya We understand your app works locally but once deployed to Azure, it gives an error.

    There are a number of reasons as to why this error can occur. We will list a few of them below to see if any of them align with your specific situation.

    1. Database misconfiguration. In the past customers receive this error when attempting to connect to an on-prem DB and using the FQDN. You do not want to use the FQDN on your application string or hybrid manager profile. Just put the database name is all that is needed.
    2. Does your app contain any logging? This might help see if there is a dependency not loading and thus, a custom startup script would be helpful.

    Please let us know the outcome of the two common scenarios. If you have further questions, please reply here so we can assist you further.