https://github.com/typedb/angular-posthog-freeze
https://github.com/typedb/angular-posthog-freeze
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/typedb/angular-posthog-freeze
- Owner: typedb
- Created: 2024-11-13T13:40:52.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-11-13T14:12:21.000Z (over 1 year ago)
- Last Synced: 2025-01-22T18:09:48.096Z (over 1 year ago)
- Language: TypeScript
- Size: 112 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Angular PostHog Freeze MRE
This repository exists so that we can diagnose an issue where our website freezes indefinitely with the PostHog snippet enabled, but does not freeze with the snippet disabled.
(NB: There are other ways to fix the freeze, including code refactors.)
## Quick reproduction
1. Visit https://angular-posthog-freeze.netlify.app/ (without any adblocker extensions in your browser)
2. The website should open in your browser, and immediately freeze, becoming unresponsive. You can verify this by right-clicking anywhere on the page, or clicking the "Hello World" button.
You can also observe the issue go away if you enable uBlock Origin in your browser and reload the site.
## Build from source (for debugging)
### Environment
- Node.js v18.16.0 (e.g. through NVM)
- PNPM v7.33.7
- Chrome 130.0.6723.117 (without any adblocker extensions)
- MacOS Sonoma v14.5
### Steps to reproduce
1. Clone the repo
1. `pnpm i`
1. `ng serve --open`
The website should open in your browser, and immediately freeze, becoming unresponsive. You can verify this by right-clicking anywhere on the page, or clicking the "Hello World" button.
If you go to `main.ts` and comment out the call to `posthog.init`, the issue goes away.
## Additional information
Adblockers may cause the issue to not show up.
The issue also goes away if you take out the Angular Material popup menu from the source code. We hypothesise that somehow the two are not playing together well.