OpenFeature PROVIDER_NOT_READY / provider not ready in CI
By Daniel Zoghalchali·Latchkey
An OpenFeature client evaluated a flag before its provider finished initializing. OpenFeature returns the default value with reason ERROR and errorCode PROVIDER_NOT_READY. In CI this happens when evaluation races provider start-up, producing flaky results.
What this error means
Flag evaluations return the default with errorCode PROVIDER_NOT_READY, or the SDK logs that the provider is not ready. Tests depending on real flag values fail intermittently.
Coverage and quality integrations fail in two distinct places: the report was never produced, or it was produced and the upload was rejected. Establish which before touching tokens.
Terminal
# 1. does the report exist and is it non-empty?
ls -la coverage/ && head -5 coverage/lcov.info
# 2. does it reference paths the service can map to the repo?
grep "^SF:" coverage/lcov.info | head -5
# 3. did the upload actually succeed, or just not fail the step?# most uploaders exit 0 on a rejected upload unless told otherwise
Common causes
Evaluation runs before the provider initializes
setProvider returns immediately while initialization is asynchronous; evaluating before it completes yields PROVIDER_NOT_READY.
The provider failed to initialize and stayed not ready
The underlying provider (a flag vendor SDK) could not reach its backend, so it never transitioned to READY.
How to fix it
Await setProviderAndWait before evaluating
Use the blocking form so the provider reaches READY before any flag is read.
Use setProviderAndWait so providers are READY before evaluation.
Gate flag reads on the provider READY event in tests.
Use an in-memory provider in tests to make readiness deterministic.
Frequently asked questions
What causes OpenFeature PROVIDER_NOT_READY / provider not ready in CI?
There are 2 common causes: evaluation runs before the provider initializes and the provider failed to initialize and stayed not ready. setProvider returns immediately while initialization is asynchronous; evaluating before it completes yields PROVIDER_NOT_READY.
How do I fix OpenFeature PROVIDER_NOT_READY / provider not ready in CI?
There are 2 fixes depending on which cause you have: await setproviderandwait before evaluating and handle provider events for readiness. Work through them in order, since the first is the most common.
What does OpenFeature PROVIDER_NOT_READY / provider not ready in CI actually mean?
Flag evaluations return the default with errorCode PROVIDER_NOT_READY, or the SDK logs that the provider is not ready.
How do I stop OpenFeature PROVIDER_NOT_READY / provider not ready in CI happening again?
Use setProviderAndWait so providers are READY before evaluation. The prevention section lists 3 changes that keep it from recurring.