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

标签 javascript ios facebook google-chrome iframe

我们有一个使用标准 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/

相关文章:

Facebook SDK 4.4 和 Swift - 入门指南

javascript - 获取消息函数的 setInterval 问题

iphone - 使用核心运动无法在后台获取正确的加速度计数据

ios - Facebook深度链接不适用于开放图新闻提要故事

iphone - NSMutableArray of Dictionaries中的replaceobjectatindex

ios - 从 Swift 中的另一个类访问一些值

facebook - firebug:如何 cd 到 iframe

javascript - 将分类数据的配色方案与线性范围相结合

javascript - 逗号运算符会影响 Javascript 中的执行上下文吗?

Javascript - 客户端上的 Poly 剪辑图像