Matt Cashatt
Matt Cashatt

Reputation: 24218

Facebook Connect Javascript SDK Suddenly Not Loading in Chrome and Firefox

Problem Solved, See Answer Below

I have a site that has been operating for a couple of weeks using Facebook Authentication (www.myappwill.com). Everything has been fine until today, suddenly none of the Facebook functionality is working in Chrome or FireFox. Nothing has changed with the code or with the Facebook app configuration. Curiously, everything is FINE IN MICROSOFT EDGE!?!

Specifically, I am getting this error in the browser:

GET https://connect.facebook.net/en_US/sdk.js net::ERR_NAME_NOT_RESOLVED

I searched Stackoverflow and found several similar questions to this and all recommended that you explicitly include the HTTP protocol in front of the FB JavaScript SDK URL. I tried adding "https:" and it worked. . .for about 30 minutes. Now it is back to not working again and I am at a loss.

We are hosting on Azure if that is another clue. This site is in production and we are getting support emails now so your help is appreciated.

Upvotes: 0

Views: 1036

Answers (1)

Matt Cashatt
Matt Cashatt

Reputation: 24218

After consulting with a few folks and digging around a bit I have discovered that there is nothing wrong at all with the code.

This is a DNS issue. I assume that some of the Facebook server IP addresses changed and that was causing the requests for their JavaScript SDK to fail.

I realized this after attempting to connect on devices and networks that had not previously connected to the site.

The Fix:

Simply flush your DNS cache. If you are using Windows, just go to a command prompt and type ipconfig /flushdns.

We also needed to flush the DNS on the firewall here in our office. The bottom line: there may not be a problem with your code.

Hope this spares someone the panic I just went through!

Upvotes: 1

Related Questions