microg/GmsCore · error · UnsupportedTransportException

Transport ${transport} not supported

Error message

Transport ${transport} not supported

What it means

Transport.fromString() maps a wire string (from the FIDO WebAuthn JSON, e.g. the transports array) onto the Transport enum, with a legacy special case for "hybrid". When no enum constant matches, it throws UnsupportedTransportException. It exists so malformed or newer-spec transport strings surface as a typed error instead of being silently dropped.

Source

Thrown at play-services-fido/src/main/java/com/google/android/gms/fido/common/Transport.java:65

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(toString());
    }

    @PublicApi(exclude = true)
    public static Transport fromString(String transport) throws UnsupportedTransportException {
        for (Transport value : values()) {
            if (value.value.equals(transport)) return value;
        }
        if (transport.equals("hybrid")) {
            return HYBRID;
        }
        throw new UnsupportedTransportException("Transport " + transport + " not supported");
    }

    @PublicApi(exclude = true)
    public static List<Transport> parseTransports(JSONArray jsonArray) throws JSONException {
        if (jsonArray == null) return null;
        Set<Transport> set = new HashSet<>();
        for (int i = 0; i < jsonArray.length(); i++) {
            String transport = jsonArray.getString(i);
            if (transport != null && !transport.isEmpty()) {
                try {
                    set.add(fromString(transport));
                } catch (UnsupportedTransportException e) {
                    Log.w("Transport", "Ignoring unrecognized transport " + transport);
                }
            }
        }
        return new ArrayList<>(set);
    }

View on GitHub (pinned to 157c9d86ac)

Solutions

  1. Update microG / play-services-fido to a version whose Transport enum includes the new value.
  2. Sanitize the JSON array before parsing: filter out unknown transport strings.
  3. If you only need known transports, wrap each fromString call in try-catch and skip UnsupportedTransportException entries instead of parsing the whole array.

Example fix

// before
List<Transport> transports = Transport.parseTransports(jsonArray);
// after
List<Transport> transports = new ArrayList<>();
for (int i = 0; i < jsonArray.length(); i++) {
    try { transports.add(Transport.fromString(jsonArray.getString(i))); }
    catch (UnsupportedTransportException ignored) { }
}
Defensive patterns

Strategy: try-catch

Validate before calling

Set<String> known = new HashSet<>();
for (Transport t : Transport.values()) known.add(t.toString());
boolean allKnown = IntStream.range(0, jsonArray.length()).allMatch(i -> known.contains(jsonArray.optString(i)) || "hybrid".equals(jsonArray.optString(i)));

Try / catch

try { transports = Transport.parseTransports(jsonArray); } catch (UnsupportedTransportException e) { Log.w(TAG, "Unknown transport: " + e.getMessage()); transports = Collections.emptyList(); }

Prevention

When it happens

Trigger: Calling parseTransports on a JSONArray containing a transport string not in the enum (values like "usb", "nfc", "ble", "internal", plus legacy "hybrid"), e.g. "cable", "smart-card", or a newer WebAuthn transport the library version predates.

Common situations: Parsing an authenticator registration/assertion response produced by a newer browser or authenticator supporting transports this microG FIDO build doesn't know; typo'd transport strings in test fixtures or server-generated options.

Related errors


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