From 7d7e6d81458516ae7e75030989fddf2fab672b1c Mon Sep 17 00:00:00 2001 From: Dave Alden Date: Tue, 11 Aug 2020 15:07:10 +0100 Subject: [PATCH] (Android): Handle task outcomes where task is not successful but exception is null. Resolves #473. --- src/android/FirebasePlugin.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/android/FirebasePlugin.java b/src/android/FirebasePlugin.java index b4541b03a..d81419e95 100755 --- a/src/android/FirebasePlugin.java +++ b/src/android/FirebasePlugin.java @@ -2300,7 +2300,7 @@ private void handleTaskOutcome(@NonNull Task task, CallbackContext callbac @Override public void onComplete(@NonNull Task task) { try { - if (task.isSuccessful()) { + if (task.isSuccessful() || task.getException() == null) { callbackContext.success(); }else if(task.getException() != null){ callbackContext.error(task.getException().getMessage()); @@ -2319,7 +2319,7 @@ public void onComplete(@NonNull Task task) { private void handleAuthTaskOutcome(@NonNull Task task, CallbackContext callbackContext) { try { - if (task.isSuccessful()) { + if (task.isSuccessful() || task.getException() == null) { callbackContext.success(); }else{ String errMessage = task.getException().getMessage();