504 (GATEWAY_TIMEOUT) when updating source for app

  • 1
  • Problem
  • Updated 4 years ago
We have been running into an issue lately where our app will stop allowing us to update source. We get the following error via the website (upload source button or put'ing a zip file via the api:

Failed to load resource: the server responded with a status of 504 (GATEWAY_TIMEOUT)

Once this error occurs we have to go in and create a new app. We use the same zip file that failed previous and it works without error. Once we do that we can use the API again and we have no issue. Any thoughts on how we can fix this? We have had to create 4 apps in the last 2 days to do new deployments.

What might be doing it is we have an azure kudu server that we recently hooked up to do builds and it sent a "bad" zip file (one that non windows users can't open) and it looks like once we send a single bad zip file we can no longer update the app.
Photo of Nicholas Capito

Nicholas Capito

  • 5 Posts
  • 0 Reply Likes
  • frustrated

Posted 4 years ago

  • 1
Photo of ryan

ryan, Developer

  • 1538 Posts
  • 132 Reply Likes
Strange. To clarify:
- You're using both the web upload UI and the API, but only see the error on the web UI?
- Only on updates, not creates?
- Every time, or just intermittently?

Also can you send a copy of the zip file causing the error to build@phonegap.com so we can try to reproduce? Please reference this issue in your email.
Photo of Nicholas Capito

Nicholas Capito

  • 5 Posts
  • 0 Reply Likes
I see the error in both. To reproduce all you have to do is upload a bad zip file.

Then take a valid zip file and try to upload it to the same app and you will get a 504 timeout via the web UI and same with API.
Photo of Nicholas Capito

Nicholas Capito

  • 5 Posts
  • 0 Reply Likes
I can email my source (not wild about it) who is the receiver of that email ? I created the "bad zip" with the latest version of gulp-zip I could probably create a dummy one that will re-create the problem.

The zip was created on "windows" and was not readable on my mac osx . So the error phonegap through was missing index.html
Photo of ryan

ryan, Developer

  • 1538 Posts
  • 132 Reply Likes
OK we'll try just creating our own bad zip file and see if we can reproduce.

While this would of course be something Build should fix to handle more gracefully, now that you know the cause, if you avoid uploading the badly formatted zip you probably should be able to avoid the issue?
Photo of Nicholas Capito

Nicholas Capito

  • 5 Posts
  • 0 Reply Likes
Yes. Issue is once a app goes bad we can't update it anymore and have to create a new one. I can send you all a build if you can't reproduce just let me know (will take me about 30 mins or less).
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
I can email my source (not wild about it)
Are you aware that your source code, once the app is published, is available publicly, anyway?
Photo of Nicholas Capito

Nicholas Capito

  • 5 Posts
  • 0 Reply Likes
I am assuming you are talking about someone who wants to unzip the ipa and poke around.
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
Or the apk, yes.