microg/GmsCore · error · UnsupportedOperationException
continueWithTask is not implemented
Error message
continueWithTask is not implemented
What it means
The no-executor continueWithTask(Continuation) overload is an unimplemented stub in this library's Task class: it throws UnsupportedOperationException unconditionally. Task chaining that returns a nested Task is not supported through this entry point.
Source
Thrown at play-services-tasks/src/main/java/com/google/android/gms/tasks/Task.java:213
* @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/>
* The Continuation will be called on the main application thread.
* <p/>
* If the previous Task is canceled, the Continuation would still execute and task.isCanceled() is true can be
* observed in the Continuation.
*
* @see Continuation#then(Task)
*/
public <TContinuationResult> Task<TContinuationResult> continueWithTask(Continuation<TResult, Task<TContinuationResult>> continuation) {
throw new UnsupportedOperationException("continueWithTask 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 Continuation would still execute and task.isCanceled() is true can be
* observed in the Continuation.
*
* @param executor the executor to use to call the Continuation
* @see Continuation#then(Task)
*/
public <TContinuationResult> Task<TContinuationResult> continueWithTask(Executor executor, Continuation<TResult, Task<TContinuationResult>> continuation) {
throw new UnsupportedOperationException("continueWithTask is not implemented");
}
/**
* Returns the exception that caused the Task to fail. Returns {@code null} if the Task is not
* yet complete, or completed successfully.View on GitHub (pinned to 157c9d86ac)
Solutions
- Use the supported task-composition API of this library instead of continueWithTask
- Replace with addOnCompleteListener and manually start the follow-up task inside the listener
- Catch UnsupportedOperationException and implement a fallback composition with listeners
- Encapsulate chaining in a helper that awaits completion then invokes the next task
Example fix
// before
task.continueWithTask(t -> fetchMore(t.getResult()));
// after
task.addOnCompleteListener(t -> {
if (t.isSuccessful()) {
Task<More> next = fetchMore(t.getResult());
}
}); Defensive patterns
Strategy: try-catch
Try / catch
try {
Task<R> r = task.continueWithTask(cont);
} catch (UnsupportedOperationException e) {
task.addOnCompleteListener(t -> { /* launch next task manually */ });
} Prevention
- Replace continueWithTask with listener-based composition during porting
- Centralize chaining logic in one utility so stubs cannot be called directly
- Document unsupported Task methods in team guidelines
- Favor explicit completion listeners over continuation-style APIs
When it happens
Trigger: Calling task.continueWithTask(continuation) with a Continuation returning Task<TContinuationResult>, with no Executor argument — always throws immediately.
Common situations: Migrating Firebase/GMS task code that composes async calls via continueWithTask; following Play Services tutorials against this reimplementation.
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
- onSuccessTask is not implemented
- Unsupported method call %s(%s).
- UnsupportedOperationException
- onCreateView not allowed on MapViewDelegate
- onDestroyView not allowed on MapViewDelegate
AI-assisted analysis of microg/GmsCore@157c9d86ac (2026-09-06).
Data as JSON: /api/errors/1f61d4488e0c5759.
Report an issue: GitHub.