Skip to main content
This guide covers common issues you might encounter when embedding DataBrain and how to resolve them.

Quick Diagnostics Checklist

Before diving into specific issues, run through this checklist:
1

Check Browser Console

Open Developer Tools (F12) and look for errors in the Console tab
2

Verify Network Requests

Check the Network tab for failed API calls or 401/403 errors
3

Validate Token

Ensure your guest token is valid and not expired
4

Confirm IDs

Double-check dashboard-id and metric-id values
5

Test with Sample

Try the sample token/dashboard to isolate the issue

Common Issues

Dashboard Not Rendering

Symptoms:
  • Empty space where dashboard should be
  • No errors in console
  • Component seems to load but shows nothing
Solutions:
  1. Ensure plugin is imported before rendering:
  1. Check for web component support:
  1. Verify container has height:
  1. Check z-index conflicts:
Symptoms:
  • Dashboard appears briefly then vanishes
  • May happen on route changes or re-renders
Solutions:
  1. React: Prevent re-renders destroying the component:
  1. Vue: Use v-show instead of v-if:
  1. Check for parent component unmounting: Add key prop to prevent recreation
Symptoms:
  • Loading spinner never stops
  • Dashboard never renders
Causes & Solutions:
  1. Invalid token:
  1. Wrong dashboard ID:
  1. Network blocked:
  • Check browser extensions (ad blockers, privacy tools)
  • Verify no corporate firewall blocking
  • Check CORS settings

Authentication & Token Errors

Each token error string has exactly one meaning: INVALID_TOKEN = token not found in this deployment (usually a cloud vs self-hosted mismatch, or the embed isn’t receiving the minted value); TOKEN_EXPIRED = past its expiryTime; UNAUTHORIZED_ORIGIN = origin not on Whitelist Domains; UNAUTHORIZED = the token isn’t allowed this request — allowedEmbeds miss, wrong Data App/workspace, or (for dashboard-filter/view requests) that permission isn’t enabled. Guest tokens are database-backed UUIDs — there is no signing secret. Full table: Error Codes Reference.
Symptoms:
  • Error: “API key is invalid or expired”
  • 401 status in network tab
Solutions:
  1. Verify API token is correct:
  1. Ensure Bearer prefix:
  1. Regenerate API token:
  • Go to Data App settings
  • Generate new API token
  • Update environment variables
Symptoms:
  • “Token has expired” message
  • Dashboard stops working after some time
Solutions:
  1. Set appropriate expiry time:
  1. Implement token refresh:
  1. Handle token expiry event:
Symptoms:
  • “Access to fetch blocked by CORS policy”
  • Cross-origin errors in console
Solutions:
  1. Generate tokens from backend (not frontend):
  1. Whitelist your domain:
  • Go to your Data App’s settings → Whitelist Domains (the input field there is labeled “Allowed Origins” — same setting)
  • Add your domains as scheme-less host[:port] entries, e.g. app.yoursite.com or localhost:3000 — do not include http:// or https://
  • Wildcards like *.yoursite.com are supported
  • Include all environments (dev, staging, prod)
  • Note: the whitelist applies account-wide — the same list covers all your Data Apps
  1. Check for mixed content (HTTP/HTTPS):

Display & Styling Issues

Symptoms:
  • Dashboard hidden behind other elements
  • Modals or dropdowns don’t appear correctly
Solutions:
  1. Set appropriate z-index:
  1. Check parent container:
  1. Use isolation:
Symptoms:
  • Dashboard doesn’t fit screen
  • Charts overlap on mobile
  • Scrolling issues
Solutions:
  1. Ensure container is responsive:
  1. Set viewport meta tag:
  1. Use responsive theme:
Symptoms:
  • Custom colors not showing
  • Font changes not working
  • Theme options ignored
Solutions:
  1. Stringify theme object:
  1. Check theme structure:
  1. Verify CSS specificity:

Performance Issues

Symptoms:
  • Dashboard takes long to load
  • Metrics render slowly
  • Poor performance with large datasets
