Flags Explorer not working in development with NextJS App Router

I’ve tried implementing feature flags by following https://vercel.com/docs/feature-flags/flags-explorer/getting-started , and everything works fine except when trying to access the Flags Explorer section of the Vercel Toolbar in development. The toolbar asks for the /.well-known/vercel/flags endpoint and the NextJS server keeps returning 404.


However the endpoint exists as calling it directly actually works


All secrets and env variables are setup correctly, everything works fine once deployed aswell, features change correctly once changed in the store, its just doesnt work when testing with Flags Explorer

Flags Explorer in the vercel toolbar should recognise the endpoint for flags and behave normally. It currently says it cant find the endpoint even tho its accessible manually.

  • Setup flags in a nextjs project with app router.
  • Install vercel toolbar
  • Navigate to Falgs Explorer

NextJS with App Router

1 Like

There’s another community post with 404 debugging tips that might be helpful. Please give these solutions a try and let us know how it goes.

A human should be around soon to offer more advice. But you can also get helpful information quickly by asking v0.

Turns out it was a clerk middleware causing the issue, whitelisting teh path solves the problem ^^ Can close this thread

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.