由hasPasswordField_引发的Facebook iFrame安全错误(document.domain)
我们有一个项目使用标准的Facebook API主要用于login和注册的目的。 由于我们使用Sentry来接收错误通知,因此经常出现以下(主页中):
SecurityError: Blocked a frame with origin "https://www.mywebsite.com" from accessing a frame with origin "https://www.facebook.com". The frame being accessed set "document.domain" to "facebook.com", but the frame requesting access did not. Both must set "document.domain" to the same value to allow access. at hasPasswordField_ (/en:1:368) at hasPasswordField_ (/en:1:499) at findPasswordForms (/en:1:173) at global code (/en:10:27)
这很奇怪,因为方法
hasPasswordField_ / findPasswordForms
在项目代码中不存在。
因为目前只有错误发生
iOS Chrome Mobile,版本:59.0.3071 | 60.0.3112
有一个Chrome内部组件试图访问Facebook的iFrame或Facebooksearch网页上的一些密码字段?
更新:经过进一步的search,我发现这篇文章在Sentry GIT页面: https : //github.com/getsentry/sentry/issues/5267他们build议简单地忽略错误。
任何想法如何面对它不同? 任何帮助将不胜感激!
它在这里说这个bug已经在版本61中修复了。https://crbug.com/709132