Troubleshooting
Common errors and how to fix them
Common Errors
SDK Initialization Failed
- Cause (JS): Incorrect
sdkKeyor network issues - Cause (PHP): Incorrect
sdkKey, network issues, or no PSR-18 HTTP client installed - Solution: Verify the
sdkKeyand ensure network connectivity. If using an authenticated key, ensuresdkKeySecretis also provided. (PHP only) Install a PSR-18 HTTP client (e.g.,composer require guzzlehttp/guzzle).
No PSR-18 HTTP Client Found (PHP only)
- Cause:
php-http/discoverycannot find a PSR-18 HTTP client implementation - Error message:
No PSR-18 HTTP client found. Install one (e.g., guzzlehttp/guzzle ^7) or pass an explicit httpClient. - Solution: Install one:
composer require guzzlehttp/guzzleor any other PSR-18 compatible client.
User Context Creation Failed
- Cause (JS): Missing or invalid
userId - Cause (PHP): Missing or empty
visitorId, or SDK not initialized - Solution (JS): Ensure a valid, non-empty
userIdstring is provided tocreateContext(). - Solution (PHP): Ensure a valid, non-empty
visitorIdstring is provided tocreateContext(). Check thatisReady()returnstruebefore creating contexts.
Experience Not Found
- Cause: Incorrect
experienceKeyor experience not defined in the project - Solution: Verify the
experienceKeymatches exactly. Ensure the experience isactive(notdraftorpaused) and belongs to the correctenvironment.
Feature Not Found
- Cause: Incorrect
featureKeyor feature not linked to any experience - Solution: Verify the
featureKey. Ensure at least one active experience has a variation with afullStackFeaturechange linked to this feature.
Visitor Not Bucketed (RuleError)
- Cause: The visitor's properties or location don't match the experience's audience/location rules
- Solution (JS): Check that the
visitorPropertiesandlocationPropertiespassed to the method match the rules configured in Convert. See Rule Evaluation & Targeting for how rules are evaluated. - Solution (PHP): Check that the
visitorPropertiesandlocationPropertiesinBucketingAttributesmatch the rules configured in Convert. TheRuleErrorenum has two cases:RuleError::NoDataFound-- no matching data for the ruleRuleError::NeedMoreData-- insufficient data provided to evaluate the rule
Tracking Events Not Appearing
- Cause: Tracking is disabled, events are still queued, or the SDK key is invalid
- Solution (JS): Ensure
network.trackingis notfalsein the config. CallreleaseQueues()to flush pending events. Verify the SDK key. Check thatenableTrackingis notfalsein method attributes. - Solution (PHP): Ensure
network.trackingis notfalsein the config. CallreleaseQueues()orflush()to send pending events. Verify the SDK key. The shutdown handler should flush automatically in PHP-FPM, but in CLI scripts you may need to callflush()explicitly.
Config Validation Failed (PHP only)
- Cause: The fetched or provided project configuration is malformed
- Solution: If using static
data, verify the structure matches the Convert Serving API format. If usingsdkKey, the CDN response may be temporarily invalid -- the SDK will throw aConfigValidationException.
Updated about 1 month ago