【问题标题】:Problem loading the website using Firebase when using Burp Proxy使用 Burp 代理时使用 Firebase 加载网站时出现问题
【发布时间】:2021-07-09 02:24:24
【问题描述】:

假设我使用的网站是: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.

请给我解决办法。

【问题讨论】:

  • 你打开拦截器了吗(打嗝)?
  • 拦截已“关闭”,因此我不必每次都“转发”请求。但是代理已打开并正在拦截。我可以在 Proxy History 选项卡和 Flow 扩展中看到内容。
  • 能否在浏览器的网络选项卡中也提供日志?
  • 浏览器网络选项卡何时提供日志?
  • 这些日志是从浏览器的控制台选项卡中提供的

标签: firebase google-cloud-firestore burp


【解决方案1】:

此问题的解决方法 (source)。

对于 Burp,以下匹配和替换对我有用:

this.experimentalForceLongPolling=!!t.experimentalForceLongPolling

this.experimentalForceLongPolling=true

这可能会根据 firebase-js-sdk 的版本而改变,因此最好在您的 JS 文件中查找 experimentalForceLongPolling 并确保它已启用。

【讨论】:

    【解决方案2】:

    使用此故障排除 (https://github.com/firebase/firebase-js-sdk/issues/1190#) 的想法,我在我的 Burp Suite 中进行了以下匹配和替换,并且成功了!

    this.forceLongPolling=void 0!==t.experimentalForceLongPolling&&t.experimentalForceLongPolling
    

    this.forceLongPolling=true
    

    之前有人说过

    这可能会根据 firebase-js-sdk 的版本而改变,因此最好在您的 JS 文件中查看实验性ForceLongPolling 并确保它已启用。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-12-31
      • 2011-02-09
      • 1970-01-01
      • 1970-01-01
      • 2022-08-15
      相关资源
      最近更新 更多