简体   繁体   English

频繁出现“发生网络错误(例如超时、连接中断或主机无法访问)”。 使用 Firebase

[英]Frequent "A network error (such as timeout, interrupted connection or unreachable host) has occurred." with Firebase

I'm using Firebase anon login to authenticate certain parts of our API.我正在使用 Firebase anon login 来验证我们 API 的某些部分。 This error "A network error (such as timeout, interrupted connection or unreachable host) has occurred."此错误“发生网络错误(例如超时、中断的连接或无法访问的主机)。” seems to pop up frequently with no apparent pattern.似乎经常弹出,没有明显的模式。

This seems to happen in all types of browsers.这似乎发生在所有类型的浏览器中。 Mobile, tablet or desktop but I can't for the life of me reproduce this error.移动设备、平板电脑或台式机,但我终生无法重现此错误。 I've tried many different types of physical devices as well as Browserstack.我尝试了许多不同类型的物理设备以及 Browserstack。

Some have suggested that users experiencing this aren't allowing Javascript or have some kind of browser extension preventing Firebase to work correctly.有些人建议遇到这种情况的用户不允许使用 Javascript 或使用某种浏览器扩展程序阻止 Firebase 正常工作。 I find that hard to believe since this keeps happening very frequently.我觉得这很难相信,因为这种情况经常发生。 (Also I've never met a person in my whole career that has Javascript disabled). (此外,在我的整个职业生涯中,我从未遇到过禁用 Javascript 的人)。

I initialize Firebase like so in my React's index entry point.我在 React 的索引入口点像这样初始化 Firebase。

if (!firebase.apps.length) {
    // ... config setup
    firebase.initializeApp(config);
}

firebase.auth().signInAnonymously()
    .catch((error) => {
        bugsnag.notify(error);
});

I'm using React 16.8.6 and Firebase 5.9.4.我正在使用 React 16.8.6 和 Firebase 5.9.4。

Error seems to be originating in google-closure-library:错误似乎源自 google-closure-library:

../node_modules/google-closure-library/closure/goog/async/nexttick.js:41:44

在此处输入图片说明

I'm hoping users aren't affected by this error but I have no idea if they are.我希望用户不会受到此错误的影响,但我不知道他们是否会受到影响。

I fixed this issue(my issue) pausing my Kaspersky anti-virus.我修复了这个问题(我的问题),暂停了我的卡巴斯基反病毒软件。 I found some other answers saying the html form tag caused this.我发现其他一些答案说 html 表单标签导致了这个。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Firebase '发生网络错误(例如超时、连接中断或主机无法访问)。 - Firebase 'A network error (such as timeout, interrupted connection or unreachable host) has occurred.' 发生网络错误(例如超时,连接中断或主机不可达) - A network error (such as timeout, interrupted connection or unreachable host) has occurred Firebase 身份验证:错误:发生网络错误(例如超时、连接中断或主机无法访问) - Firebase Auth : Error: A network error (such as timeout, interrupted connection or unreachable host) has occurred Web中的Firebase:发生了网络错误(例如超时,中断连接或无法访问的主机)? - Firebase in Web : A network error (such as timeout, interrupted connection or unreachable host) has occurred? Firebase HelloWorld的云功能“错误:发生意外错误。” - Cloud Functions for Firebase HelloWorld “Error: An unexpected error has occurred.” 使用Firebase注册电子邮件/密码时出现“网络错误”错误 - “A network error has occurred” error on email/password sign up with Firebase Android - cordova - 发生网络错误 - Android - cordova - A network error has occurred Firebase createUserWithEmailAndPassword上的超时连接 - Timeout connection on firebase createUserWithEmailAndPassword Facebook feed对话框显示“发生错误。 请稍后再试” - Facebook feed dialog is showing “An error occurred. Please try later” facebook apprequests:发生错误。 请稍后再试 - facebook apprequests : An error occurred. Please try again later
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM