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

handle error condition when client is offline #2

Open
marcosh opened this issue Mar 18, 2020 · 0 comments
Open

handle error condition when client is offline #2

marcosh opened this issue Mar 18, 2020 · 0 comments

Comments

@marcosh
Copy link
Contributor

marcosh commented Mar 18, 2020

currently several tests fail if the machine executing the tests is offline

  ✗ sets data correctly with no option:                                                                                                                                                                                                      
                                                                                                                                                                                                                                             
  test timed out after 2000ms                                                                                                                                                                                                                
  ✗ sets data correctly with merge option:

  test timed out after 2000ms                              
  ✗ sets data correctly with mergeFields option:

  test timed out after 2000ms                              
[2020-03-18T17:08:12.803Z]  @firebase/firestore: Firestore (7.9.2): Could not reach Cloud Firestore backend. Connection failed 1 times. Most recent error: FirebaseError: [code=unavailable]: 14 UNAVAILABLE: DNS resolution failed
This typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.
  ✗ gets existing data correctly with default options:

  test timed out after 2000ms                              
  ✗ gets existing data correctly with cache options:

  test timed out after 2000ms                              
[2020-03-18T17:08:16.804Z]  @firebase/firestore: Firestore (7.9.2): Could not reach Cloud Firestore backend. Connection failed 1 times. Most recent error: FirebaseError: [code=unavailable]: 14 UNAVAILABLE: DNS resolution failed
This typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.
(node:6376) UnhandledPromiseRejectionWarning: FirebaseError: 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.)
    at new FirestoreError (/home/marcosh/projects/statebox/purescript-firestore/node_modules/@firebase/firestore/dist/index.node.cjs.js:348:28)
    at Object.next (/home/marcosh/projects/statebox/purescript-firestore/node_modules/@firebase/firestore/dist/index.node.cjs.js:21990:28)
    at next (/home/marcosh/projects/statebox/purescript-firestore/node_modules/@firebase/firestore/dist/index.node.cjs.js:21937:30)
    at Timeout._onTimeout (/home/marcosh/projects/statebox/purescript-firestore/node_modules/@firebase/firestore/dist/index.node.cjs.js:20178:21)
    at listOnTimeout (internal/timers.js:531:17)
    at processTimers (internal/timers.js:475:7)
(node:6376) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)                                                 
(node:6376) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
  ✗ gets existing data correctly with server options:

  test timed out after 2000ms                              
[2020-03-18T17:08:18.785Z]  @firebase/firestore: Firestore (7.9.2): Could not reach Cloud Firestore backend. Connection failed 1 times. Most recent error: FirebaseError: [code=unavailable]: 14 UNAVAILABLE: DNS resolution failed
This typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.
  ✗ gets data with was not set before:

  Failed to get document because the client is offline.
[2020-03-18T17:08:18.841Z]  @firebase/firestore: Firestore (7.9.2): Could not reach Cloud Firestore backend. Connection failed 1 times. Most recent error: FirebaseError: [code=unavailable]: 14 UNAVAILABLE: DNS resolution failed
This typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.
  ✗ sets and gets data correctly:

  test timed out after 2000ms                              
[2020-03-18T17:08:20.837Z]  @firebase/firestore: Firestore (7.9.2): Could not reach Cloud Firestore backend. Connection failed 1 times. Most recent error: FirebaseError: [code=unavailable]: 14 UNAVAILABLE: DNS resolution failed
This typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.
  ✗ sets and gets data correctly with estimate timestamp:

  test timed out after 2000ms                              
[2020-03-18T17:08:22.849Z]  @firebase/firestore: Firestore (7.9.2): Could not reach Cloud Firestore backend. Connection failed 1 times. Most recent error: FirebaseError: [code=unavailable]: 14 UNAVAILABLE: DNS resolution failed
This typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.
  ✗ sets and gets data correctly with previous timestamp:

  test timed out after 2000ms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant