-
Notifications
You must be signed in to change notification settings - Fork 236
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Bug description
After refreshing the page, the error "TypeError: t2.handlePageUnload is not a function" appears in the console
How to reproduce
- Open the browser
- Enable the "preserve log" function
- Refresh the page
- The console error is "TypeError: t2.handlePageUnload is not a function"
Related sub-libraries
- All of them
- posthog-js (web)
- posthog-js-lite (web lite)
- posthog-node
- posthog-react-native
- @posthog/react
- @posthog/ai
- @posthog/convex
- @posthog/nextjs-config
- @posthog/nuxt
- @posthog/rollup-plugin
- @posthog/webpack-plugin
Additional context
After updating the "posthog-js" version, the error "TypeError e.handlePageUnload is not a function" started falling in the Sentry of the work project. It occurs when the user refreshes the page, so it can only be noticed in the console when the "preserve log" mode is enabled
The path to the error is "node_modules/posthog-js/dist/module.js"
The problem appeared in version 1.310.0
Presumably, it could appear because of this change.
My config looks like this (the "api_host" and "defaults" fields are hidden) :
export const postHogConfig: Partial<PostHogConfig> = {
api_host: '',
defaults: '',
session_recording: {
recordBody: true,
recordCrossOriginIframes: true,
recordHeaders: true,
},
};
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working