corona-warn-app / cwa-map-public-frontend

Corona-Warn-App Map Public Frontend
https://map.schnelltestportal.de/
2 stars 2 forks source link

Testing web frontend with Docker fails to show map (RefererNotAllowedMapError) #24

Closed MikeMcC399 closed 2 years ago

MikeMcC399 commented 2 years ago

Where to find the issue

Instructions in README.md

Describe the issue

Following the instructions for testing with Docker in README.md no map is shown.

Steps to reproduce

In Windows start Docker Desktop

Execute:

docker build -t map-fe .
docker run -p 8080:80/tcp -it map-fe

In Google Chrome access http://localhost:8080

Note error "Sorry! Something went wrong. This page didn't load Google Maps correctly. See the JavaScript console for technical details."

Press F12 and select "Console" The error message lists RefererNotAllowedMapError:

js?key=AIzaSyARb7p--_OaUwoRfu42MMUNJmUvHxMQcUU&callback=initMap&libraries=&v=weekly:66 Google Maps JavaScript API error: RefererNotAllowedMapError
https://developers.google.com/maps/documentation/javascript/error-messages#referer-not-allowed-map-error
Your site URL to be authorized: http://localhost:8080/

Suggestion

Check README instructions.

If the port is changed to 9000 then the website displays the map. There are however no test stations shown in the map.

docker run -p 9000:80/tcp -it map-fe

In Google Chrome access http://localhost:9000

dreske commented 2 years ago

This is because the google license is bound to specific URLs. This includes the port. Only localhost:9000 is allowed I think.

Mike McCready @.***> schrieb am Mo., 5. Sept. 2022, 15:26:

Where to find the issue

Instructions in README.md https://github.com/corona-warn-app/cwa-map-public-frontend/blob/main/README.md Describe the issue

Following the instructions for testing with Docker in README.md https://github.com/corona-warn-app/cwa-map-public-frontend/blob/main/README.md no map is shown. Steps to reproduce

In Windows start Docker Desktop

Execute:

docker build -t map-fe . docker run -p 8080:80/tcp -it map-fe

In Google Chrome access http://localhost:8080

Note error "Sorry! Something went wrong. This page didn't load Google Maps correctly. See the JavaScript console for technical details."

Press F12 and select "Console" The error message lists RefererNotAllowedMapError:

js?key=AIzaSyARb7p--_OaUwoRfu42MMUNJmUvHxMQcUU&callback=initMap&libraries=&v=weekly:66 Google Maps JavaScript API error: RefererNotAllowedMapErrorhttps://developers.google.com/maps/documentation/javascript/error-messages#referer-not-allowed-map-error Your site URL to be authorized: http://localhost:8080/

Suggestion

Check README instructions.

If the port is changed to 9000 then the website displays the map. There are however no test stations shown in the map.

docker run -p 9000:80/tcp -it map-fe

In Google Chrome access http://localhost:9000

— Reply to this email directly, view it on GitHub https://github.com/corona-warn-app/cwa-map-public-frontend/issues/24, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJ7I3MUCGOCUPRIUC7GXVLV4XYGVANCNFSM6AAAAAAQE7XWKQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

MikeMcC399 commented 2 years ago

@dreske

This is because the google license is bound to specific URLs. This includes the port. Only localhost:9000 is allowed I think.

That makes sense. In that case the README which specifies the non-working port 8080 needs to be corrected.