Solutions:
  1. Enable caching in workspace settings:
  • Go to Workspace Settings → Cache Settings
  • Enable query result caching
  • Set an appropriate TTL (start with 3600 seconds / 1 hour)
  • Choose DataBrain Caching for quick setup, or BYOC if you have your own Redis
  • See the Cache Settings guide for detailed setup
  1. Apply filters to limit data:
  1. Optimize metrics:
  • Reduce number of data points
  • Use aggregations
  • Limit table rows
  • Consider pagination
  1. Lazy load dashboards:
Symptoms:
  • Page slows down over time
  • Browser tab crashes
  • Increasing memory usage
Solutions:
  1. Clean up on unmount:
  1. Remove event listeners:
  1. Limit re-renders:

Cache & Redis Issues

Symptoms:
  • Dashboard shows old data after an ETL run or manual data update
  • Different users see inconsistent data
Solutions:
  1. Reset cache after data updates:
  • Go to Workspace Settings → Cache Settings and click Reset Cache
  • This flushes all cached query results for the workspace
  1. Reduce cache TTL:
  • If your data updates frequently, lower the cache expiration time
  • For hourly updates, set TTL to 3600 (1 hour) or less
  1. Verify cache is the cause:
  • Temporarily disable caching in Workspace Settings → Cache Settings
  • If the data is now correct, caching was serving stale results
Symptoms:
  • Cache settings fail to save with “Invalid Redis credentials” error
  • Caching enabled but no speed improvement on repeat dashboard loads
Solutions:
  1. Check network connectivity:
  • Your Redis must be reachable from DataBrain’s cloud
  • Verify your security group allows inbound on the Redis port (default 6379) from DataBrain’s IP (see Allow Access to our IP)
  • If your Redis is in a private network, contact DataBrain support for connectivity options
  1. Verify credentials:
  • Double-check the host, port, and AUTH token
  • Ensure the AUTH token matches what’s configured on your Redis instance
  • Try connecting to your Redis from another client to rule out credential issues
  1. Check Redis is running:
  • Ensure your Redis/Elasticache instance is in an “Available” state
  • Check for maintenance windows or failover events
  1. Connection timeout:
  • DataBrain uses a 5-second connection timeout
  • If your Redis has high network latency (e.g., cross-region), connections may time out
Symptoms:
  • Caching is enabled but dashboards aren’t loading faster
  • Every request seems to hit the database
Solutions:
  1. Verify caching is enabled:
  • Go to Workspace Settings → Cache Settings and confirm the toggle is on
  • Confirm you’ve set a TTL greater than 0
  1. Check cache mode:
  • If using Databrain Caching, it should work automatically
  • If using BYOC, verify your Redis connection was validated successfully (save must succeed)
  1. Understand cache key behavior:
  • Cache keys include the full query, filters, workspace ID, and datasource ID
  • Changing any filter or parameter generates a new cache key
  • Dashboards with many dynamic filters may have lower cache hit rates
  1. Check TTL is reasonable:
  • Very short TTLs (e.g., 10 seconds) mean cache entries expire before they can be reused
  • Start with 3600 (1 hour) and adjust based on your needs

Framework-Specific Issues

Issue: Component not updating on prop changes
Issue: TypeScript errors
Issue: Next.js SSR errors

Debugging Tips

Inspect Component State

Monitor Network Requests

Error Messages Reference

For the complete list of error codes with causes and fixes, see the Error Codes Reference.

Getting Help

If you’re still stuck after trying these solutions:

Test Harness

Use our test environment to isolate issues

Sample Implementation

Check working examples in playground

API Documentation

Review complete API specs

Support

Contact our support team

Best Practices to Avoid Issues

Never expose API tokens in frontend code. Use your backend to generate guest tokens.
Always handle token generation failures and network errors gracefully.
Type safety helps catch issues during development.
Verify your implementation works in Chrome, Firefox, Safari, and Edge.
Set up error tracking (Sentry, LogRocket) to catch issues early.