Web App Down - Not Familiar with Azure

Kevin Zhu 51 Reputation points
2020-10-22T14:21:05.573+00:00

Hello Azure Experts,

I hope you are doing well today.
I'm currently facing an unknown problem with my Azure web app.
When I run my web app on my local computer, it runs the way I want to, however when I upload it onto Azure it crashes on the second web page.
In my deployment center, my deployment is successful, everything has been pushed successfully - it is not an error in my deployment logs

My first page runs completely fine, and it looks like this: see image attached
34306-image.png
I'm experiencing an error on my second page, please see the image attached:
34371-image.png
I expected the page to look something more like this,
34307-image.png
I checked my logs and it says this,
34260-image.png
but I'm not really sure on what that means. Prior to getting this message I had another error that I somehow resolved by doing nothing:
34247-image.png
and I'm not sure if this is still affecting anything.

Once again, I'm fairly new to Azure web apps and I would appreciate the help. My code can be found here on my github: https://github.com/kevinzhu99/imageView, and here is a screenshot of my deployment logs to confirm that it deploys successfully and this is not the source of the error:
34355-image.png

Just a heads up to any experts, you can deploy this web app (runs perfectly fine) is it possible actually test this web app to get to the second page? I feel like that's where my error will show and it will be easier to debug. I've attached a photo for test inputs you could try to see if it brings you to the next page, 34248-image.png

I appreciate any help given, and I hope to hear from you soon!

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

1 answer

Sort by: Most helpful
  1. Ryan Hill 28,286 Reputation points Microsoft Employee
    2020-10-22T21:52:28.903+00:00

    Hi @Kevin Zhu ,

    It was a pleasure connecting with you this afternoon. Per our conversation, we were able to check your Application Logs using the Diagnose and solve problems blade and determined the error you're getting was:

    2020-10-22T20:34:45.940088583Z [2020-10-22 20:34:45,935] ERROR in app: Exception on /shnGetCamImg [POST]  
    2020-10-22T20:34:45.940158683Z Traceback (most recent call last):  
    2020-10-22T20:34:45.940164783Z   File "/antenv/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app  
    2020-10-22T20:34:45.940168783Z     response = self.full_dispatch_request()  
    2020-10-22T20:34:45.940172383Z   File "/antenv/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request  
    2020-10-22T20:34:45.940176183Z     rv = self.handle_user_exception(e)  
    2020-10-22T20:34:45.940179583Z   File "/antenv/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception  
    2020-10-22T20:34:45.940190584Z     reraise(exc_type, exc_value, tb)  
    2020-10-22T20:34:45.940194584Z   File "/antenv/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise  
    2020-10-22T20:34:45.940198284Z     raise value  
    2020-10-22T20:34:45.940201784Z   File "/antenv/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request  
    2020-10-22T20:34:45.940205384Z     rv = self.dispatch_request()  
    2020-10-22T20:34:45.940208784Z   File "/antenv/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request  
    2020-10-22T20:34:45.940212384Z     return self.view_functions[rule.endpoint](**req.view_args)  
    2020-10-22T20:34:45.940215884Z   File "/home/site/wwwroot/main.py", line 53, in shnGetCamImg  
    2020-10-22T20:34:45.940219384Z     start_X = int(request.form['startX_Coord'])  
    2020-10-22T20:34:45.940222784Z ValueError: invalid literal for int() with base 10: ''  
    

    which indicates an error with the value of startX_Coord being converted to an int.

    We also determined that your application is dependent on devices that is on your corporate network:

    2020-10-22T20:58:17.591916769Z [tcp @ 0x557e3bca62c0] Connection to tcp://192.168.34.79:554?timeout=0 failed: Connection refused  
    2020-10-22T20:58:17.645864554Z [2020-10-22 20:58:17,638] ERROR in app: Exception on /shnGetCamImg [POST]  
    2020-10-22T20:58:17.645896455Z Traceback (most recent call last):  
    2020-10-22T20:58:17.645902155Z   File "/antenv/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app  
    2020-10-22T20:58:17.645906555Z     response = self.full_dispatch_request()  
    2020-10-22T20:58:17.645910455Z   File "/antenv/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request  
    2020-10-22T20:58:17.645914355Z     rv = self.handle_user_exception(e)  
    2020-10-22T20:58:17.645919855Z   File "/antenv/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception  
    2020-10-22T20:58:17.645923555Z     reraise(exc_type, exc_value, tb)  
    2020-10-22T20:58:17.645927055Z   File "/antenv/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise  
    2020-10-22T20:58:17.645930855Z     raise value  
    2020-10-22T20:58:17.645945455Z   File "/antenv/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request  
    2020-10-22T20:58:17.645949255Z     rv = self.dispatch_request()  
    2020-10-22T20:58:17.645952556Z   File "/antenv/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request  
    2020-10-22T20:58:17.645956056Z     return self.view_functions[rule.endpoint](**req.view_args)  
    2020-10-22T20:58:17.645959556Z   File "/home/site/wwwroot/main.py", line 73, in shnGetCamImg  
    2020-10-22T20:58:17.645963056Z     imgtest, imgCrop, transformed_image, final_image = imageProcessing(cameraip, start_X, start_Y, width_XY, height_XY, pnt1, pnt2, pnt3, pnt4)  
    2020-10-22T20:58:17.645969756Z   File "/home/site/wwwroot/functions.py", line 117, in imageProcessing  
    2020-10-22T20:58:17.645973356Z     cropPic = frame[start_Y:start_Y+height_XY, start_X:start_X+width_XY]  
    2020-10-22T20:58:17.645976756Z TypeError: 'NoneType' object is not subscriptable  
    

    Per our discussion, Azure can't communicate with local network devices without a Point-to-Site VPN connection. You will have to integrate your app service with a VNET that will be connected to your corporate network with a VPN Gateway appliance. This will allow your app service to establish communication with your camera devices on your corporate network.

    Regards,
    Ryan

    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.