Skip to content

FlagDiligence docs

Troubleshooting

Work through the checklist that matches what you see.

Flags return the default value

  • Is the SDK key correct, and is it for the same environment you are looking at?
  • Is the flag on in that environment?
  • For the Node.js SDK, did you await client.init() before evaluating?
  • Is baseUrl set? It defaults to http://localhost:3000.
  • Does the flag key match exactly, including case and underscores?

A user sees the wrong variation

  • Does the user object include the attributes your rule checks, such as custom.plan?
  • Check rule order. The lowest priority number is checked first and the first match wins.
  • Use variationDetail to see the reason (RULE_MATCH, FALLTHROUGH, OFF).
  • Check the audit log for a recent change.

Changes do not arrive quickly

  • Is mode set to streaming? In static mode, flags are read once.
  • Is a proxy or load balancer blocking or buffering server-sent events? If so, use polling.
  • In polling mode, remember the interval: changes appear at the next check.

The same user gets different values

  • Is user.key the same every time? A random or changing key moves the user between rollout buckets.
  • Are you creating the user before it has loaded, so the first evaluation uses an anonymous user?
  • Do two rules overlap? Check their priorities.

Browser shows network or CORS errors

  • Check that the client key and baseUrl are right.
  • Check that your FlagDiligence server allows your site’s origin.

Messages you may see

MessageLikely causeWhat to do
Invalid SDK keyWrong or regenerated keyCopy the current key from the environment settings.
Flag not foundKey does not exist in this environmentCheck the spelling and the environment.
UnauthorizedKey not acceptedCheck the key type and environment.
Network errorServer not reachableCheck <code>baseUrl</code> and your network.
No `mode` specifiedThe SDK was started without a modePass mode: "streaming", "polling" or "static".

← React SDK

Need help with FlagDiligence?

Open the app, or tell us what you are trying to do.