{"record":{"id":"1f61d4488e0c5759","repo":"microg/GmsCore","slug":"continuewithtask-is-not-implemented","errorCode":null,"errorMessage":"continueWithTask is not implemented","messagePattern":"continueWithTask is not implemented","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"play-services-tasks/src/main/java/com/google/android/gms/tasks/Task.java","lineNumber":213,"sourceCode":"     * @see Continuation#then(Task)\n     */\n    public <TContinuationResult> Task<TContinuationResult> continueWith(Executor executor, Continuation<TResult, TContinuationResult> continuation) {\n        throw new UnsupportedOperationException(\"continueWith is not implemented\");\n    }\n\n    /**\n     * Returns a new Task that will be completed with the result of applying the specified\n     * Continuation to this Task.\n     * <p/>\n     * The Continuation will be called on the main application thread.\n     * <p/>\n     * If the previous Task is canceled, the Continuation would still execute and task.isCanceled() is true can be\n     * observed in the Continuation.\n     *\n     * @see Continuation#then(Task)\n     */\n    public <TContinuationResult> Task<TContinuationResult> continueWithTask(Continuation<TResult, Task<TContinuationResult>> continuation) {\n        throw new UnsupportedOperationException(\"continueWithTask is not implemented\");\n    }\n\n    /**\n     * Returns a new Task that will be completed with the result of applying the specified Continuation to this Task.\n     * <p/>\n     * If the previous Task is canceled, the Continuation would still execute and task.isCanceled() is true can be\n     * observed in the Continuation.\n     *\n     * @param executor the executor to use to call the Continuation\n     * @see Continuation#then(Task)\n     */\n    public <TContinuationResult> Task<TContinuationResult> continueWithTask(Executor executor, Continuation<TResult, Task<TContinuationResult>> continuation) {\n        throw new UnsupportedOperationException(\"continueWithTask is not implemented\");\n    }\n\n    /**\n     * Returns the exception that caused the Task to fail. Returns {@code null} if the Task is not\n     * yet complete, or completed successfully.","sourceCodeStart":195,"sourceCodeEnd":231,"githubUrl":"https://github.com/microg/GmsCore/blob/157c9d86ac46c195a86c2f15ab55c84036223f95/play-services-tasks/src/main/java/com/google/android/gms/tasks/Task.java#L195-L231","documentation":"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.","triggerScenarios":"Calling task.continueWithTask(continuation) with a Continuation returning Task<TContinuationResult>, with no Executor argument — always throws immediately.","commonSituations":"Migrating Firebase/GMS task code that composes async calls via continueWithTask; following Play Services tutorials against this reimplementation.","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"],"exampleFix":"// before\ntask.continueWithTask(t -> fetchMore(t.getResult()));\n// after\ntask.addOnCompleteListener(t -> {\n    if (t.isSuccessful()) {\n        Task<More> next = fetchMore(t.getResult());\n    }\n});","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    Task<R> r = task.continueWithTask(cont);\n} catch (UnsupportedOperationException e) {\n    task.addOnCompleteListener(t -> { /* launch next task manually */ });\n}","preventionTips":["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"],"tags":["tasks","unsupported-operation","continuation","android"],"backgroundTag":"unsupported-operation","analyzedSha":"157c9d86ac46c195a86c2f15ab55c84036223f95","analyzedAt":"2026-09-06T17:27:33.892Z","contentChangedAt":"2026-09-06T17:27:33.892Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}