Error while getting response from load balancer

0

I have deployed react application on Application load balancer and there are two ec2 instance in a target group,the issue is that the web page loads properly after multiple refresh or else gives blank screen because of the error "Uncaught SyntaxError: Unexpected token '<'". in the console and only loads the static index.html.

The application loads by directly accessing the instance without any error and even after multiple refreses. The issues get encountered in load balancer only. I have also tried changing the health check configuration but didn't worked and the checkups are also healthy. I also tried deploying the application with classic load balancer but issues were faced.

What might be the possible issue because it successfully responds sometimes and mostly reponds with errors?

  • The issue is most likely on the application side. Using Chrome developer tools, can you please capture the Request and Responses when the page loads and when you observe this error? This will help us better understand the issue.

1 Answer
0

This error may be related to React application also. Would recommend to use your browser dev tools or any available React Developer Tools to debug the same. This will provide some insights where things are failing.

profile pictureAWS
EXPERT
answered a year ago
  • There is no issue in the application i have checked and also it works fine by directly accessing the instance. The link for load balancer:http://projectbalancer-1437849666.ap-south-1.elb.amazonaws.com/ You can have a look,and let me know what is causing the load balancer to show this error. Inorder to access the page you have to refresh multiple times and i have also mentioned to which server it is accessing either 1 or 2

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions