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

Frontend app fails to load on GitPod due to ad blocker blocking Firebase analytics #297

Open
vingkan opened this issue Jul 20, 2022 · 0 comments
Labels
bug Something isn't working frontend Related to the frontend application infra Infrastructure to support features product Intake of new product ideas

Comments

@vingkan
Copy link
Collaborator

vingkan commented Jul 20, 2022

Summary

When working on GitPod, the frontend app does not load at all if your ad blocker blocks Firebase analytics.

Further Details

  • The issue appears to only occur in dev, but not in production.
  • The error is thrown when getAnalytics() is imported, not when it is called.

Possible Solutions

  • Short Term Fix: Disable your ad blocker on the web page when running Butterfly on GitPod.
  • Failed Long-Term Solution: Tried to try/catch the getAnalytics() call, but it still failed.
  • Possible Long-Term Solution: Use a mock of Firebase analytics, like described in this StackOverflow answer, seems awkward.
  • Possible Long-Term Solution: Trying to dynamically import the module to catch the error, but not sure how to do this.

Screenshots

Case 1: Running on GitPod, ad blocker enabled -> app does not load at all because analytics is blocked

Screen Shot 2022-07-20 at 11 00 14 AM

Case 2: Running on GitPod, ad blocker disabled -> app functions normally

Screen Shot 2022-07-20 at 11 00 25 AM

Case 3: Running on GitHub pages, ad blocker enabled -> app functions normally

Screen Shot 2022-07-20 at 11 00 39 AM

@vingkan vingkan added bug Something isn't working frontend Related to the frontend application infra Infrastructure to support features product Intake of new product ideas labels Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working frontend Related to the frontend application infra Infrastructure to support features product Intake of new product ideas
Projects
None yet
Development

No branches or pull requests

1 participant