Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"500 Internal Server Error" when trying to download GPX file #18

Open
faceless-stoat opened this issue Dec 20, 2022 · 6 comments
Open

Comments

@faceless-stoat
Copy link

Since at least 8 December, the link to download a GPX file (via /api/cck/route.gpx) has been giving "500 Internal Server Error" on at least some routes some of the time. (Possibly, all routes all of the time.)

I observed this myself on the 8 Dec delivery round for Chesterton. One other person reported the same for the Trumpington route that day.

The same problem (probably) has been reported at least once since ("I hit the gpx button last week and got a server error"). I don't have positive evidence that this is currently working for anyone.

I'm pretty sure it worked fine (no server error, and plausible GPX contents) on 24 November (for the Mill Road route, at least).

@faceless-stoat
Copy link
Author

Happening again with tonight's Mill Road route.
(I haven't yet heard of a counterexample to "it always happens now".)

For completeness, the route URL containing the broken button (with passcode redacted):
https://volunteer.cckitchen.uk/route?date=22-12-2022&ref=mill-road&passcode=XXXX
and the (redacted) URL of the broken link itself:
https://volunteer.cckitchen.uk/api/cck/route.gpx?date=22-12-2022&ref=mill-road&passcode=XXXX&mode=bicycling

(I had a look in the source for the "500 | Internal Server Error." page just in case, no obvious clue there.)

@pdl
Copy link
Member

pdl commented Dec 30, 2023

This is because the gpx route makes a request to:

GET /maps/api/geocode/json?address=The%20Lockon%2C%20Fair%20Street%2C%20Cambridge&key=

Which fails with error

You must enable Billing on the Google Cloud Project at https://console.cloud.google.com/project/_/billing/enable Learn more at https://developers.google.com/maps/gmp-get-started

So I assume we were using a free trial and this ran out.

@faceless-stoat
Copy link
Author

(The GPX functionality is no longer exposed, as of about fcff3cf.)

@ml-evs
Copy link
Member

ml-evs commented Apr 9, 2024

Hi, I'd love to use this functionality for my deliveries. Would you be happy if I made a PR trying to fix this? (and get around Google Cloud, if possible) Just posted in the group too but figured this is a more appropriate place.

@faceless-stoat
Copy link
Author

From discussion elsewhere, I think a PR would be welcome.

What content would you want in your GPX file?
For me, just waypoints for drops is entirely sufficient, which can be done entirely mechanically without needing anything navigation-capable on the app side. I don't need any suggested navigation information (I'll let my device or brain do that).
(Unlike the original version of this GPX feature, which provided a navigation route but not waypoints, so wasn't useful for me even when it was working -- this might have been a failure of requirements capture.)

(I am currently using a shonky script on the API endpoint to achieve this end -- not yet published, but output is similar to that from my previous version of the same script -- example here. Would that sort of output work for you too?)

Another comment I've heard is that GPX files aren't very usable with Google Maps. If there were demand (and I've no evidence there is) it might be nice to also be able to produce another format that works better with it (KMZ maybe?), if such exists at all. But it's probably an unnecessary complication.

@ml-evs
Copy link
Member

ml-evs commented Apr 10, 2024

Great! Quick thoughts:

  • gpx with waypoints only is exactly what I need
  • happy to investigate other formats that work with google maps/apple maps/OSM etc.
  • timescale for this isn't super immediate on my side but hopefully will get a chance in the next month or two to have a play around! If anyone else wants to have a go in the meantime please don't let me stop you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants