【发布时间】:2022-01-24 17:22:46
【问题描述】:
我的一些用户无法在我的网络应用程序中使用 Google Picker。在这一点上,我尝试了很多不同的东西。没有任何效果。所以,我想深入探讨一个根本区别。
请求成功的用户的请求采用这种形式:
Query String Parameters
hl: en_US
xtoken: <redacted>
origin: http://localhost:3000
oauth_token: <redacted>
hostId: localhost
Form Data
start: 0
numResults: 50
sort: 3
desc: true
cursor:
mine: 2
service: docs
type: EVERYTHING
options: {"notInFolder":true,"mimeTypes":"application/msword,application/vnd.google-apps.document,application/vnd.google-apps.kix,application/vnd.ms-word,application/vnd.ms-word.document.macroEnabled.12,application/vnd.ms-word.document.macroenabled.12,application/vnd.ms-word.template.macroEnabled.12,application/vnd.ms-word.template.macroenabled.12,application/vnd.oasis.opendocument.text,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.wordprocessingml.template,text/plain,application/vnd.google-apps.folder","ff":true}
token: <redacted>
version: 4
app: 2
subapp: 5
clientUser: <redacted>
请求失败的用户有采用这种形式的请求(无表单数据):
Query string parameters
protocol: gadgets
origin: http://localhost:3000
multiselectEnabled: true
oauth_token: <redacted>
hostId: localhost
parent: http://localhost:3000/favicon.ico
nav: (("documents",null,{"includeFolders":true}),("upload",null,{"query":"docs"}))
rpcService: <redacted>
rpctoken: <redacted>
thirdParty: true
ppli: 2
根据这个请求,缩小版选择器产生的Uncaught Error: xb at m=opnc:1067错误来自加载"gapi.iframes"的模块部分:
yt.prototype.init = function(a) {
var b = this;
this.O = a;
this.N = this.V.load("gapi.iframes").then(function(c) {
return c.JV.getContext()
}).then(function(c) {
return c && c.getParentIframe()
}).then(function(c) {
if (!c) // C does not exist for me!!!!
throw Error("xb"); // So, I get this error.
return c
});
return this.N.then(function(c) {
return void eoa(b, c)
})
}
我不知道为什么 Picker 会产生不同的请求。我这边的逻辑是一样的,总是成功获取OAuth令牌。为什么会发生这种情况?
【问题讨论】:
-
此行为可能源自禁用 cookie 的环境。能否请您检查请求失败的用户是否启用了所有 cookie?
-
@Jacques-GuzelHeron 是的,我们检查了几次。据我们所知,所有受影响的用户都启用了所有 cookie。通过最新的一组更新,这个 API 似乎只对我、开发人员和 GCP 管理员有效。我认为这可能是一个开发关键问题,但我不知道如何解决这个问题。自密钥最初生成以来,设置已更改。我必须再生吗?所有受影响的用户都已添加为测试用户。
-
@Jacques-GuzelHeron 仅供参考,再生没有任何作用。
-
不幸的是,我实际上还没有解决它。我认为我们面临同样的问题(我的电子设置可能与您的用户相似)从调试器看来,
c.getParentIframe()正在返回null。不确定这与信用有什么关系,但看起来网页和内 iframe js 之间的消息传递失败了? -
我在上个月遇到了这个问题,并尝试了很多不同的支持渠道。几个月前我遇到了一个类似的问题,最终与扩展程序发生冲突(断开连接)。也许尝试自己调查一下。与 Workspace 开发人员支持 rn 交谈。所以,让我们祈祷吧。