Flags Explorer: setup is stuck

I’ve setup everything for flags according to the documentation for the posthog provider. And restarted my Next.js development server, but the flag explorer remains in the setup screen even after clicking on done.

It is unclear how to proceed or which steps are missing.

Downgrading the Vercel Toolbar version also doesn’t help.


I explored the return values of the getProviderData call to Posthog and found out that it contained two “hints” / errors but with a status code 200.

NEXT_PUBLIC_POSTHOG_HOST must be present for the endpoint - I defined the host in the adapter directly. It would be worth mentioning this in the docs.

Now I can see that the return value is

{
  "definitions": {},
  "hints": []
}

but I have one feature flag defined in Posthog. The API key does have read and write access for feature flags.
The flags explorer is still stuck.

I tested the posthog endpoint for feature flags directly in a HTTP client and it works as expected.

Okay I was able to find the source of the problem:

The adapter is filtering for active feature flags, so they are not listed by the adapter.

First of all I would suggest to accept an empty list of flags in the explorer setup or return a hint and forward the hints to the UI, otherwise it’s super intransparent what is going on.

Then I’m not sure wether I’m not getting feature flags (a standard flag should just return true,false, no?) or if the team got the adapter wrong, which I think is the case.

Submitted it as an issue here: Multiple issues with the Posthog Provider · Issue #152 · vercel/flags · GitHub

Thanks, Bernd! I shared this with the Flags team. They’ll loop back with comments! We really appreciate the detail btw :folded_hands:

1 Like

Sure thing, if any details are missing, reach out to me.

1 Like