{"record":{"id":"37d461b8b97acd76","repo":"airbnb/lottie-android","slug":"shape-data-was-missing-information","errorCode":null,"errorMessage":"Shape data was missing information.","messagePattern":"Shape data was missing information\\.","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"lottie/src/main/java/com/airbnb/lottie/parser/ShapeDataParser.java","lineNumber":68,"sourceCode":"          inTangents = JsonUtils.jsonToPoints(reader, scale);\n          break;\n        case 3:\n          outTangents = JsonUtils.jsonToPoints(reader, scale);\n          break;\n        default:\n          reader.skipName();\n          reader.skipValue();\n      }\n    }\n\n    reader.endObject();\n\n    if (reader.peek() == JsonReader.Token.END_ARRAY) {\n      reader.endArray();\n    }\n\n    if (pointsArray == null || inTangents == null || outTangents == null) {\n      throw new IllegalArgumentException(\"Shape data was missing information.\");\n    }\n\n    if (pointsArray.isEmpty()) {\n      return new ShapeData(new PointF(), false, Collections.<CubicCurveData>emptyList());\n    }\n\n    int length = pointsArray.size();\n    PointF vertex = pointsArray.get(0);\n    PointF initialPoint = vertex;\n    List<CubicCurveData> curves = new ArrayList<>(length);\n\n    for (int i = 1; i < length; i++) {\n      vertex = pointsArray.get(i);\n      PointF previousVertex = pointsArray.get(i - 1);\n      PointF cp1 = outTangents.get(i - 1);\n      PointF cp2 = inTangents.get(i);\n      PointF shapeCp1 = MiscUtils.addPoints(previousVertex, cp1);\n      PointF shapeCp2 = MiscUtils.addPoints(vertex, cp2);","sourceCodeStart":50,"sourceCodeEnd":86,"githubUrl":"https://github.com/airbnb/lottie-android/blob/05ea92e90381eb8a8ae06855ea2b74f322bebbec/lottie/src/main/java/com/airbnb/lottie/parser/ShapeDataParser.java#L50-L86","documentation":"ShapeDataParser parses a cubic-bezier shape vertex ('ks' in a shape path) from the JSON, reading three required arrays: points ('v'), in-tangents ('i'), and out-tangents ('o'). After reading the object, if any of these three arrays is still null (i.e., the JSON object was missing the field), it throws IllegalArgumentException. An empty points array is valid (returns an empty shape); only missing fields trigger this.","triggerScenarios":"A shape path object in the Lottie JSON is missing one or more of the required keys 'v' (vertices), 'i' (in-tangents), or 'o' (out-tangents). This can also occur if a key name is misspelled or if the JSON structure is corrupted so the parser's switch statement never matches the expected names.","commonSituations":"Hand-edited Lottie JSON with removed or renamed vertex/tangent arrays; corrupted animation file; animation exported by a tool that omits tangent data for certain shape types.","solutions":["Inspect the shape path object at the error location and ensure all three keys 'v', 'i', and 'o' are present with equal-length arrays.","Re-export the animation from After Effects to regenerate complete shape data.","If you control the JSON generation, validate that every shape path includes vertices, in-tangents, and out-tangents arrays."],"exampleFix":"// before — missing 'o' (out-tangents)\n{\"ty\":\"sh\",\"ks\":{\"a\":0,\"k\":{\"v\":[[0,0],[100,0]],\"i\":[[0,0],[0,0]]}}}\n\n// after — all three arrays present\n{\"ty\":\"sh\",\"ks\":{\"a\":0,\"k\":{\"v\":[[0,0],[100,0]],\"i\":[[0,0],[0,0]],\"o\":[[0,0],[0,0]]}}}","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":"LottieTask<LottieComposition> task = LottieCompositionFactory.fromAsset(context, name);\ntask.addListener(result -> { /* success */ })\n     .addFailureListener(e -> { /* missing shape data */ });","preventionTips":["Ensure every shape path in the Lottie JSON has 'v' (vertices), 'i' (in-tangents), and 'o' (out-tangents) arrays.","Validate animations with LottieFiles validator.","Re-export from After Effects to regenerate complete shape data."],"tags":["lottie","json-parsing","shape-data","missing-field","illegal-argument"],"backgroundTag":null,"analyzedSha":"05ea92e90381eb8a8ae06855ea2b74f322bebbec","analyzedAt":"2026-08-14T00:51:35.636Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}