Can't find any addresses in the backend Google Maps component

4 views
Skip to first unread message

Wouter Hendriks

unread,
Oct 14, 2025, 11:19:05 AMOct 14
to General WebHare developers discussion
Using Google Maps, no matter which address I try to find, I get:

"Er zijn geen resultaten gevonden."

Temporarily set the key to "This key can call any API" to make sure that's not the problem.

Tried Leaflet, same problem.

Couple of random gotchas:

- whether Google Maps is used, is set in Dashboard => Modules => double click 'socialite' => tab "Maps"

- selecting "Google Map" reveals an important message:

"Make sure you have added a 'Google cloud APIs' key with scope 'Client' for the WebHare backend domain that is accessible by the url 'about:srcdoc'"

- if you set the "Google Cloud APIs" key to "Server", you get:

Exception EXCEPTION: Unable to find the proper API key for '127.0.0.1' (scope=client, type=google).

Set it to "Client", you get:

Exception EXCEPTION: Unable to find the proper API key for '127.0.0.1' (scope=server, type=google).

I guess "Any" is the better choice here?



Arnold Hendriks

unread,
Oct 14, 2025, 3:34:24 PMOct 14
to General WebHare developers discussion, Wouter Hendriks
First off, never use the same key for both client and users unless you know what you're doing. The API key sent to the client should only have access to the javascript map APIs and is further locked down by referrer where possible. The API key that stays on the server should be used for geolocation requests etc. 

Tried https://webhare.moe.sf.webhare.dev/?app=webhare_testsuite:mapdemo. Not really maintained but it sort of works. After first fixing

Exception EXCEPTION: Error while retrieving results: This IP, site or mobile application is not authorized to use this API key. Request received from IP address 2a02:a44f:****** with empty referer.

entering webwerf send me to Lonnekerbrugstraat

Also:

Screenshot 2025-10-14 at 21.30.53.png

It seems to find things. Why these three results, not a clue, but it looks to me like API keys are working then
 
"Make sure you have added a 'Google cloud APIs' key with scope 'Client' for the WebHare backend domain that is accessible by the url 'about:srcdoc'"

- if you set the "Google Cloud APIs" key to "Server", you get:

Exception EXCEPTION: Unable to find the proper API key for '127.0.0.1' (scope=client, type=google).

Set it to "Client", you get:

Exception EXCEPTION: Unable to find the proper API key for '127.0.0.1' (scope=server, type=google).

I guess "Any" is the better choice here?

It may be the quickest way to get things working, but it's unsafe. You really need separate keys

 
Reply all
Reply to author
Forward
0 new messages