microg/GmsCore · error · IllegalArgumentException

ValidateAccountRequest not supported

Error message

ValidateAccountRequest not supported

What it means

The default AbstractGmsServiceBroker.validateAccount() implementation unconditionally throws IllegalArgumentException 'ValidateAccountRequest not supported'. Only brokers that explicitly override validateAccount can handle these requests; for all others the IPC call is rejected.

Source

Thrown at play-services-base/core/src/main/java/org/microg/gms/AbstractGmsServiceBroker.java:267

        return scopes;
    }

    @Override
    public void getService(IGmsCallbacks callback, GetServiceRequest request) throws RemoteException {
        GmsService gmsService = GmsService.byServiceId(request.serviceId);
        if ((supportedServices.contains(gmsService)) || supportedServices.contains(GmsService.ANY)) {
            handleServiceRequest(callback, request, gmsService);
        } else {
            Log.d(TAG, "Service not supported: " + request);
            throw new IllegalArgumentException("Service not supported: " + request.serviceId);
        }
    }

    public abstract void handleServiceRequest(IGmsCallbacks callback, GetServiceRequest request, GmsService service) throws RemoteException;

    @Override
    public void validateAccount(IGmsCallbacks callback, ValidateAccountRequest request) throws RemoteException {
        throw new IllegalArgumentException("ValidateAccountRequest not supported");
    }

    @Override
    public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException {
        if (super.onTransact(code, data, reply, flags)) return true;
        Log.d(TAG, "onTransact [unknown]: " + code + ", " + data + ", " + flags);
        return false;
    }
}

View on GitHub (pinned to 157c9d86ac)

Solutions

  1. Override validateAccount in the concrete broker subclass if account validation should be supported.
  2. On the client side, detect that validation isn't supported and fall back to a flow that doesn't require validateAccount (e.g. rely on getService/auth calls directly).
  3. Update microG to a version whose relevant broker implements validateAccount.

Example fix

// before
class MyBroker extends AbstractGmsServiceBroker { /* no validateAccount override */ }
// after
class MyBroker extends AbstractGmsServiceBroker {
    @Override
    public void validateAccount(IGmsCallbacks callback, ValidateAccountRequest request) throws RemoteException {
        handleValidate(callback, request); // custom implementation
    }
}
Defensive patterns

Strategy: try-catch

Validate before calling

// client-side: only call validateAccount if the bound broker advertises support
boolean supportsValidateAccount = brokerDescription != null && brokerSupports(brokerDescription, "validateAccount");

Try / catch

try { broker.validateAccount(callback, request); } catch (IllegalArgumentException e) { fallbackToNonValidatingFlow(); }

Prevention

When it happens

Trigger: A client calls validateAccount() on a broker that has not overridden it — e.g. binding to a service broker that supports getService but not account validation.

Common situations: Client code assumes the target GMS service supports account validation (used by some auth flows) but is bound to a broker (or microG service version) that doesn't implement it; version drift between client library expectations and microG implementation.

Related errors


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