algoliasearch-client-javascript icon indicating copy to clipboard operation
algoliasearch-client-javascript copied to clipboard

Firebase-related networking issues

Open redox opened this issue 4 years ago • 2 comments

It happens quite often that Firebase users reports connectivity issues to Algolia. Errors like:

  • NetworkError: connect ETIMEDOUT
  • {"name":"RetryError","message":"Unreachable hosts - your application id may be incorrect. If the error persists, contact [email protected].",
  • also for free Firebase plans - networks call are totally disabled (read section Outbound networking of https://firebase.google.com/pricing/) so they also get an error that might not be super easy to understand from our API client

From a DX point of view I'm wondering whether we could make our API client slightly smarter, and:

  • detect whenever we're on Firebase and include it in the user agent
  • fail smartly when the network call is rejected because of a free plan (I assume the error we get when on this environment could be catch?)
  • maybe increase the timeouts, as I think from time to time it's really network reliability issues. Maybe our retry strategy is too aggressive?

Would love to get our experts' POV

redox avatar Sep 11 '20 07:09 redox

The error telling people to contact support is definitely subpar, there must be some way to detect it's firebase blocking the request.

Haroenv avatar Sep 11 '20 07:09 Haroenv

It seems like this occurs for us after updating from 3.33.0 to 4.14...

alexpchin avatar Jul 05 '23 06:07 alexpchin