我们有一个使用标准 Facebook API 的项目,主要用于登录和注册目的。 由于我们使用哨兵来接收错误通知,因此经常出现以下错误通知(在首页):
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, version: 59.0.3071 | 60.0.3112
有一个 Chrome 内部组件正在尝试访问 Facebook iFrame,或者 Facebook 正在网页上搜索某些密码字段?
更新: 进一步搜索后,我在 Sentry GIT 页面上找到了这篇文章: https://github.com/getsentry/sentry/issues/5267 他们建议简单地忽略错误。
知道如何以不同的方式面对它吗? 任何帮助将不胜感激!
最佳答案
这里说该错误已在版本 61 中修复。https://crbug.com/709132
关于javascript - hasPasswordField_ 引发的 Facebook iFrame 安全错误 (document.domain),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46050071/