Google Maps embeded links sometimes work, sometimes don't (onebox 404)

I’m facing a weird behavior with Google Maps link.

Sometimes, they properly embed, and sometimes the onebox request returns a 404. I couldn’t find a way to reproduce the issue consistently, but it’s very often. Just try to paste links, move the google maps camera or cropping, try again, etc…

I first thought about a rate limit, but it’s not. The links that work and those that don’t are the same here or on my forum. Example:

Does anyone have an idea about where this issue comes from? Google side? Discourse side? Should it be moved to bug?

5 Likes

This is kind of weird, I just happened to notice the pattern… but I think it has something to do with the zoom level in the link?

:x: 15.5z

:white_check_mark: 15z

:x: 16.75z

:white_check_mark: 17z

An entirely different location…

:x: 15.38z

:white_check_mark: 15z

My guess is that it’s a Google Maps onebox engine issue on our end?

8 Likes

Nice sleuthing @awesomerobot ! :man_detective:

Looks like our regex for zoom level doesn’t allow dots here:

Quite an easy fix.

9 Likes

What a catch :smiley:

Thanks for figuring it out!

2 Likes

@flink91 can you have a quick look at this one?

1 Like

Sure, I’ll take a look :slight_smile:

Fixed here:

6 Likes

Rebuilding @awesomerobot’s post and all the Google Maps links are now working :clap:

Closing this.

6 Likes