From 4da3bd9917c930b9b9d8ae8cf8618cf32d495e93 Mon Sep 17 00:00:00 2001 From: Ankita Jhawar Date: Wed, 15 Jul 2020 10:59:00 -0700 Subject: [PATCH 1/2] Add a descriptive error message. --- .../firebase/installations/FirebaseInstallations.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/firebase-installations/src/main/java/com/google/firebase/installations/FirebaseInstallations.java b/firebase-installations/src/main/java/com/google/firebase/installations/FirebaseInstallations.java index 57ae1df04d3..b25945b16a5 100644 --- a/firebase-installations/src/main/java/com/google/firebase/installations/FirebaseInstallations.java +++ b/firebase-installations/src/main/java/com/google/firebase/installations/FirebaseInstallations.java @@ -109,6 +109,11 @@ public Thread newThread(Runnable r) { + "with Firebase server APIs: It identifies your application with Firebase." + "Please refer to https://firebase.google.com/support/privacy/init-options."; + private static final String AUTH_ERROR_MSG = + "Installation ID could not be validated with the Firebase servers (maybe deleted). " + + "Firebase Installations will need to create a new Installation ID/Token. " + + "Please retry your last request."; + /** package private constructor. */ FirebaseInstallations( FirebaseApp firebaseApp, @@ -378,7 +383,7 @@ private void doNetworkCallIfNecessary(boolean forceRefresh) { } else if (prefs.isNotGenerated()) { // If there is no fid it means the call failed with an auth error. Simulate an // IOException so that the caller knows to try again. - triggerOnException(prefs, new IOException("cleared fid due to auth error")); + triggerOnException(prefs, new IOException(AUTH_ERROR_MSG)); } else { triggerOnStateReached(prefs); } From f5fd4ad8cf07d088bd91bbe9b7f8312261077989 Mon Sep 17 00:00:00 2001 From: Ankita Jhawar Date: Wed, 15 Jul 2020 12:00:21 -0700 Subject: [PATCH 2/2] Addressing rayo's comments. --- .../google/firebase/installations/FirebaseInstallations.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firebase-installations/src/main/java/com/google/firebase/installations/FirebaseInstallations.java b/firebase-installations/src/main/java/com/google/firebase/installations/FirebaseInstallations.java index b25945b16a5..082cb4a0b1d 100644 --- a/firebase-installations/src/main/java/com/google/firebase/installations/FirebaseInstallations.java +++ b/firebase-installations/src/main/java/com/google/firebase/installations/FirebaseInstallations.java @@ -110,8 +110,8 @@ public Thread newThread(Runnable r) { + "Please refer to https://firebase.google.com/support/privacy/init-options."; private static final String AUTH_ERROR_MSG = - "Installation ID could not be validated with the Firebase servers (maybe deleted). " - + "Firebase Installations will need to create a new Installation ID/Token. " + "Installation ID could not be validated with the Firebase servers (maybe it was deleted). " + + "Firebase Installations will need to create a new Installation ID and auth token. " + "Please retry your last request."; /** package private constructor. */