Google Maps API doesn't work in a container

savasy3 months ago

Hi,

I deployed traccar (6.4) in a docker container, it works fine except Google Maps.

The same deployment on a VM (non-container) with the same Google Maps API key works well.

What could be the reason(s)?

Thanks

Anton Tananaev3 months ago

Have you checked the browser console to see what the errors are?

Turbovix3 months ago

Did you happen to not configure the API to only allow use with the VM IP (non-container)?

savasy3 months ago

I checked, full of 400 error messages like

DOMException: An attempt was made to use an object that is not, or is no longer, usable

traccar.jpg

savasy3 months ago

no restriction on the API key other than limited to Google Maps API

Anton Tananaev3 months ago

You're looking at the wrong error. You have to see what the tile server API error is.