Google一键式和意外的JavaScript错误

时间:2018-10-05 11:03:37

标签: javascript angular google-chrome google-authentication google-identity

我正在尝试在我们的网站上实施Google一键式。 主页的一切都很好。一键式菜单显示。测试客户成功登录。

一键式加载网站的所有页面。但是,在其他页面上,我在浏览器控制台中看到javascript错误,并且不显示“一键式”(我想是由于错误)。

执行https://smartlock.google.com/client中的代码时似乎发生了错误。

以下是浏览器以红色显示的js错误日志。

网站名称已删除。

任何人都在想什么原因以及如何解决它?

Unhandled Promise rejection: Cannot read property 'postMessage' of null ; Zone: <root> ; Task: Promise.then ; Value: TypeError: Cannot read property 'postMessage' of null
    at Function.<anonymous> (client:formatted:1085)
    at l (client:formatted:490)
    at Object.next (client:formatted:436)
    at u (client:formatted:411)
    at t.invoke (polyfills.js:formatted:3436)
    at n.run (polyfills.js:formatted:3246)
    at polyfills.js:formatted:3803
    at t.invokeTask (polyfills.js:formatted:3459)
    at n.runTask (polyfills.js:formatted:3288)
    at d (polyfills.js:formatted:3580) TypeError: Cannot read property 'postMessage' of null
    at Function.<anonymous> (https://smartlock.google.com/client:86:67)
    at l (https://smartlock.google.com/client:67:60)
    at Object.next (https://smartlock.google.com/client:65:467)
    at u (https://smartlock.google.com/client:65:232)
    at t.invoke (https://xxxx.com/angular-cli/dist/g/polyfills.js:1:57112)
    at n.run (https://xxxx.com/angular-cli/dist/g/polyfills.js:1:52289)
    at https://xxxx.com/angular-cli/dist/g/polyfills.js:1:63536
    at t.invokeTask (https://xxxx.com/angular-cli/dist/g/polyfills.js:1:57796)
    at n.runTask (https://xxxx.com/angular-cli/dist/g/polyfills.js:1:52980)
    at d (https://xxxx.com/angular-cli/dist/g/polyfills.js:1:60021)

有什么想法吗?

谢谢。

0 个答案:

没有答案