Firestore: what possible cause of this exception: InternalServerError: 500 Received RST_STREAM with error code 0
See original GitHub issue[READ] Step 1: Are you in the right place?
- For issues or feature requests related to the code in this repository
file a Github issue.
- If this is a feature request make sure the issue title starts with “FR:”.
- For general technical questions, post a question on StackOverflow with the firebase tag.
- For general Firebase discussion, use the firebase-talk google group.
- For help troubleshooting your application that does not fall under one of the above categories, reach out to the personalized Firebase support channel.
[REQUIRED] Step 2: Describe your environment
- Operating System version: Ubuntu 18.04 + openerp 7___
- Firebase SDK version: _____
- Library version: _from pip freeze:
firebase-admin==2.16.0 funcsigs==1.0.2 future==0.16.0 futures==3.2.0 gax-google-logging-v2==0.8.3 gax-google-pubsub-v1==0.8.3 gcloud==0.18.3 gdata==2.0.18 google-api-core==1.9.0 google-auth==1.6.3 google-cloud==0.34.0 google-cloud-core==0.29.1 google-cloud-firestore==0.32.1 google-cloud-storage==1.15.0 google-gax==0.16.0 google-resumable-media==0.3.2 googleapis-common-protos==1.5.9 grpc-google-logging-v2==0.11.1 grpc-google-pubsub-v1==0.11.1
- Firebase Product: firestore___ (auth, database, storage, etc)
[REQUIRED] Step 3: Describe the problem
I’m developing a system to store orders into openerp that came from a mobile app.
So I’ve integrated a firestore listener on a query snapshot on “orders” collection,
BookingAppFirestore.uniqdb.collection('orders') .where('new_order', '==', True) .where('nxscm_order_id', '==', None) .on_snapshot(self.new_orders_on_snapshot)
Sometimes during the executions of my proofs I get this exception when an order is wrote on firestore and is received from the listener.
Steps to reproduce:
What happened? How can we make the problem occur? This could be a description, log/console output, etc.
the exception trace from openerp log system
Exception in thread Thread-OnRpcTerminated:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "/home/nix/Sviluppo/venvs/odoo-dev/local/lib/python2.7/site-packages/google/cloud/firestore_v1/watch.py", line 290, in close
raise reason
InternalServerError: 500 Received RST_STREAM with error code 0
2019-04-26 10:00:50,011 9102 INFO ? google.cloud.firestore_v1.watch: RPC termination has signaled manager shutdown.
2019-04-26 10:00:50,011 9102 ERROR db_dev google.api_core.bidi: Thread-ConsumeBidirectionalStream caught unexpected exception <_Rendezvous of RPC that terminated with:
status = StatusCode.INTERNAL
details = "Received RST_STREAM with error code 0"
debug_error_string = "{"created":"@1556272850.010768238","description":"Error received from peer","file":"src/core/lib/surface/call.cc","file_line":1095,"grpc_message":"Received RST_STREAM with error code 0","grpc_status":13}"
> and will exit.
Traceback (most recent call last):
File "/home/nix/Sviluppo/venvs/odoo-dev/local/lib/python2.7/site-packages/google/api_core/bidi.py", line 543, in _thread_main
response = self._bidi_rpc.recv()
File "/home/nix/Sviluppo/venvs/odoo-dev/local/lib/python2.7/site-packages/google/api_core/bidi.py", line 454, in recv
return self._recoverable(self._recv)
File "/home/nix/Sviluppo/venvs/odoo-dev/local/lib/python2.7/site-packages/google/api_core/bidi.py", line 413, in _recoverable
raise exc
_Rendezvous: <_Rendezvous of RPC that terminated with:
status = StatusCode.INTERNAL
details = "Received RST_STREAM with error code 0"
debug_error_string = "{"created":"@1556272850.010768238","description":"Error received from peer","file":"src/core/lib/surface/call.cc","file_line":1095,"grpc_message":"Received RST_STREAM with error code 0","grpc_status":13}"
>
2019-04-26 10:00:50,011 9102 INFO db_dev google.api_core.bidi: Thread-ConsumeBidirectionalStream exiting
// TODO(you): code here to reproduce the problem
Issue Analytics
- State:
- Created 4 years ago
- Reactions:5
- Comments:36 (2 by maintainers)
Top Results From Across the Web
Developers - Firestore: what possible cause of this exception ...
Firestore : what possible cause of this exception: InternalServerError: 500 Received RST_STREAM with error code 0.
Read more >How to detect realtime listener errors in firebase firestore ...
I figured out an alternative method to detecting the listener error and restarting the listener after a server side close.
Read more >FirebaseFirestoreException.Code - Google
Code.UNAVAILABLE. The service is currently unavailable. This is a most likely a transient condition and may be corrected by retrying with a backoff....
Read more >I am getting Internal Server Error 500, which fixes for a while if ...
The reason you only see 500 Internal Server Errors client-side is because every time some exception occurs, you aren't handling it and just...
Read more >Troubleshooting | Firestore - Google Cloud
Latency; Error Codes ... The table below describes possible causes of increased latency: ... Sustained traffic exceeding the 500-50-5 rule. read, write.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I found this hacky fix that works for now. I don’t like it, but there does not seem to currently be a better way of dealing with the issue:
https://stackoverflow.com/questions/55876107/how-to-detect-realtime-listener-errors-in-firebase-firestore-database
Thanks for trying the new version. Sorry this didn’t fix things up for you, I’ll reach back out to the backend folks for more ideas.