Skip to main content

Common Issues

Quick solutions to the most frequently reported problems across all SDKs.

Feature Flag Not Evaluating​

Symptoms​

  • Flag always returns false or default value
  • Changes in dashboard don't reflect in application
  • All flags return the same value

Solutions​

1. Verify Feature Flag Configuration​

Check in the Toggly dashboard:

  • Is the feature flag enabled?
  • Is it enabled in the correct environment?
  • Are there targeting rules that might exclude your user?

2. Check SDK Initialization​

Ensure you're initializing the SDK before evaluating flags:

// ❌ Wrong - using SDK before initialization
const isEnabled = toggly.isEnabled('my-feature');
await toggly.init();

// ✅ Correct - wait for initialization
await toggly.init();
const isEnabled = toggly.isEnabled('my-feature');

3. Verify API Keys​

// Check your environment variables
console.log('App Key:', process.env.TOGGLY_APP_KEY);
console.log('Environment:', process.env.TOGGLY_ENVIRONMENT);

// Verify they match what's in your Toggly dashboard

4. Check User Context​

If using targeting rules, ensure you're passing user context:

// ❌ No context - targeting rules won't work
const result = toggly.isEnabled('premium-feature');

// ✅ With context - targeting can evaluate properly
const context = {
userId: 'user-123',
traits: {
plan: 'premium',
}
};
const result = toggly.isEnabled('premium-feature', context);

SDK-Specific Guidance:


Changes Not Reflecting​

Symptoms​

  • Updated feature flag settings in dashboard
  • Changes don't appear in your application
  • Old values persist

Solutions​

1. Check Cache​

Most SDKs cache definitions for performance. Wait for cache TTL or force refresh:

// Force refresh definitions
await toggly.refresh();

2. Verify Environment​

Ensure you're testing in the correct environment:

  • Are you in Development but testing Production flags?
  • Check environment key matches dashboard

3. Clear Local Storage/Cache​

Some SDKs cache in browser storage:

// Browser
localStorage.clear();
sessionStorage.clear();

// Then reload
window.location.reload();

SDK Not Connecting​

Symptoms​

  • Network errors
  • Timeout errors
  • "Failed to fetch definitions" errors

Solutions​

See Network & CORS Issues for detailed solutions.

Quick Checks:

  1. Verify internet connectivity
  2. Check firewall/proxy settings
  3. Verify base URL is correct
  4. Check browser console for CORS errors

Targeting Rules Not Working​

Symptoms​

  • Rule should match user but doesn't
  • All users get same result regardless of traits
  • Percentage rollout seems wrong

Solutions​

1. Verify User Context Format​

// ✅ Correct format
const context = {
userId: 'user-123', // Required for consistent evaluation
traits: {
plan: 'premium',
country: 'US'
}
};

2. Check Rule Operators​

Common mistakes:

  • Using equals instead of contains for arrays
  • Case sensitivity in string comparisons
  • Number vs string type mismatches

3. Test in Dashboard​

Use the flag's "Test Evaluation" feature:

  1. Go to feature flag
  2. Click "Test"
  3. Enter user context
  4. See evaluation result and rule matching

Performance Issues​

Symptoms​

  • Slow flag evaluations
  • High latency
  • Application feels sluggish

Solutions​

Quick Fixes:

  1. Enable local caching
  2. Use batch evaluation when checking multiple flags
  3. Initialize SDK once, reuse instance
  4. Check network latency

Browser Extension Not Working​

Symptoms​

  • Extension doesn't load
  • Can't see feature flags
  • Not authenticated

Solutions​

See Chrome Plugin Documentation for setup instructions.

Quick Fixes:

  1. Verify you're signed in at app.toggly.io
  2. Reload the extension
  3. Check extension permissions
  4. Clear extension storage and sign in again

Getting More Help​

If you're still experiencing issues:

  1. Enable Debug Logging - Most SDKs have a debug mode
  2. Check Our Status - Visit status.toggly.io
  3. Search Documentation - Use the search bar to find specific solutions
  4. Ask the Community - Post on GitHub Discussions
  5. Contact Support - Email [email protected] (paid plans)