问题描述
假设我使用网站:redacted.com
网站正常使用时正常。
当我开始使用 BURP SUITE PROXY 拦截请求时,我开始出现这个错误:
[2021-04-14T02:45:46.724Z] @firebase/firestore: Firestore (7.24.0): 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.
Error: Uncaught (in promise): FirebaseError: [code=unavailable]: Failed to get document because the client is offline.
请为我提供解决方案。
解决方法
此问题的解决方法 (source)。
对于 Burp,以下匹配和替换对我有用:
this.experimentalForceLongPolling=!!t.experimentalForceLongPolling
到
this.experimentalForceLongPolling=true
这可能会因 firebase-js-sdk
的版本而异,因此最好在您的 JS 文件中查看 experimentalForceLongPolling
并确保它已启用。