My device is Motorola Xoom MZ604. The internet connectivity is 4G WiMax via my laptop as hotspot. The problem is when I'm trying to download any app from Google Play Store, it gives me an Error 504 with the message I mentioned in title.

However, if I navigate to the application via browser and click: Install → Select Device → Install and then restart my device, it sometimes works.

Some googling brought me that it's a gateway timeout error. But I'm still unable to figure out how to work around the problem. So looking forward for your help.

  • 1
    A screenshot showing the full message would help, as error 504 can mean different things. Mar 24, 2016 at 5:55

5 Answers 5


According to the list of status codes at Wikipedia, a 504 error means the following:

504 Gateway Timeout
The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.

In other words: the culprit should neither be (on) your device, nor (at) Google Play -- but in between.

A thread on the Nook forum describes the very same problem, and one of the conclusions there is:

Generally, that means a Gateway error and I would suspect the problem being on the router end rather than the Nook side. Sometimes a router reset will cure it.

Which corresponds to my conclusion. So if you're using mobile data, it might help to switch data off and on again (or better: switch to airplane mode and back), in the hope you will get a connection into a different segment of your provider's network (and thus a different gateway on that end).

From a thread on XDA about all the Google Play Error Codes

Method 1:

  • clear data
  • clear cache of google play store & google service framework

Method 2:

  • remove your gmail account
  • reboot
  • Re-add account

Funnily, the very same issue comes to a very different conclusion on Yahoo answers: here the user had not enough space on his device, so after removing some other app it suddenly worked. I suspect this was a co-incidence (when he tried again after having freed up space, the gateway was "fixed") -- but it cannot hurt to check for that.

Several more sulutions might pop up with the time. To me it proved helpful to search Google for '"Google Play" "error 504"'.

  • 8
    I don't know if 504 error from google play is the same as a 504 HTTP error. If it actually is an HTTP 504, i agree, it won't fix anything on the server. Jan 1, 2015 at 15:06
  • 1
    Yeah. Unfortunately, that XDA post doesn't speak about reasons, just about possible solutions.
    – Izzy
    Jan 1, 2015 at 15:08
  • 6
    found some more info that says a 504 error is INSTALL_FAILED_UID_CHANGED - this is comments to a bug fixed in titanium backup, but it's more info :) Jan 1, 2015 at 15:17
  • 3
    UID is usually consider the UserID, sometimes called a SID in windows. Which if it did "change", then it would make sense as to why those methods do work, because it re-initializes the UID (method 2), or re-caches what it thinks the UID is (method 1). Jan 1, 2015 at 15:43
  • 4
    -504 being INSTALL_FAILED_UID_CHANGED as opposed to HTTP 504 seems likely given that installing a Chrome update on the M developer preview fails with -504 (because the package is not built for M IIRC)
    – user43185
    Jul 31, 2015 at 7:11

Hope this will help someone.

In my case I was trying to upgrade the app (currently installed on device) which has Target SDK 23 to the app (newly uploaded app in play store) which has target sdk 22.

  • 1
    Yes the log said : "Error -504 while installing <package>: -26: Package <package> new target SDK 21 doesn't support runtime permissions but the old target SDK 23 does" Jan 17, 2016 at 10:51
  • I'm not sure this is a comprehensive solution to OP's question. For example, I uninstalled all previous instances of the app from my phone, tried to reinstall it through Google Play, and still getting this error. Dec 5, 2016 at 16:36
  • 1
    @IgorG. unfortunately you need to uninstall the app from all the device which uses this a/c... (for ex. if three devices using same account and u have installed app using this a/c, you need to uninstall the app from all three devices to get rid of the error.)
    – wasimys
    Dec 5, 2016 at 22:20

Try resetting the play store app. You won't lose your apps following these steps. Nothing important will be lost.

Steps to follow on a motorola xoom

  1. Go to the app drawer (menu)
  2. Tap settings
  3. Tap applications
  4. Tap the "All" tab
  5. Scroll through and look for play store
  6. Tap Play Store (not play store services!)
  7. Tap "clear data"
  8. You will then get a warning, click "ok"

That's it, go through your problem again and see if it fixed. Bear in mind you will have to re-accept the terms and conditions for the play store app, when this comes up, simply click "accept"

  • Great i will try this out and let you know.
    – Samiron
    Dec 19, 2012 at 2:53
  • Ok. Glad I could help!
    – cnfw
    Dec 19, 2012 at 21:06
  • Ya :) i will surely reply about how your solution worked for me but probably will be a bit late. being busy at this moment :(
    – Samiron
    Dec 20, 2012 at 3:43

This could also appears when you trying to install an app that is not install on the current user, but still installed on the guest or another user.

You have more that one user on Lollipop devices.


Setting the phone into Airplane mode and back did the trick for me. So it most likely was indeed the Gateway issue. Tip though. Dont just turn it on then off. Wait about 60 seconds before you turn airplane mode off again. If you just toggle it, it picks up the same gateway.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .