{"record":{"id":"582e7d52ca822a90","repo":"airbnb/lottie-android","slug":"missing-values-for-keyframe-582e7d","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/FloatKeyframeAnimation.java","lineNumber":23,"sourceCode":"\nimport java.util.List;\n\npublic class FloatKeyframeAnimation extends KeyframeAnimation<Float> {\n\n  public FloatKeyframeAnimation(List<Keyframe<Float>> keyframes) {\n    super(keyframes);\n  }\n\n  @Override Float getValue(Keyframe<Float> keyframe, float keyframeProgress) {\n    return getFloatValue(keyframe, keyframeProgress);\n  }\n\n  /**\n   * Optimization to avoid autoboxing.\n   */\n  float getFloatValue(Keyframe<Float> keyframe, float keyframeProgress) {\n    if (keyframe.startValue == null || keyframe.endValue == null) {\n      throw new IllegalStateException(\"Missing values for keyframe.\");\n    }\n\n    if (valueCallback != null) {\n      //noinspection ConstantConditions\n      Float value = valueCallback.getValueInternal(keyframe.startFrame, keyframe.endFrame,\n          keyframe.startValue, keyframe.endValue,\n          keyframeProgress, getLinearCurrentKeyframeProgress(), getProgress());\n      if (value != null) {\n        return value;\n      }\n    }\n\n    return MiscUtils.lerp(keyframe.getStartValueFloat(), keyframe.getEndValueFloat(), keyframeProgress);\n  }\n\n  /**\n   * Optimization to avoid autoboxing.\n   */","sourceCodeStart":5,"sourceCodeEnd":41,"githubUrl":"https://github.com/airbnb/lottie-android/blob/05ea92e90381eb8a8ae06855ea2b74f322bebbec/lottie/src/main/java/com/airbnb/lottie/animation/keyframe/FloatKeyframeAnimation.java#L5-L41","documentation":"Thrown by FloatKeyframeAnimation#getFloatValue when a keyframe's startValue or endValue is null. Float (e.g. opacity, rotation) interpolation needs two numeric endpoints; a null endpoint means the keyframe data is missing a value.","triggerScenarios":"Evaluating a float keyframe whose \"s\" or \"e\" value was not present or not parseable as a number; a keyframe object missing the end value field. The valueCallback branch is only entered after the null check, so a missing value throws before a callback could compensate.","commonSituations":"Truncated or hand-edited Lottie JSON; an export glitch producing a keyframe without an end value; schema mismatch between the file and the library.","solutions":["Inspect the JSON for the offending float keyframe and confirm both \"s\" and \"e\" numeric values are present.","Re-export the animation from After Effects.","Align the lottie-android version with the file's feature set.","Simplify the animated property to eliminate the malformed keyframe."],"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, \"malformed float keyframe\", t);\n  } else throw new RuntimeException(t);\n});","preventionTips":["Inspect the JSON for float keyframes missing \"s\" or \"e\".","Re-export the animation.","Keep lottie-android aligned with the file's schema version."],"tags":["keyframe","float","parsing","animation"],"backgroundTag":null,"analyzedSha":"05ea92e90381eb8a8ae06855ea2b74f322bebbec","analyzedAt":"2026-08-14T00:51:35.636Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}