microg/GmsCore · error · IllegalStateException
No PendingIntent available
Error message
No PendingIntent available
What it means
Fido2PendingIntentImpl.launchPendingIntent() starts the FIDO activity's IntentSender in the caller's activity. It throws IllegalStateException when called without a pendingIntent having been set, i.e. when hasPendingIntent() is false. The object simply has nothing to launch.
Source
Thrown at play-services-fido/src/main/java/org/microg/gms/fido/fido2/Fido2PendingIntentImpl.java:28
import android.content.IntentSender;
import com.google.android.gms.fido.fido2.Fido2PendingIntent;
public class Fido2PendingIntentImpl implements Fido2PendingIntent {
private PendingIntent pendingIntent;
public Fido2PendingIntentImpl(PendingIntent pendingIntent) {
this.pendingIntent = pendingIntent;
}
@Override
public boolean hasPendingIntent() {
return pendingIntent != null;
}
@Override
public void launchPendingIntent(Activity activity, int requestCode) throws IntentSender.SendIntentException {
if (!hasPendingIntent()) throw new IllegalStateException("No PendingIntent available");
activity.startIntentSenderForResult(pendingIntent.getIntentSender(), requestCode, null, 0, 0, 0);
}
}
View on GitHub (pinned to 157c9d86ac)
Solutions
- Check hasPendingIntent() and skip launchPendingIntent when it returns false — completion likely needs no UI.
- If a UI flow is expected, verify the Fido2 API call (register/sign) succeeded and returned a valid Fido2PendingIntent.
- Wrap the call in try-catch for IllegalStateException to treat 'no PendingIntent' as a no-op success path.
Example fix
// before
pendingIntent.launchPendingIntent(activity, REQUEST_CODE);
// after
if (pendingIntent.hasPendingIntent()) {
pendingIntent.launchPendingIntent(activity, REQUEST_CODE);
} else {
// no user interaction required; poll result directly
} Defensive patterns
Strategy: validation
Validate before calling
if (!fido2PendingIntent.hasPendingIntent()) { /* no UI needed; skip launch */ } Try / catch
try { fido2PendingIntent.launchPendingIntent(activity, RC); } catch (IllegalStateException e) { /* no PendingIntent: treat as no-op success */ } Prevention
- Always call hasPendingIntent() before launchPendingIntent().
- Remember that not every FIDO operation requires user interaction — absence of a PendingIntent can be normal.
- Verify the register/sign API call actually returned a result object rather than an error status.
When it happens
Trigger: Calling launchPendingIntent(activity, requestCode) on a Fido2PendingIntentImpl constructed with a null PendingIntent, or after checking hasPendingIntent() returns false and proceeding anyway.
Common situations: A FIDO registration/sign request that completed without needing user interaction (no consent dialog required), so no PendingIntent was produced; calling launchPendingIntent unconditionally after the API call instead of checking hasPendingIntent() first.
Understand the failure class
Background: "Invalid state transition" errors: "status must be X, actually Y", "already rejected/charging/uninstalled", "cannot ... while running" — what they mean when a library rejects your call — this error's family across 31 libraries.
Related errors
- No response set.
- Transport ${transport} not supported
- Attachment ${attachment} not supported
- Attestation conveyance preference ${attachment} not supporte
- PublicKeyCredentialType ${type} not supported
AI-assisted analysis of microg/GmsCore@157c9d86ac (2026-09-06).
Data as JSON: /api/errors/eca99819902ea31e.
Report an issue: GitHub.