microg/GmsCore · error · IllegalArgumentException

Request ID not set.

Error message

Request ID not set.

What it means

Geofence.Builder.build() assembles the Geofence and validates all required fields; it throws IllegalArgumentException when setRequestId(String) was never called, so the request ID is missing. This guard is part of build()'s completeness validation of required parameters.

Solutions

  1. Call setRequestId(...) before build()
  2. Default the request id to a stable app-defined identifier when none is supplied
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at play-services-location/src/main/java/com/google/android/gms/location/Geofence.java:112 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/e680b43aa2065217. Report an issue: GitHub.

Appendix: source

Thrown at play-services-location/src/main/java/com/google/android/gms/location/Geofence.java:112

    class Builder {
        private int regionType = -1;
        private double latitude;
        private double longitude;
        private float radius;
        private long expirationTime = Long.MIN_VALUE;
        private int loiteringDelay = -1;
        private int notificationResponsiveness;
        private String requestId;
        private @TransitionTypes int transitionTypes;

        /**
         * Creates a geofence object.
         *
         * @throws IllegalArgumentException if any parameters are not set or out of range
         */
        public Geofence build() throws IllegalArgumentException {
            if (requestId == null) {
                throw new IllegalArgumentException("Request ID not set.");
            } else if (transitionTypes == 0) {
                throw new IllegalArgumentException("Transition types not set.");
            } else if ((transitionTypes & GEOFENCE_TRANSITION_DWELL) > 0 && loiteringDelay < 0) {
                throw new IllegalArgumentException("Non-negative loitering delay needs to be set when transition types include GEOFENCE_TRANSITION_DWELLING.");
            } else if (expirationTime == Long.MIN_VALUE) {
                throw new IllegalArgumentException("Expiration not set.");
            } else if (regionType == -1) {
                throw new IllegalArgumentException("Geofence region not set.");
            } else if (notificationResponsiveness < 0) {
                throw new IllegalArgumentException("Notification responsiveness should be nonnegative.");
            } else {
                return new ParcelableGeofence(requestId, expirationTime, regionType, latitude, longitude, radius, transitionTypes, notificationResponsiveness, loiteringDelay);
            }
        }

        /**
         * Sets the region of this geofence. The geofence represents a circular area on a flat, horizontal plane.
         *

View on GitHub (pinned to 157c9d86ac)