microg/GmsCore · error · UnsupportedOperationException
continueWith is not implemented
Error message
continueWith is not implemented
What it means
Task.continueWith(Continuation) is a stub in the base Task class that throws UnsupportedOperationException 'continueWith is not implemented'. Chaining a continuation onto Task completion is part of the API surface but unimplemented in this build unless the concrete Task class overrides it.
Source
Thrown at play-services-tasks/src/main/java/com/google/android/gms/tasks/Task.java:186
* The listener will be automatically removed during {@link Activity#onStop()}.
*
* @return this Task
*/
public abstract Task<TResult> addOnSuccessListener(Activity activity, OnSuccessListener<? super TResult> listener);
/**
* Returns a new Task that will be completed with the result of applying the specified
* Continuation to this Task.
* <p/>
* The Continuation will be called on the main application thread.
* <p/>
* If the previous Task is canceled, the returned Task will also be canceled and the Continuation would not execute.
*
* @see Continuation#then(Task)
*/
public <TContinuationResult> Task<TContinuationResult> continueWith(Continuation<TResult, TContinuationResult> continuation) {
throw new UnsupportedOperationException("continueWith is not implemented");
}
/**
* Returns a new Task that will be completed with the result of applying the specified Continuation to this Task.
* <p/>
* If the previous Task is canceled, the returned Task will also be canceled and the Continuation would not execute.
*
* @param executor the executor to use to call the Continuation
* @see Continuation#then(Task)
*/
public <TContinuationResult> Task<TContinuationResult> continueWith(Executor executor, Continuation<TResult, TContinuationResult> continuation) {
throw new UnsupportedOperationException("continueWith is not implemented");
}
/**
* Returns a new Task that will be completed with the result of applying the specified
* Continuation to this Task.
* <p/>View on GitHub (pinned to 157c9d86ac)
Solutions
- Upgrade to a library version implementing continueWith
- Restructure to use addOnCompleteListener + manual result transformation if that overload is implemented
- Use Tasks.await(task) then apply the continuation synchronously
- Catch UnsupportedOperationException and apply the Continuation manually after completion
Example fix
// before Task<String> next = task.continueWith(continuation); // throws // after String result = continuation.then(Tasks.await(task)); // synchronous fallback
Defensive patterns
Strategy: try-catch
Try / catch
try {
Task<R> next = task.continueWith(continuation);
} catch (UnsupportedOperationException e) {
R result = continuation.then(Tasks.await(task));
} Prevention
- Check the concrete Task implementation for continueWith support before chaining
- Restructure chained flows as sequential await + transform when porting to this library
When it happens
Trigger: Chaining follow-up work with continueWith(continuation) on a Task using the base implementation.
Common situations: Functional-style Task chaining ported from Google Play Services / gms tasks code; the library port omits the override so all chaining calls fail.
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
- addOnCanceledListener is not implemented
- addOnCompleteListener is not implemented
- continueWithTask is not implemented
- onSuccessTask is not implemented
- Cannot remove elements from a DataBufferIterator
AI-assisted analysis of microg/GmsCore@157c9d86ac (2026-09-06).
Data as JSON: /api/errors/32d8f063dfbac73c.
Report an issue: GitHub.