{"record":{"id":"836f36fc3d2c3218","repo":"airbnb/lottie-android","slug":"missing-values-for-keyframe-836f36","errorCode":null,"errorMessage":"Missing values for keyframe.","messagePattern":"Missing values for keyframe\\.","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"lottie/src/main/java/com/airbnb/lottie/animation/keyframe/ScaleKeyframeAnimation.java","lineNumber":19,"sourceCode":"package com.airbnb.lottie.animation.keyframe;\n\nimport com.airbnb.lottie.utils.MiscUtils;\nimport com.airbnb.lottie.value.Keyframe;\nimport com.airbnb.lottie.value.ScaleXY;\n\nimport java.util.List;\n\npublic class ScaleKeyframeAnimation extends KeyframeAnimation<ScaleXY> {\n\n  private final ScaleXY scaleXY = new ScaleXY();\n\n  public ScaleKeyframeAnimation(List<Keyframe<ScaleXY>> keyframes) {\n    super(keyframes);\n  }\n\n  @Override public ScaleXY getValue(Keyframe<ScaleXY> keyframe, float keyframeProgress) {\n    if (keyframe.startValue == null || keyframe.endValue == null) {\n      throw new IllegalStateException(\"Missing values for keyframe.\");\n    }\n    ScaleXY startTransform = keyframe.startValue;\n    ScaleXY endTransform = keyframe.endValue;\n\n    if (valueCallback != null) {\n      //noinspection ConstantConditions\n      ScaleXY value = valueCallback.getValueInternal(keyframe.startFrame, keyframe.endFrame,\n          startTransform, endTransform,\n          keyframeProgress, getLinearCurrentKeyframeProgress(), getProgress());\n      if (value != null) {\n        return value;\n      }\n    }\n\n    scaleXY.set(\n        MiscUtils.lerp(startTransform.getScaleX(), endTransform.getScaleX(), keyframeProgress),\n        MiscUtils.lerp(startTransform.getScaleY(), endTransform.getScaleY(), keyframeProgress)\n    );","sourceCodeStart":1,"sourceCodeEnd":37,"githubUrl":"https://github.com/airbnb/lottie-android/blob/05ea92e90381eb8a8ae06855ea2b74f322bebbec/lottie/src/main/java/com/airbnb/lottie/animation/keyframe/ScaleKeyframeAnimation.java#L1-L37","documentation":"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.","triggerScenarios":"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.","commonSituations":"Malformed Lottie JSON with a partially-defined scale keyframe; export glitch omitting the end scale; schema incompatibility.","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."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"lottieAnimationView.setFailureListener(t -> {\n  if (t instanceof IllegalStateException && \"Missing values for keyframe.\".equals(t.getMessage())) {\n    Log.w(TAG, \"scale keyframe missing value\", t);\n  } else throw new RuntimeException(t);\n});","preventionTips":["Verify scale keyframes have start and end scale arrays.","Re-export the animation and align the library version."],"tags":["keyframe","scale","parsing","animation"],"backgroundTag":null,"analyzedSha":"05ea92e90381eb8a8ae06855ea2b74f322bebbec","analyzedAt":"2026-08-14T00:51:35.636Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}