Google钱包错误:请求访问的帧具有“http”协议,被访问的帧具有“http”协议

Google wallet error: The frame requesting access has a protocol of "https", the frame being accessed has a protocol of "http"

本文关键字:http 协议 访问 钱包 请求 Google 错误      更新时间:2023-09-26

我正在尝试启动并运行谷歌钱包,并遵循"入门"教程。当我调用javascript库

<script src="https://sandbox.google.com/checkout/inapp/lib/buy.js"></script>

我在控制台得到以下错误:

Blocked a frame with origin "https://sandbox.google.com" from accessing a frame with origin "http://localhost:12098".  The frame requesting access has a protocol of "https", the frame being accessed has a protocol of "http". Protocols must match.
 inject.js:211
(anonymous function) inject.js:211

我试图使用

<script src="https://sandbox.google.com/checkout/inapp/lib/buy.js"></script>

,但我得到相同的错误。我甚至把我的应用程序在线在https地址,仍然得到错误。我是不是漏掉了什么技巧来让它上膛?

我很确定你可以通过使用http而不是https来解决这个问题。

还要确保清空缓存。在chrome新闻 ctrl + + + +