{"record":{"id":"32d8f063dfbac73c","repo":"microg/GmsCore","slug":"continuewith-is-not-implemented","errorCode":null,"errorMessage":"continueWith is not implemented","messagePattern":"continueWith 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":186,"sourceCode":"     * The listener will be automatically removed during {@link Activity#onStop()}.\n     *\n     * @return this Task\n     */\n    public abstract Task<TResult> addOnSuccessListener(Activity activity, OnSuccessListener<? super TResult> listener);\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 returned Task will also be canceled and the Continuation would not execute.\n     *\n     * @see Continuation#then(Task)\n     */\n    public <TContinuationResult> Task<TContinuationResult> continueWith(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 Continuation to this Task.\n     * <p/>\n     * If the previous Task is canceled, the returned Task will also be canceled and the Continuation would not execute.\n     *\n     * @param executor the executor to use to call the Continuation\n     * @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/>","sourceCodeStart":168,"sourceCodeEnd":204,"githubUrl":"https://github.com/microg/GmsCore/blob/157c9d86ac46c195a86c2f15ab55c84036223f95/play-services-tasks/src/main/java/com/google/android/gms/tasks/Task.java#L168-L204","documentation":"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.","triggerScenarios":"Chaining follow-up work with continueWith(continuation) on a Task using the base implementation.","commonSituations":"Functional-style Task chaining ported from Google Play Services / gms tasks code; the library port omits the override so all chaining calls fail.","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"],"exampleFix":"// before\nTask<String> next = task.continueWith(continuation); // throws\n// after\nString result = continuation.then(Tasks.await(task)); // synchronous fallback","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    Task<R> next = task.continueWith(continuation);\n} catch (UnsupportedOperationException e) {\n    R result = continuation.then(Tasks.await(task));\n}","preventionTips":["Check the concrete Task implementation for continueWith support before chaining","Restructure chained flows as sequential await + transform when porting to this library"],"tags":["unsupported-operation","tasks","chaining"],"backgroundTag":"unsupported-operation","analyzedSha":"157c9d86ac46c195a86c2f15ab55c84036223f95","analyzedAt":"2026-09-06T17:27:33.892Z","contentChangedAt":"2026-09-06T17:27:33.892Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}