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

"o.featureFlags.overrideFeatureFlags is not a function" when using feature toggle from toolbar #28409

Open
psalv opened this issue Feb 6, 2025 · 1 comment
Labels
bug Something isn't working right

Comments

@psalv
Copy link

psalv commented Feb 6, 2025

Bug Description

Bug description

Overriding features flags appears to have an error (launching in fresh incognito from the "Launch toolbar" tool in the Posthog app).

Uncaught TypeError: o.featureFlags.overrideFeatureFlags is not a function
    at setOverriddenUserFlag (flagsToolbarLogic.ts:178:44)
    at index.cjs.js:1245:24
    at Object.dispatch (index.cjs.js:1980:19)
    at t.actions.<computed> (index.cjs.js:1367:28)
    at onChange (FlagsToolbarMenu.tsx:95:53)
    at onClick (LemonSwitch.tsx:77:25)

posthog-js version: ^1.215.5 (latest)

My app is being built with vite version ^5.4.1

I'm a bit stumped what could be going wrong here but it feels like this commit is related PostHog/posthog-js@690773b

clientPostHog.featureFlags.overrideFeatureFlags({

Debug info

Session: https://us.posthog.com/project/sTMFPsFhdP1Ssg/replay/0194dd72-08bc-77a6-b721-81244f860de4?t=2420
Admin: http://go/adminOrgUS/01945cc7-3c26-0000-b2fe-808c574fd25f (project ID 117481)
Sentry: http://go/sentryUS/117481
@psalv psalv added the bug Something isn't working right label Feb 6, 2025
@pefernandez
Copy link

Having the same issue.

Uncaught TypeError: o.featureFlags.overrideFeatureFlags is not a function
    at setOverriddenUserFlag (toolbar.js?t=1738921500000:36:73173)
    at toolbar.js?t=1738921500000:10:10493
    at Object.dispatch (toolbar.js?t=1738921500000:10:22661)
    at t.actions.<computed> (toolbar.js?t=1738921500000:10:12293)
    at onChange (toolbar.js?t=1738921500000:36:75316)
    at onClick (toolbar.js?t=1738921500000:26:113521)
    at Object.Cw (toolbar.js?t=1738921500000:6:9867)
    at Sw (toolbar.js?t=1738921500000:6:10021)
    at yw (toolbar.js?t=1738921500000:6:10078)
    at Ax (toolbar.js?t=1738921500000:6:31460)

Any browser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working right
Projects
None yet
Development

No branches or pull requests

2 participants