{"record":{"id":"0c36374194ab3d0d","repo":"microg/GmsCore","slug":"asset-digest-cannot-be-null","errorCode":null,"errorMessage":"Asset digest cannot be null","messagePattern":"Asset digest cannot be null","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"play-services-wearable/src/main/java/com/google/android/gms/wearable/Asset.java","lineNumber":86,"sourceCode":"    }\n\n    /**\n     * Creates an Asset using a file descriptor. The FD should be closed after being successfully\n     * sent in a putDataItem request.\n     */\n    public static Asset createFromFd(ParcelFileDescriptor fd) {\n        if (fd == null) {\n            throw new IllegalArgumentException(\"Asset fd cannot be null\");\n        }\n        return new Asset(null, null, fd, null);\n    }\n\n    /**\n     * Create an Asset using an existing Asset's digest.\n     */\n    public static Asset createFromRef(String digest) {\n        if (digest == null) {\n            throw new IllegalArgumentException(\"Asset digest cannot be null\");\n        }\n        return new Asset(null, digest, null, null);\n    }\n\n    /**\n     * Creates an Asset using a content URI. Google Play services must have permission to read this\n     * Uri.\n     */\n    public static Asset createFromUri(Uri uri) {\n        return null;\n    }\n\n    /**\n     * @return the digest associated with the asset data. A digest is a content identifier used to\n     * identify the asset across devices.\n     */\n    public String getDigest() {\n        return digest;","sourceCodeStart":68,"sourceCodeEnd":104,"githubUrl":"https://github.com/microg/GmsCore/blob/157c9d86ac46c195a86c2f15ab55c84036223f95/play-services-wearable/src/main/java/com/google/android/gms/wearable/Asset.java#L68-L104","documentation":"Null-check on the sole parameter of Asset.createFromRef. This factory creates an Asset that references an already-stored asset solely by its digest string, so the digest is the asset's only identity; passing null leaves the reference meaningless and the factory throws IllegalArgumentException to reject it.","triggerScenarios":"Thrown at play-services-wearable/src/main/java/com/google/android/gms/wearable/Asset.java:86 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass the non-null digest obtained from a previously sent Asset","Re-create the asset from bytes/fd when no digest is known"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"157c9d86ac46c195a86c2f15ab55c84036223f95","analyzedAt":"2026-09-06T17:27:33.892Z","contentChangedAt":"2026-09-06T17:27:33.892Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}