加载https://docs.google.com/picker?protocol=gadgets&origin=http%3A%2F%2Flocalho...2photos%22))&rpctoken=yxxydsx40r21&rpcService=2dngvfb4tj9x&thirdPartytrue': 'ALLOW-FROM http://localhost:8000' 不是公认的指令.标题将被忽略.我是否会忽略这一点,还是会在以后给我带来麻烦? 解决方案 This is a bughttps://issuetracker.google.com/issues/177046274对于将其用作 Apps Script Add-on 的一部分的人来说,似乎有一些解决方法,参考此堆栈问题:Google Picker API 源值无效错误尽管这不适用于使用 JavaScript 的官方快速入门.我已经用 Chrome 和 Firefox 对此进行了测试,两者都给出了相同的结果.如果这对您有影响,请务必在上面链接的问题上加星标.Im getting this console error on my localhost when connecting to google drive API, but the picker I have configured in my script successfully displays my drive's contents: Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://docs.google.com') does not match the recipient window's origin ('http://localhost:8000'). Invalid 'X-Frame-Options' header encountered when loading 'https://docs.google.com/picker?protocol=gadgets&origin=http%3A%2F%2Flocalho…2photos%22))&rpctoken=yxxydsx40r21&rpcService=2dngvfb4tj9x&thirdParty=true': 'ALLOW-FROM http://localhost:8000' is not a recognized directive. The header will be ignored.Do I ignore this or will it introduce trouble for me down the road? 解决方案 This is a bughttps://issuetracker.google.com/issues/177046274There seems to be a few workarounds there for people using it as part of an Apps Script Add-on, making reference to this stack question:Google Picker API Invalid origin value errorThough this doesn't work for the official quickstart using JavaScript.I have tested this with Chrome and Firefox and both give the same results.If this is affecting you please be sure to go and star the issue linked above. 这篇关于Google API 错误,但仍然有效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!