airbnb/lottie-android · error · IllegalStateException
Missing values for keyframe.
Error message
Missing values for keyframe.
What it means
Thrown by ScaleKeyframeAnimation#getValue when a keyframe's startValue or endValue is null. Scale (ScaleXY) interpolation needs two scale endpoints; a null endpoint means the scale keyframe is missing a value.
Source
Thrown at lottie/src/main/java/com/airbnb/lottie/animation/keyframe/ScaleKeyframeAnimation.java:19
package com.airbnb.lottie.animation.keyframe;
import com.airbnb.lottie.utils.MiscUtils;
import com.airbnb.lottie.value.Keyframe;
import com.airbnb.lottie.value.ScaleXY;
import java.util.List;
public class ScaleKeyframeAnimation extends KeyframeAnimation<ScaleXY> {
private final ScaleXY scaleXY = new ScaleXY();
public ScaleKeyframeAnimation(List<Keyframe<ScaleXY>> keyframes) {
super(keyframes);
}
@Override public ScaleXY getValue(Keyframe<ScaleXY> keyframe, float keyframeProgress) {
if (keyframe.startValue == null || keyframe.endValue == null) {
throw new IllegalStateException("Missing values for keyframe.");
}
ScaleXY startTransform = keyframe.startValue;
ScaleXY endTransform = keyframe.endValue;
if (valueCallback != null) {
//noinspection ConstantConditions
ScaleXY value = valueCallback.getValueInternal(keyframe.startFrame, keyframe.endFrame,
startTransform, endTransform,
keyframeProgress, getLinearCurrentKeyframeProgress(), getProgress());
if (value != null) {
return value;
}
}
scaleXY.set(
MiscUtils.lerp(startTransform.getScaleX(), endTransform.getScaleX(), keyframeProgress),
MiscUtils.lerp(startTransform.getScaleY(), endTransform.getScaleY(), keyframeProgress)
);View on GitHub (pinned to 05ea92e903)
Solutions
- Inspect the JSON scale keyframe and confirm both "s" and "e" scale values are present.
- Re-export the animation.
- Align lottie-android with the file's schema.
- Simplify the scale animation.
Defensive patterns
Strategy: try-catch
Try / catch
lottieAnimationView.setFailureListener(t -> {
if (t instanceof IllegalStateException && "Missing values for keyframe.".equals(t.getMessage())) {
Log.w(TAG, "scale keyframe missing value", t);
} else throw new RuntimeException(t);
}); Prevention
- Verify scale keyframes have start and end scale arrays.
- Re-export the animation and align the library version.
When it happens
Trigger: Evaluating a scale keyframe whose start or end ScaleXY failed to parse (missing "s"/"e" scale arrays in the JSON); the valueCallback branch is reached only after the null check passes.
Common situations: Malformed Lottie JSON with a partially-defined scale keyframe; export glitch omitting the end scale; schema incompatibility.
Related errors
- Missing values for keyframe.
- Missing values for keyframe.
- Missing values for keyframe.
- Missing values for keyframe.
- This animation does not support split dimensions!
AI-assisted analysis of airbnb/lottie-android@05ea92e903 (2026-08-14).
Data as JSON: /api/errors/836f36fc3d2c3218.
Report an issue: GitHub.