Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We��ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 [cloud_firestore] Helpful error message is lost #12045

Open
tom-andersen opened this issue Dec 15, 2023 · 0 comments
Open

🐛 [cloud_firestore] Helpful error message is lost #12045

tom-andersen opened this issue Dec 15, 2023 · 0 comments
Labels
platform: all Issues / PRs which are for all platforms. plugin: cloud_firestore type: bug Something isn't working type: enhancement New feature or request

Comments

@tom-andersen
Copy link

Bug report

Describe the bug

The Firestore SDKs will usually provide a helpful error text alongside error code. This text is often generated by the Firestore server, and contains more information, specific to the situation that caused the error.

The problem is that FlutterFire will overwrite these error texts with the standard text, that doesn't include any situation specific help.

See code locations:

https://github.com/firebase/flutterfire/blob/a1363b02fdb12602df535f12bf875f85857524a5/packages/cloud_firestore/cloud_firestore/ios/Classes/FLTFirebaseFirestoreUtils.m

https://github.com/firebase/flutterfire/blob/a1363b02fdb12602df535f12bf875f85857524a5/packages/cloud_firestore/cloud_firestore/android/src/main/java/io/flutter/plugins/firebase/firestore/FlutterFirebaseFirestoreException.java

https://github.com/firebase/flutterfire/blob/a1363b02fdb12602df535f12bf875f85857524a5/packages/cloud_firestore/cloud_firestore/macos/Classes/FLTFirebaseFirestoreUtils.m

Consequently, a customer will receive error:

UNAVAILABLE - The service is currently unavailable. This is most likely a transient condition, which can be corrected by retrying with a backoff. Note that it is not always safe to retry non-idempotent operations.

Instead of a helpful error, such as:

UNAVAILABLE - Failed to get document because the client is offline.

or

UNAVAILABLE - Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to SERVER to retrieve the cached document.

See a recent support request: firebase/firebase-ios-sdk#12153
Having more information in error message will go a long way to help these customers better.

@tom-andersen tom-andersen added Needs Attention This issue needs maintainer attention. type: bug Something isn't working labels Dec 15, 2023
@darshankawar darshankawar added triage Issue is currently being triaged. plugin: cloud_firestore type: enhancement New feature or request and removed Needs Attention This issue needs maintainer attention. triage Issue is currently being triaged. labels Dec 18, 2023
@Lyokone Lyokone added the platform: all Issues / PRs which are for all platforms. label Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: all Issues / PRs which are for all platforms. plugin: cloud_firestore type: bug Something isn't working type: enhancement New feature or request
3 participants