Following errors can be seen in the console. I disabled all the plugins to check if it's a problem with any of them. But still, the issue existed. Any clue would be appreciated. My website is hosted on wordpress.com.
Didn't find out the reason for the problem. But asked the WordPress chat support and they said they just reset the jetpack support on WordPress and it worked after that.