Unexpected token while loading js files in Chrome

My website URL is: abhisekgour.rf.gd

I understand that IF injects aes.js script for security reasons. I have a wordpress website that uses a lot of .js files (because of the theme and plugins installed). My php page loads successfully, the cookie and javascript runs ok.

But the same thing happens (injecting aes.js in every request) for every js file. This is where problem occurs. Most of the js files ends up in console error saying Unexpected token ‘<’ without loading the actual js file. This is understandable knowing that the browser is receiving HTML when it was expecting a file containing javascript code. But why this happens, it must not be designed so. All the js files are coming from my domain only (i.e. abhisekgour.rf.gd).

Ironically, fonts and js files coming from external urls load fine every time.

P.S. This doesn;t happen always. With some browsers and internet connections it works ok. The internet speed is not an issue - when it works it does so on very slow networks as well.

P.P.S. It was working perfectly ok when I was preparing all the pages and posts on my website (from wordpress admin panel). Now I cannot even create a single post due to this error.

@Admin Please look into this!

I’m sorry, but where do you see us injecting aes.js everywhere?

Because if it does, then something is not working as intended. It’s supposed to work by serving you a Javascript challenge the first time you enter your website, which refers to the aes.js script. Your browser then completes this challenge and generates a cookie. It should then refresh the page and then send this cookie to the server with every request on your domain. This cookie then allows your browser to download all HTML, CSS, JS and other content from your site, no matter how many requests are required to do so.

Can you please check and make sure you don’t have some kind of cookie blocking browser extension which causes you to fail the challenge on some requests?

If this is a server error, I’d be happy to investigate. But so far, I’m unable to reproduce the issue on my end.


See screenshot below, it may help!

As you can see, all js files have an error saying unexpected token ‘<’. The response received against request for most JS files result in the same aes.js page being sent to the browser. This is annoying. As you see in the URL,i=2 parameter is there i.e. the browser has already set the cookie and refreshed the page already.

@Admin Please provide a solution to this!

Can you please check the Network tab and look at the request of this file? Can you see if a cookie with the name __test is sent?

And again:

As far as I can tell, the only issue happens in your browser. So I’m more likely to believe it may be a browser plugin or security setting causing this problem, rather than a server issue.

So please stop asking me directly to provide a solution to this. I can’t fix your browser. And I’m already here. You don’t need to whistle me like a dog.

1 Like

Yes it sets the Cookie properly.
Request for the file results in a HTTP 200 and the response is webpage containing aes.js HTML.

As far as I can tell, the only issue happens in your browser.
My friend has a wordpress website hosted through InfinityFree itself - jodhpurminerals.rf.gd
His website works perfectly within the same browser. I am trying my best to figure out if the problem is with the website or my browser. But it seems, the script injection works differently on my website.

And I’m already here. You don’t need to whistle me like a dog.
Sorry, if it was annoying. I tagged you just in order to bring your attention.

I see no errors listed, I have checked it with Firefox Browser Dev aurora channel, for extra info, I use telus, and is currently at Canada. Only errors are in the css stylesheets.

1 Like

The error seems to be resolved now. Probably the problem was associated with increased load on server and delayed response time.

Thank you for your support!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.