# GrowthBook "Failed to fetch features" in CI

> Fix GrowthBook "Failed to fetch features" in CI - the SDK could not load features from the GrowthBook API host, or the client key is wrong, so all features evaluate to their defaults.

Source: https://latchkey.dev/learn/ci-integrations/growthbook-features-failed-to-load-in-ci  
Updated: 2026-06-30

The GrowthBook SDK called loadFeatures and could not retrieve the feature definitions from the API host (GrowthBook Cloud or a self-hosted instance). Either the client key or apiHost is wrong, or the host is unreachable. Until features load, every isOn / getFeatureValue returns the fallback.

## Diagnose it: did the report reach the service?

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
```

> Absolute paths in an lcov report break file mapping on the service side, so coverage appears as zero even though the upload succeeded. Generate reports with paths relative to the repository root.

## FAQ

### What causes GrowthBook "Failed to fetch features" in CI?

There are 2 common causes: the client key or apihost is wrong and the api host is unreachable from the runner. A mistyped client key, or an apiHost that does not match your GrowthBook deployment, returns 404 or the wrong payload.

### How do I fix GrowthBook "Failed to fetch features" in CI?

There are 2 fixes depending on which cause you have: set the correct apihost and client key, and await loadfeatures and provide features directly for offline tests. Work through them in order, since the first is the most common.

### What does GrowthBook "Failed to fetch features" in CI actually mean?

GrowthBook logs "Failed to fetch features" or loadFeatures rejects, and feature checks all return their default because the feature map is empty.

### How do I stop GrowthBook "Failed to fetch features" in CI happening again?

Keep the GrowthBook client key in CI secrets and set the right apiHost. The prevention section lists 3 changes that keep it from recurring.

---

Latchkey runs CI/CD that repairs its own failures. Agent entry points: https://latchkey.dev/agent.txt, https://latchkey.dev/openapi.json, https://latchkey.dev/llms.txt
