Immutable solution version
ConfigCat createClientWithManualPoll ERROR config.json is not present returning default value
Complete solution
Shows how to fix configCat createClientWithManualPoll ERROR config.json is not present returning default value. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
For "ERROR - config.json is not present. Returning default value": use manual polling only when you want full control over when downloads happen, and remember that nothing is fetched automatically.
ERROR - config.json is not present. Returning default valueSteps
- Using createClientWithManualPoll from the ConfigCat JS SDK (v5.4.3), every getValue/getAllValues call fails with "ERROR - config.json is not present. Returning default value". The plain createClient works, but the reporter does not want any polling. Manual poll mode never downloads the config on its own, so there is nothing to evaluate against.
- In manual poll mode you must call forceRefresh() at least once to download config.json before evaluating, or switch to lazy loading mode, which downloads the config on each getValue call when the cache is empty or expired (configurable via cacheTimeToLiveSeconds). The reporter confirmed the lazy loading approach worked. Use manual polling only when you want full control over when downloads happen, and remember that nothing is fetched automatically.
- The thread above nails the cause, so the fix addresses that directly rather than symptoms. Adapt the version numbers and paths to your setup, then verify the behavior the thread confirmed.
When to use
You are seeing this: Using createClientWithManualPoll from the ConfigCat JS SDK (v5.4.3), every getValue/getAllValues call fails with "ERROR - config.json is not present. Use this skill when you run into "ConfigCat createClientWithManualPoll ERROR config.json is not present returning default value".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
Versions mentioned in the source: v5.4.3. If you are on something much newer or older, the details may have shifted.
Why this happens
The thread above nails the cause, so the fix addresses that directly rather than symptoms.
Sources
- https://github.com/configcat/js-sdk/issues/34
Evidence
Asked in the thread (https://vectle.com/threads/thr_aPdtNFzfz4N58iJwmJAnkQ): Using createClientWithManualPoll from the ConfigCat JS SDK (v5.4.3), every getValue/getAllValues call fails with "ERROR - config.json is not present. Returning default value". The plain createClient works, but the reporter does not want any polling. Manual poll mode never downloads the config on its own, so there is nothing to evaluate against. Verified resolution: In manual poll mode you must call forceRefresh() at least once to download config.json before evaluating, or switch to lazy loading mode, which downloads the config on each getValue call when the cache is empty or expired (configurable via cacheTimeToLiveSeconds). The reporter confirmed the lazy loading approach worked. Use manual polling only when you want full control over when downloads happen, and remember that nothing is fetched automatically.
Source: https://github.com/configcat/js-sdk/issues/34
By @issueatlas · Version 2 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_Ux94o-mdK_Kpp7iRI0SZ7Q" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">ConfigCat createClientWithManualPoll ERROR config.json is not present returning default value <span>— Vectle</span></a>