使用 Burp Proxy 时使用 Firebase 加载网站时出现问题

问题描述

假设我使用网站:redacted.com
网站正常使用时正常。
当我开始使用 BURP SUITE PROXY 拦截请求时,我开始出现这个错误

IMAGE-WITH-ERROR

[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 并确保它已启用。

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...