Troubleshooting
Use this page to quickly identify why a flag result is different from what you expect.
Fast Diagnostic Checklist
Run these in order before deeper debugging:
- Confirm the SDK key is from the correct project.
- Confirm the evaluated environment is correct (
developmentvsproduction). - Confirm the flag key matches exactly (case-sensitive).
- Confirm fallback values are set in code.
- Confirm targeting rules actually match the runtime context.
Symptom -> Likely Cause -> Fix
| Symptom | Likely cause | Fix |
|---|---|---|
Flag always false | Wrong flag key or missing fallback | Verify key spelling and features config |
| Rule works for some users only | Missing userId or context mismatch | Log context payload before evaluation |
| ”Unauthorized” | Invalid key type or copied with whitespace | Re-copy key from project settings |
| Dashboard changed but app did not | Environment mismatch or client cache | Verify environment, refresh, re-fetch |
| Server/client results differ | Different keys or context inputs | Compare key, env, and context side by side |
Validate Runtime Context
Targeting is only as accurate as the context you send.
const context = {
userId: user.id,
email: user.email,
plan: user.plan,
country: user.country,
}
console.log('supaship-context', context)
const value = await client.getFeature('new-navigation', { context })Checklist:
userIdis stable across sessions- data types match rule expectations (
"123"vs123) - attributes used in rules are always present
Common Configuration Mistakes
1) Wrong environment
Your code may evaluate in development while dashboard edits are in
production.
const client = new SupashipClient({
sdkKey: process.env.NEXT_PUBLIC_SUPASHIP_SDK_KEY,
environment:
process.env.NODE_ENV === 'production' ? 'production' : 'development',
features: { 'new-navigation': false },
})2) Missing or incorrect fallback
Always define expected local fallback values to avoid ambiguous behavior during network delays or setup issues.
3) Key type mismatch
- Client apps: use
-clientkey - Backend services: use
-serverkey
Rollout Debug Playbook
When a rollout behaves unexpectedly:
- Freeze rollout percentage (do not continue ramp-up).
- Export the exact rule set used in production.
- Compare expected vs actual context samples.
- Test with two known users: one should match, one should not.
- Re-enable rollout only after deterministic test results.
Performance and Reliability Tips
- Batch evaluations when possible.
- Avoid evaluating flags repeatedly for the same context in a single render path.
- Keep context payload lean and stable.
- Add telemetry around evaluation duration and error rates.
Still Stuck?
Include this info when contacting support:
- project name
- environment
- flag key
- sanitized context example
- expected result vs actual result
- timestamp and timezone
Contact: support@supaship.com
Last updated on