Error Code 504 is yet another error associated with Google Play Store when trying to download the Facebook app. This doesn’t happen always with Facebook though, but since it’s a mega-popular social network, it seems like it’s the most common. However, 504 error is actually a gateway timeout error which means there is a problem with the internet connection (wifi, mobile data).
This also means that this error might not be something you can fix with your phone. Instead, you might need to check your internet connection, maybe restart the router or something similar. At any rate, here are some fixes for you to try.
■ As mentioned, the error is usually a problem with the internet connection, either on your side or sometimes on the server side. Either way, try connecting to a different wifi network and then try to download the app.
■ You could also try this trick. Open your quick settings menu, and turn on the Airplane mode by tapping on the icon.
■ Wait a minute or so, and then turn theAirplane mode off. Now, connect to your wifi again (should be automatic as soon as you turn off the Airplane mode off) and try to download the app.
■ If you’re still having problems, you can also clear the cache and data from Google Play Services. Find and tap the Settings menu on your mobile phone.
■ Tap on Apps or Application manager (names will be different, depending on your phone).
■ In the list of apps, find Google Play Services or Google Service Framework and tap on it.
■ Now tap on Clear data and Clear cache.
■ You can also do the same for the Google Play Store although it might not be needed.
■ Contact Google support or anyone related to your problem if the problem persists, and see if they can do something to help you.