-
Notifications
You must be signed in to change notification settings - Fork 898
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
Cannot connect to Firestore (only on network at work) #2526
Comments
It's sounding a network-specific issue to me, and unfortunately this goes beyond our control. Firebase doesn't work well on proxies/firewalls that block access to our database, since it needs to have a secure connection to our servers to make sure that data can be transferred efficiently. See this discussion answered by one of our Firebase advocates. You may try to whitelist this domain: firestore.googleapis.com to relax some restrictions. |
I feel sorry but there really is not much we can do from Firebase side to make it work. As rommelpe said, your best way forward is to somehow remove the restriction your corp policy applied to firebase services. |
Thank you for the replies. Like mentioned in the OP, the data eventually gets pulled (after a few minutes) which tells me that the connection is not blocked. How can that be? Is there any way I can troubleshoot? |
The most common reason for the JS SDK to be blocked is actually that your proxy is buffering responses. Try setting |
Hi @wilhuff, thank you for your input. I saw the post you mentioned. In fact, the last three replies are me and @mikelehen discussing the issue. The tests (running https://debug-my.firebaseapp.com/ on the corporate network) seem to reflect that the network should be reading/writing to Firestore whether the
I believe the line I should add to fully test the functionality is : Given the fact that I am using AngularFire, where exactly should I insert this line for the project not to give me the following error? I created a Stackblitz project as a reference where you can see exactly how I implemented Firestore in the project : https://stackblitz.com/edit/firestore-request-issue |
You need to use the This is essentially just like angular/angularfire#2183 (comment), except instead of specifying |
Looks like this fixed the problem at the cost of performance but that's the price to pay to have a working app in complex corporate networks. Still wondering why the test mentioned in issue #1674 passed without the Also by looking at the title of the flag, I'm wondering how permanent of a "fix" this can be considered. Will this "experimental" feature become part of Firestore at some point? I just don't want to spend thousands of hours developing an app counting on a "temporary" feature that may break the app once deprecated. |
The flag is experimental but the fix is not. We marked it "experimental" to avoid making it a committed part of the API. Eventually we'll be rolling out a mechanism that can auto-detect this issue and fall back automatically. At that point we can remove the flag. What kind of performance difference are you seeing? |
I've been using the app for a few day and it seems as though the performance was impacted only on the first day. Might've been a network issue. Thanks to all for your support in solving this issue! |
Environment
Problem
I am using AngularFire with Angular to store DB items (I also tried with the "vanilla" firebase ending up with the same results). The application works fine on my home computer and on other computers I have tried (Macbook, PC). I also tried different networks (my home network, a hotspot, a public network, my sister's network). However, when I am trying to use the app on my work PC or simply on the company's network, the entire app loads correctly except for the content that needs to get pulled from Firestore. The anti-virus software on all the PCs at work is Symantec Endpoint Protection and zScaler seems to be the proxy filtering web traffic. Unfortunately, since the entire IT infrastructure is managed by a third-party, I do not have access to the configurations of the network. I am not even able to load a single document of a given collection on the actual Firebase Console which leads me to think that the issue has nothing to do with the way the app was coded. The funny thing however is that if I am patient enough, the data will eventually load after several minutes (sometimes 10-15 minutes, sometimes less. Here is an example in a log). Following @mikelehen's advice, I added the following line of code to provide a detailed log :
On my personal computer, everything gets executed in a matter of seconds. On my work computer, it seems as though the request gets stuck after the following line in the debug console without loading the Firestore content :
I also generated a HAR file for reference :
firestore-request-issue.stackblitz.io.zip
Relevant Screenshots :
On my personal PC (the way it should be) :
On my PC at work (something is wrong) :
Relevant Code:
I reproduced the issue in a fairly minimal app on Stackblitz for you to have a look :
https://stackblitz.com/edit/firestore-request-issue
At this point, any help is more than welcome. Thank you
The text was updated successfully, but these errors were encountered: