-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Describe the bug
We encountered an issue in our production services - after a few days, suddenly the ConfigCat client gets out of sync and
returns old values when calling getValueAsync or getAllValues. When it happens, the client will no longer gets the updated values. There are also no logs when this happens.
We initialize the client as a singleton, and use the default auto polling.
I also talked about this issue couple of weeks ago here configcat/common-js#36 (comment)
Will appreciate your quick help, since this is effecting our production environment.
To reproduce
Reproducing this issue is hard, because it happens after a few days the service is running. Suddenly it gets out of sync, and doesn't get updated values.
Expected behavior
Get the updated values when calling getValueAsync or getAllValues.
SDK version
6.7.1
SDK configuration
Initialization:
let client;
function initialize({ sdkKey }) {
try {
client = configcat.createClient(sdkKey);
} catch (e) {
throw new Error('Failed initializing the configcat feature control.');
}
}
function getClient() {
if (!client) {
throw new Error('client is not initialized yet.');
}
return client;
}Usage:
const client = getClient();
const user = { ... };
const value = await client.getValueAsync(key, false, user);Logs
None
Language/Framework version
NodeJs 16.13.1