microg/GmsCore · error · UnsupportedOperationException
Unsupported method call %s(%s).
Error message
Unsupported method call %s(%s).
What it means
AccountContentProvider.call() supports only a fixed set of methods (get_accounts, and clear-password when the caller has google package permission). Any other method name throws UnsupportedOperationException.
Source
Thrown at play-services-core/src/main/java/org/microg/gms/auth/AccountContentProvider.java:101
(hasGooglePackagePermission || AuthPrefs.isAuthVisible(getContext()))) {
Log.d(TAG, "Make account " + account + " visible to " + packageName);
am.setAccountVisibility(account, packageName, VISIBILITY_VISIBLE);
}
}
}
}
if (accounts == null) {
accounts = new Account[0];
}
result.putParcelableArray(PROVIDER_EXTRA_ACCOUNTS, accounts);
return result;
} else if (PROVIDER_METHOD_CLEAR_PASSWORD.equals(method) && hasGooglePackagePermission) {
Account a = extras.getParcelable(PROVIDER_EXTRA_CLEAR_PASSWORD);
AccountManager.get(getContext()).clearPassword(a);
return null;
}
throw new UnsupportedOperationException(String.format("Unsupported method call %s(%s).", method, arg));
} finally {
Binder.restoreCallingIdentity(identityToken);
}
}
@Nullable
@Override
public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) {
throw new UnsupportedOperationException();
}
@Nullable
@Override
public String getType(Uri uri) {
return "text/plain";
}
@NullableView on GitHub (pinned to 157c9d86ac)
Solutions
- Use the exact supported method string (the PROVIDER_METHOD_GET_ACCOUNTS constant value) in your call().
- For clear-password, ensure the caller has the google package permission, otherwise the call is rejected.
- Wrap the call in try-catch for UnsupportedOperationException and fall back to AccountManager APIs.
- Check the microg source for the current list of supported provider methods for your version.
Example fix
// before resolver.call(uri, "getAccounts", arg, extras); // after resolver.call(uri, "get_accounts", arg, extras); // match PROVIDER_METHOD_GET_ACCOUNTS
Defensive patterns
Strategy: try-catch
Validate before calling
if (!"get_accounts".equals(method) && !("clear_password".equals(method) && hasGooglePermission)) throw new IllegalArgumentException("unsupported method: " + method); Try / catch
try { resolver.call(uri, method, arg, extras); } catch (UnsupportedOperationException e) { // fall back to AccountManager } Prevention
- Use provider method constant values, not literals from memory
- Only call clear_password from privileged apps
- Check provider source for supported methods in your version
When it happens
Trigger: Calling ContentResolver.call() with a method string other than PROVIDER_METHOD_GET_ACCOUNTS, or calling PROVIDER_METHOD_CLEAR_PASSWORD without holding the google package permission (the branch falls through to the throw).
Common situations: Typos or version drift between caller method string and provider constant; calling clear_password from an unprivileged app so the permission-guarded branch is skipped; copy-pasted code from a newer/older play-services version using renamed methods.
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
- Access denied, missing google package permission or GET_ACCO
- UnsupportedOperationException
- onCreateView not allowed on MapViewDelegate
- onDestroyView not allowed on MapViewDelegate
- onInflate not allowed on MapViewDelegate
AI-assisted analysis of microg/GmsCore@157c9d86ac (2026-09-06).
Data as JSON: /api/errors/28fc016d2588217e.
Report an issue: GitHub.