You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Had you been using previous versions of posthog-js without this?
Absolutely wild that the response would be defined but not have headers. Every time I think that computers have let me down for the last time there's something new 😅
This issue may be related to Supertokens, which I’m using in my project. I noticed that Supertokens overrides the fetch and XMLHttpRequest functions to inject custom headers, so it could be contributing to this bug.
This doesn’t affect my production code; I only noticed it in the console while testing a migration to a newer version of Supertokens.
I’ve used previous versions of posthog-js without encountering this issue, likely because I hadn’t triggered a CORS error like this before.
I thought it would be helpful to open this issue in case others run into the same error log. :)
I thought it would be helpful to open this issue in case others run into the same error log. :)
oh, no, absolutely! i'm super pleased you did. my assumption is always that for one person who does open an issue, many people have had the problem and not bothered.
i believe there aren't any recent changes in posthog-js that should contribute here... but that doesn't mean there's nothing for us to do in response
Hello,
I encountered the following error with posthog-js version
1.166.2
:recorder.ts:688 Uncaught TypeError: Cannot read properties of undefined (reading 'forEach')
This error occurs when my request fails due to a CORS policy restriction. I’ve attached a screenshot for reference.
It seems to be here:
posthog-js/src/entrypoints/recorder.ts
Lines 560 to 563 in 4f73d88
The text was updated successfully, but these errors were encountered: