[英]Problem loading the website using Firebase when using Burp Proxy
假设我使用网站: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.
请给我解决这个问题。
由于 Firebase 更新,答案不再有效 - 我将为您提供有关如何找到自定义匹配替换规则的简短说明:
确保在代理选项选项卡中激活“拦截服务器响应”。
go “拦截”选项卡
将你的打嗝代理设置为“拦截已开启”
在底部的搜索栏中输入“this.forceLongPolling”
转发请求,直到找到匹配项
应该有一个相当大的响应文件,其中包含如下内容:
constructor(t,o,u,p,D,Q,Te,it){
this.databaseId=t,this.appId=o,this.persistenceKey=u,this.host=p,this.ssl=D,this.forceLongPolling=Q,this.autoDetectLongPolling=Te,this.useFetchStreams=it
}
在我的例子中,它包含字符串“this.forceLongPolling=Q”
现在为这个非常特殊的字符串创建匹配替换规则,将“this.forceLongPolling=Q”替换为“this.forceLongPolling=true”,并确保选择“response body”作为类型:
使用此故障排除 ( 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 文件中查看 experimentalForceLongPolling 并确保它已启用。
此问题的解决方法( 来源)。
对于 Burp,以下匹配和替换对我有用:
this.experimentalForceLongPolling=!!t.experimentalForceLongPolling
到
this.experimentalForceLongPolling=true
这可能会根据firebase-js-sdk
的版本而改变,因此最好在您的 JS 文件中查看experimentalForceLongPolling
并确保它已启用。
面临同样的问题。 对我有用的是将“firestore.googleapis.com”添加到 Firefox 代理配置中的“无代理”选项。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.