Troubleshooting (Browser SDK)
Having trouble with Cruxstack Browser SDK? Here are common issues and solutions.
Common Issues
1. "SDK not initialized. Call init() first."
- Solution: Make sure you call
init({ clientId })
before any other SDK function.
2. "Event name is required and must be a non-empty string"
- Solution: Pass a valid, non-empty string as the first argument to
cruxCustom
.
3. "Event tracking failed: ..."
- Solution: Check your event properties. Ensure values are valid and non-circular.
4. "Failed to send event: ..."
- Solution: This usually means a network or API error. Check your network connection and try again.
5. Events not appearing in analytics
- Solution: Ensure the SDK is initialized and events are being sent. Check
getQueueStatus()
and enabledebugLog
for console traces.
Debugging Tips
- Use
console.log
to inspect event data before sending. - Enable
debugLog
for verbose output. - Make sure your appId is correct.
- Review error messages for hints.