Javascript 未捕获的异常:Proxy.InstallTrigger 的权限被拒绝

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8251540/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-24 05:19:29  来源:igfitidea点击:

Uncaught Exception: Permission denied to Proxy.InstallTrigger

javascriptfacebookfacebook-graph-api

提问by Steve Barnes

I've searched high and low for this and can easily reproduce it. Running absolute latest PHP SDK and the JS is coming directly from facebook over an HTTPS connection. My 'MyAppId' and domain have been changed in the code that follows. Substitute your own to reproduce.

我已经为此进行了高低搜索,并且可以轻松重现它。运行绝对最新的 PHP SDK 和 JS 直接来自 facebook 通过 HTTPS 连接。我的“MyAppId”和域已在以下代码中更改。替换您自己的以进行复制。

This is with Firefox 8 and Firebug.

这是 Firefox 8 和 Firebug。

Code to reproduce: `

要重现的代码:`

<body>
<div id="fb-root"></div>

<script type="text/javascript">

window.fbAsyncInit = function() {
         FB.init({
        appId: 'MyAppID', 
        status: true, 
        oauth : true, 
        cookie: true,
        channelURL : 'https://www.mydomain.com/channel.html'   
        });

      FB.Canvas.setAutoResize();
      FB.Canvas.scrollTo(0,0); 
};
(function() {
var e = document.createElement('script'); e.async = true;
e.src = document.location.protocol +
'//connect.facebook.net/en_US/all.js';
document.getElementById('fb-root').appendChild(e);
}());
</script>

Test
</body>
</html>

`

`

It is most definitely the calls to FB.Canvas that are generating the error. If I comment both out, no error. If I uncomment one or the other or both - Error.

绝对是对 FB.Canvas 的调用产生了错误。如果我将两者都注释掉,则没有错误。如果我取消注释一个或另一个或两者 - 错误。

The code was working fine until a few days ago. Targeting the top of the page and scaling the iframe properly. I believe this is a FB JS error.

直到几天前,代码运行良好。定位页面顶部并正确缩放 iframe。我相信这是一个 FB JS 错误。

回答by zozo

The problem is not the ff or the fb plugin is the firebug. I checked A page with ff 8.0 and firebug 1.84 and got the error. Then I checked ff 8.0 with firebug 1.8.3.

问题不在于 ff 或 fb 插件是萤火虫。我用 ff 8.0 和 firebug 1.84 检查了 A page 并得到了错误。然后我用firebug 1.8.3检查了ff 8.0。

This is the compatibility table: Firefox 3.6 with Firebug 1.7.3

这是兼容性表:Firefox 3.6 with Firebug 1.7.3

Firefox 4.0 with Firebug 1.7.3

Firefox 5.0 with Firebug 1.8.2 (and also Firebug 1.7.3)

Firefox 6.0 with Firebug 1.8.2 (and also Firebug 1.9 alpha)

Firefox 7.0 with Firebug 1.8.2 (and also Firebug 1.9 alpha)

Firefox 8.0 with Firebug 1.8.3 (and also Firebug 1.9 alpha)

Firefox 9.0 with Firebug 1.8.4 (and also Firebug 1.9 alpha)

Firefox 10.0 with Firebug 1.9 alpha

So... don't worry be happy. Is not a real error... I think. :P

所以……别担心,开心就好。不是真正的错误......我想。:P