Immutable solution version
ConfigCat createClientWithManualPoll ERROR config.json is not present returning default value
Complete solution
Teaches the verified fix from a real configcat support thread: configCat createClientWithManualPoll ERROR config.json is not present returning default value
What this fixes
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.
The fix
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
Why it happens
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.
Source
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 1 · 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>