lizmap-web-client icon indicating copy to clipboard operation
lizmap-web-client copied to clipboard

[Bug]: No Google base layers

Open NvBgm opened this issue 6 months ago • 3 comments

What is the bug? (in English)

After an update of Lizmap to version 3.8.11 the Google base layers are no longer visible. API key checked for validity everything was ok. All other base layers are good.

Steps to reproduce the issue

Just open map like before update

Versions, safeguards, check summary etc

Versions :

  • Lizmap Web Client : 3.8.11 - commit 51c30f8fd https://github.com/3liz/lizmap-web-client/commit/51c30f8fd
  • Lizmap plugin : 4.5.1
  • QGIS Desktop : 3.42.3
  • QGIS Server : 3.42.3
  • Py-QGIS-Server or QJazz : not used
  • QGIS Server plugin lizmap_server : 2.13.0
List of Lizmap Web Client modules :
* Version Lizmap Web Client 3.8 needed
List of safeguards :
* Mode : normal
* Allow parent folder : yes
* Number of parent : 6 folder(s)
* Prevent other drive : yes
* Prevent PG service : yes
* Prevent PG Auth DB : yes
* Force PG user&pass : yes
* Prevent ECW : yes

Check Lizmap plugin

  • [x] I have done the step just before in the Lizmap QGIS desktop plugin before opening this ticket. Otherwise, my ticket is not considered valid and might get closed.

Operating system

Windows11

Browsers

Chrome

Browsers version

Versie 137.0.7151.119 (Officiële build) (64-bits)

Relevant log output


NvBgm avatar Jun 19 '25 08:06 NvBgm

Duplicate of #5550 ?

Which base layer ? Terrain, satellite, map... ?

Gustry avatar Jun 19 '25 08:06 Gustry

On both Sattellite and Terrain.

NvBgm avatar Jun 20 '25 06:06 NvBgm

Please check your logs, maybe in the Javascript console (F12), about the requests sent to Google servers (and the response) Is the layer included in baselayers group ?

Gustry avatar Jun 20 '25 09:06 Gustry

Both layers are in the baselayers group.

Lizmap version 3.9.0 Request URL https://tile.googleapis.com/v1/createSession?key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Request method POST Status code 403 Forbidden Remote address [2a00:1450:400e:80c::200a]:443 Referrer policy strict-origin-when-cross-origin

Lizmap version 3.8.7 Request URL https://maps.google.com/maps/api/js?v=3&key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Request method GET Status code 200 OK (from disk cache) Remote address [2a00:1450:400e:811::200e]:443 Referrer policy strict-origin-when-cross-origin

NvBgm avatar Jul 04 '25 10:07 NvBgm

Problem solved. Error not on lizmap's side but on googleapis.com. Sorry for the inconvenience.

I've found the solution here:

https://answebtechnologies.in/blog/API_KEY_HTTP_REFERRER_BLOCKED/

Visit: https://console.developers.google.com/apis

Navigate to the APIs & Services > Credentials panel in Cloud Console.

Select the name of an existing API key.

I did not turn off restriction but use the ip adresses to fix my error of forbidden for....

Image

NvBgm avatar Jul 08 '25 10:07 NvBgm

hi @NvBgm

Problem solved

could you please share how exactly the issue was resolved or what changed on Google's side? it would be helpful to understand in case something similar happens in the future

Duplicate of https://github.com/3liz/lizmap-web-client/issues/5550 ?

could you please confirm or try to reproduce the issue on your side?

Thanks!

josemvm avatar Jul 08 '25 11:07 josemvm