Affected: All SDKs
Symptoms
The SDK appears to initialize successfully using an SDK key that is not associated with any environment. Although the key should be invalid, the SDK still connects without errors.
Cause
This issue can happen under the following conditions:
The SDK key is associated with a trial account
Trial accounts are standalone and not associated with your organization's account. As a result, SDK keys from these accounts could still be active.
The SDK is connected to a Relay Proxy
When the Relay Proxy is manually configured, it may continue to serve SDKs with invalid or unrecognized keys. The stream remains active until the Relay Proxy receives a 401
error, at which point it disconnects.
This behavior does not occur when using automatic configuration, which is available only to customers on select plans. Automatic configuration validates and manages environments directly from your LaunchDarkly account, helping to prevent the serving of stale or invalid SDK keys.
Solution
The SDK key is associated with a trial account
Trial accounts are independent from your organization's LaunchDarkly account. SDK keys generated in these trial accounts could still be technically active. As a result, SDKs using these keys can appear to initialize successfully.
If the trial account is no longer in use, you can delete it. Deleting permanently removes all account data, including SDK keys. To learn more, read Delete trial accounts.
If you are unable to identify the trial account:
- Check with your team to see if anyone previously created a personal trial account that may be using the SDK key.
- Contact Support to verify the key’s ownership and determine the next steps.
The Relay Proxy is connected
If the Relay Proxy is running with a manual configuration, it may maintain active connections to SDKs using an SDK key that has become invalid.
Eventually, the Relay Proxy attempts to reconnect and receives a 401
error from LaunchDarkly. At that point, it shuts down the stream and stops forwarding data. Until then, SDKs using the key may appear to work normally, even though the key is invalid.
To stop this behavior:
-
Restart the Relay Proxy.
Restarting clears any cached configurations. If the SDK key is no longer valid, the Relay Proxy will fail to initialize the environment and stop serving data for that key. -
Use automatic configuration if possible.
If your organization is on a plan that supports this, consider using automatic configuration instead of manual configuration. Automatic configuration ensures your environments are always in sync with LaunchDarkly, preventing this kind of stale connection behavior.