PostHog / posthog

🦔 PostHog provides open-source web & product analytics, session recording, feature flagging and A/B testing that you can self-host. Get started - free.
https://posthog.com
Other
22.36k stars 1.35k forks source link

TypeError: Cannot redefine property: adoptedStyleSheets #23222

Open MathiasWP opened 5 months ago

MathiasWP commented 5 months ago

Bug Description

Bug description

Our application throws the following errors in the console in production:

First error:

TypeError: Cannot redefine property: adoptedStyleSheets
    at Function.defineProperty (<anonymous>)
    at Bl (https://app.kvistsolutions.com/_app/immutable/chunks/client.CTpbyv1F.js:19:23828)
    at e_ (https://app.kvistsolutions.com/_app/immutable/chunks/client.CTpbyv1F.js:19:27202)
    at https://app.kvistsolutions.com/_app/immutable/chunks/client.CTpbyv1F.js:19:15255
    at oe (https://app.kvistsolutions.com/_app/immutable/chunks/client.CTpbyv1F.js:19:40448)
    at j (https://app.kvistsolutions.com/_app/immutable/chunks/client.CTpbyv1F.js:19:42217)
    at kt (https://app.kvistsolutions.com/_app/immutable/chunks/client.CTpbyv1F.js:19:42309)
    at _t.startRecording (https://app.kvistsolutions.com/_app/immutable/chunks/client.CTpbyv1F.js:21:5549)
    at _t._initializeRecording (https://app.kvistsolutions.com/_app/immutable/chunks/client.CTpbyv1F.js:21:9004)
    at _t.initializeSampling (https://app.kvistsolutions.com/_app/immutable/chunks/client.CTpbyv1F.js:21:4289)
    at ni._initialize (https://app.kvistsolutions.com/_app/immutable/chunks/client.CTpbyv1F.js:21:18337)
    at https://app.kvistsolutions.com/_app/immutable/chunks/client.CTpbyv1F.js:21:17802
    at r (https://app.kvistsolutions.com/_app/immutable/chunks/client.CTpbyv1F.js:14:4722)

Second error:

TypeError: Cannot redefine property: adoptedStyleSheets
    at Function.defineProperty (<anonymous>)
    at Pe (https://eu-assets.i.posthog.com/static/recorder.js?v=1.141.0:1:44558)
    at He (https://eu-assets.i.posthog.com/static/recorder.js?v=1.141.0:1:52593)
    at ke (https://eu-assets.i.posthog.com/static/recorder.js?v=1.141.0:16:9066)
    at Me (https://eu-assets.i.posthog.com/static/recorder.js?v=1.141.0:16:11107)
    at n.wt (https://eu-assets.i.posthog.com/static/recorder.js?v=1.141.0:16:11204)
    at n.value (https://app.kvistsolutions.com/_app/immutable/chunks/es.DtFJIoRH.js:6:49375)
    at https://app.kvistsolutions.com/_app/immutable/chunks/es.DtFJIoRH.js:6:46915
    at i.onload (https://app.kvistsolutions.com/_app/immutable/chunks/es.DtFJIoRH.js:6:977)

Here's a screenshot of the stack trace in Sentry:

image

Please describe. If this affects the front-end, screenshots would be of great help.

If you are on PostHog Cloud it would be really valuable if you can share any links where the problem occurs. This speeds up our ability to troubleshoot tremendously.

How to reproduce

Not sure

Additional context

Can it be caused by ad-blockers?

Debug info

- [ ] PostHog Cloud, Debug information: [please copy/paste from https://us.posthog.com/settings/project-details#variables]
- [ ] PostHog Hobby self-hosted with `docker compose`, version/commit: [please provide]
- [ ] PostHog self-hosted with Kubernetes (deprecated, see [`Sunsetting Kubernetes support`](https://posthog.com/blog/sunsetting-helm-support-posthog)), version/commit: [please provide]
vitaly-arkhipov-1 commented 3 weeks ago

Hello! Just checking in to see if there are any updates on this issue. We’re seeing this error in Sentry daily, so any information would be appreciated. Thank you!