Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adblockers blocking Google Maps will cause the client to hard-fail #2175

Closed
hudson-newey opened this issue Nov 25, 2024 · 2 comments · Fixed by #2184
Closed

Adblockers blocking Google Maps will cause the client to hard-fail #2175

hudson-newey opened this issue Nov 25, 2024 · 2 comments · Fixed by #2184
Assignees
Labels
bug Something isn't working

Comments

@hudson-newey
Copy link
Member

hudson-newey commented Nov 25, 2024

I have just experienced a case where my adblocker caused Google maps to break / not load.

This caused the entire application to hard-fail.

This highlights an underlying issue with our architecture.
If Google maps fails to load, only Google maps should stop working and should not cause the entire application to crash.

We should instead allow Google maps to fail, and overlay the error message where the Google maps placeholder would be. Displaying an error message such as "Maps failed to load: Request was blocked by ad blocker" (or similar)

@hudson-newey hudson-newey added the bug Something isn't working label Nov 25, 2024
@hudson-newey
Copy link
Member Author

hudson-newey commented Dec 4, 2024

Because loading the Google Maps bundle is currently a blocking operation.
No other requests in the client will start until the Google Maps bundle is fully loaded.

Therefore, this bug is also a performance bottleneck that I see all of the time

@hudson-newey
Copy link
Member Author

Related to #451

@hudson-newey hudson-newey self-assigned this Dec 6, 2024
hudson-newey added a commit that referenced this issue Dec 6, 2024
hudson-newey added a commit that referenced this issue Dec 11, 2024
* Fixes a bug where if Google Maps failed to embed, the entire site would hard-fail
* Move the embedGoogleMaps.ts helper scripts into a DI service
* Lazy load google maps to only embed when we need it for the current page (improving performance)
* Asyncronously embed google maps (embedding google maps is no longer a blocking operating, improving performance and reducing the scope for bugs)
* Adds loading spinner when Google maps is loading
* Adds failure state when Google maps fails to load
* Re-enables map component tests

Fixes: #2175
hudson-newey added a commit that referenced this issue Dec 11, 2024
* Fixes a bug where if Google Maps failed to embed, the entire site would hard-fail
* Move the embedGoogleMaps.ts helper scripts into a DI service
* Lazy load google maps to only embed when we need it for the current page (improving performance)
* Asyncronously embed google maps (embedding google maps is no longer a blocking operating, improving performance and reducing the scope for bugs)
* Adds loading spinner when Google maps is loading
* Adds failure state when Google maps fails to load
* Re-enables map component tests

Fixes: #2175
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant