microg/GmsCore · error · IllegalArgumentException

Asset digest cannot be null

Error message

Asset digest cannot be null

What it means

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.

Source

Thrown at play-services-wearable/src/main/java/com/google/android/gms/wearable/Asset.java:86

    }

    /**
     * Creates an Asset using a file descriptor. The FD should be closed after being successfully
     * sent in a putDataItem request.
     */
    public static Asset createFromFd(ParcelFileDescriptor fd) {
        if (fd == null) {
            throw new IllegalArgumentException("Asset fd cannot be null");
        }
        return new Asset(null, null, fd, null);
    }

    /**
     * Create an Asset using an existing Asset's digest.
     */
    public static Asset createFromRef(String digest) {
        if (digest == null) {
            throw new IllegalArgumentException("Asset digest cannot be null");
        }
        return new Asset(null, digest, null, null);
    }

    /**
     * Creates an Asset using a content URI. Google Play services must have permission to read this
     * Uri.
     */
    public static Asset createFromUri(Uri uri) {
        return null;
    }

    /**
     * @return the digest associated with the asset data. A digest is a content identifier used to
     * identify the asset across devices.
     */
    public String getDigest() {
        return digest;

View on GitHub (pinned to 157c9d86ac)

Solutions

  1. Pass the non-null digest obtained from a previously sent Asset
  2. Re-create the asset from bytes/fd when no digest is known
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at play-services-wearable/src/main/java/com/google/android/gms/wearable/Asset.java:86 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of microg/GmsCore@157c9d86ac (2026-09-06). Data as JSON: /api/errors/0c36374194ab3d0d. Report an issue: GitHub.