microg/GmsCore · error · IllegalArgumentException

Service not supported:

Error message

Service not supported: 

What it means

AbstractGmsServiceBroker.getService() looks up the requested service by ID and throws IllegalArgumentException 'Service not supported: <id>' when the concrete broker's supportedServices set contains neither the requested GmsService nor ANY. This is microG's way of rejecting binding requests for GMS services a broker implementation does not provide.

Source

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

        getService(callback, request);
    }

    private Scope[] scopesFromStringArray(String[] arr) {
        Scope[] scopes = new Scope[arr.length];
        for (int i = 0; i < arr.length; i++) {
            scopes[i] = new Scope(arr[i]);
        }
        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. Check which serviceId is rejected and ensure the broker subclass includes that GmsService in its supportedServices set (or GmsService.ANY).
  2. Update microG/GmsCore to a version that supports the requested service.
  3. On the client side, catch the exception / handle the null or failure binding and degrade gracefully or verify the service exists before binding.

Example fix

// before (custom broker)
public MyBroker() { super(Arrays.asList(GmsService.GAMES)); }
// after
public MyBroker() { super(Arrays.asList(GmsService.GAMES, GmsService.PLUS, GmsService.ACCOUNT)); }
Defensive patterns

Strategy: try-catch

Validate before calling

GmsService svc = GmsService.byServiceId(request.serviceId);
if (!supportedServices.contains(svc) && !supportedServices.contains(GmsService.ANY)) { log.warn("Service unsupported: " + svc); }

Try / catch

try { broker.getService(callback, request); } catch (IllegalArgumentException e) { handleUnsupportedService(request.serviceId, e); }

Prevention

When it happens

Trigger: A client binds and calls getService with a serviceId (e.g. from play-services version X) that the broker subclass was not constructed with; broker instance created with a narrow GmsServices set while the app requests a broader service.

Common situations: App updated to a newer Google Play services client library requesting a service the installed microG build/broker doesn't expose; misconfigured microG where a signature/spoofed-package broker lacks the service mapping; custom broker subclass missing the service in its constructor's supported set.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


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