由hasPasswordField_引发的Facebook iFrame安全错误(document.domain)

mis*_*olf 6 javascript iframe facebook google-chrome ios

我们有一个使用标准Facebook API的项目,主要用于登录和注册.由于我们使用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)
Run Code Online (Sandbox Code Playgroud)

这很奇怪,因为这些方法

 hasPasswordField_ / findPasswordForms
Run Code Online (Sandbox Code Playgroud)

在项目代码上不存在.

因为错误目前只发生在

iOS Chrome Mobile,版本:59.0.3071 | 60.0.3112

有一个Chrome内部组件正在尝试访问Facebook iFrame,或者是Facebook在网页上搜索某些密码字段?

更新: 进一步搜索后,我在Sentry GIT页面上发现了这篇文章:https: //github.com/getsentry/sentry/issues/5267 他们建议只是忽略错误.

任何想法如何面对它不同?任何帮助将不胜感激!

Jos*_*Lee 1

这里说该错误已在版本 61 中修复。https: //crbug.com/709132