This is the error message : #firebase/firestore: Firestore (4.12.1): Could not reach Firestore backend
I am building a web app and it was working fine today and after a couple of login / logouts , I started receiving this error message. I have initialized the firestore config again and the problem persists. same error message was being thrown with firestore 4.11.0 version.
For future viewers, this error occurs when the Firebase SDK is unable to reach the Cloud Firestore service for a variety of reasons. We've since moved from Beta to General Availability for the service and SDKs and made several improvements since this was first asked.
A prime reason for this error is network connectivity where we cannot get a response from the service in a reasonable timeframe and then revert to offline mode (if enabled).
Another possible reason in Javascript libraries/frameworks are messing with functionality we rely upon in a now compatible way.
If you continue to encounter this issue and don't believe it's network connectivity relate, post a question on our discussion group or as a Github issue against the relevant client library.
Related
So, i'm getting this error:
"auth/operation-not-supported-in-this-enviroment. This operation is
not supported in the enviroment this application is running on.
"location.protocol" must be http, https or chrome-extension and web
storage must be enabled"
when trying to google login with firebase on Expo Go.
The answers of this problem that I saw were saying to use a third part oAuth (thought of oAuth2.0, but not looked too much into it), but I already have all of my sign-in system done and working on web (i was just testing the android app on web). I was wondering if there is a way to make the App run on other service (not Expo Go), so I went to look for their EAS service but it got me another expo-camera error that I couldn't solve. Any suggestions of what should I do? Should I go for another auth service and join it to Firebase? Should I post the expo-camera error and go for EAS? I'm lost rn.
We have a server running on express js with a database MongoDB accessing with the framework mongoose. The application is in production and we are facing the issue of APIs taking too long to respond sometimes they even get timed out and it is completely random and it happens for just 10-15 requests in a day. We have an AWS loader balancer and the server is hosted on 2 instances and MongoDB is hosted on a separate instance. We have put logs on the required places in the server. Firstly I thought it was an issue of TCP/IP connection so I configured keepAliveTimeout and headersTimeout in the application(Reference) but that too didn't help.
I tried to analyze the logs and found something the API comes to the server but it doesn't start processing for 5-10 seconds and sometimes it processes everything in a second but doesn't respond back. I even tried to replicate the issue on DEV through apache JMeter but the issue isn't replicating. I am thinking this might be due to node js being single-threaded but there there are so many applications running on node js. How are they managing such scenarios? Also, we have millions of records in the database so could they create an issue? By the way we have properly indexed the fields. Please guys help me out with this issue.
I assume that in beginning you are not facing this issue, right?
and after data increase, you are facing an issue
and timeout happens because API does not give response
according to my above assumptions you may have an issue with MongoDB when MongoDB have a huge dataset, my suggestion is to check your MongoDB operations when your request is being timeout your MongoDB will in load,
to check MongoDB process
db.currentOp()
in mongo shell or any editor where you can run it
and check which process running through a long time
resolve it and watch
I have a web application with React, Redux that connects to the Firebase's Realtime Database. Implementation uses react-redux-firebase library and it works.
Out of the box, if the app goes temporarily offline, changes to store are saved locally and are then executed once online again. The feature is called "offline persistence" by Firebase. I want to turn this off - if the application is offline, no actions should work and later, when internet is reconnected, no changes should be pushed to server.
How can I do this? I can't find it in react-redux-firebase's documentation or configuration. Neither switching from Realtime Database to Firestore changes this. As a side problem, the app writes errors to the console while offline. Everything works, but once again, I don't know how to turn these logs off.
WebSocketConnection.ts:183 WebSocket connection to 'wss...' failed: Error in connection establishment: net::ERR_INTERNET_DISCONNECTED
WebSocketConnection.open # WebSocketConnection.ts:183
(anonymous) # Connection.ts:145
BrowserPollConnection.ts:745 GET https://... net::ERR_INTERNET_DISCONNECTED
You can detect whether the Firebase client is connected to the server by listening for the .info/connected node. When this is the case, you can prevent your code from sending any write operations to the database.
For an example of this, see the Firebase documentation on detecting connection state.
I was using for same time Cloud functions from Google Cloud Platform.
But recently on my tests with Postman I've been asked to sign in.
I even allowed to receive requests from unauthenticated sources but the problem persists.
Any idea how to solve this issue?
HTTP functions require authentication by default. Earlier this was unauthenticated.
Assign, the roles/cloudfunctions.invoker to allUsers.
I'm doing a bunch (i.e. around 30) of upserts in a row and occasionally getting "Failed to query for documents to update: handshake failure: connection(etc-etc-etc.mongodb.net:27017[-10399]) unable to decode message length: EOF". Each update uniquely changes the whole document, as opposed to changing the same field(s) to one new value as with updateMany.
Is this a problem with making many separate update requests? I'm using MongoDB's Stitch service FWIW. The Stitch js API suggests that it just creates one connection, but it feels like every update is trying to create a new connection or something.
In my case I received this message when using the GO MongoDB client library. I was trying to issue a shutdown command, but apparently this can only be issued from localhost.
Run the shutdown against the admin database. When using shutdown, the connection must originate from localhost or use an authenticated connection.
I am using an authenticated connection, but I'm guessing there's some error being returned that the library isn't expecting.
I'm wagering that because the Stitch service is a MongoDB product it will be written in Go. They seem to really love Go these days :).
I doubt this will help you, but it's probably an issue with the driver.