-
Notifications
You must be signed in to change notification settings - Fork 156
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 long-polling requests #124
Comments
@jpillora any chance I can get any hint on this? |
I’m guessing it’s an xhook bug around xhr state in the event of a timeout
…On Sat, 10 Apr 2021 at 1:01 am girigirianish ***@***.***> wrote:
@jpillora <https://github.com/jpillora> any chance I can get any hint on
this?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#124 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAE2X43ANYZNPEAQ2JPYNHLTH4JC3ANCNFSM4Z3RUA3A>
.
|
@jpillora Thank you very much for your reply. So any fix in the pipeline for this issue? Trying to debug it for a long but could not figure it out. And this has been a blocker for us. Debugging findings: When the long polling request is intercepted. The xhr ready state will take some time to resolve and the state remains on state 3 and the control is not being forwarded to the current interception and firebase times out with this. Eagerly awaiting your feedback on this. Please let me know I could wire up a reproducible public repo with this issue. It would be a very great help for me if I could get insights from you Thanks |
No fixes coming, no time unfortunately
See the es6 reactor branch, debug using that
You need to disable xhook and figure out what the native XmlHttpRequest
does, then make xhook do that
…On Sat, 10 Apr 2021 at 3:00 am girigirianish ***@***.***> wrote:
@jpillora <https://github.com/jpillora> So any fix in the pipeline for
this issue? Trying to debug it for a long but could not figure it out. And
this has been a blocker for us.
Debugging findings:
When the long polling request is intercepted. The xhr ready state will
take some time to resolve and the state remains on state 3 and the control
is not being forwarded to the current interception and firebase times out
with this.
Eagerly awaiting your feedback on this.
Thanks
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#124 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAE2X45LUU2MYYR6URKLJMTTH4XDPANCNFSM4Z3RUA3A>
.
|
I'm using Firestore in my project. Firestore seems to use long-polling on HTTP GET requests to provide its real-time updates. This means firestore js library (i'm using angularfire2) first makes a POST request to firestore servers. That one is fine. Then it does a GET request, which is kept open for a long time, around a minute. If you look at that GET request in Chrome's devtool, it will show you an empty response because devtools are waiting for the request to close I guess to display the response.
At this point, the GET request is intercepted by xhook, but xhook is not logging (log that I kept in after hook) it cause the request is still not closed.
After 10s, firebase call-site which is wrapped by xhook fails to get the data they want, so they print this:
index.esm.js:117 [2019-07-26T05:13:21.884Z] @firebase/firestore: Firestore (6.3.1): Could not reach Cloud Firestore backend. Backend didn't respond within 10 seconds.
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.
We are looking forward for the fix or any workaround.
Thanks in advance
The text was updated successfully, but these errors were encountered: