【发布时间】:2020-10-06 10:34:19
【问题描述】:
问题:如何移除应用程序徽标。
解决方案:此答案中的先前解决方案 https://stackoverflow.com/a/57168008/1992004 不再有效。
Google 将"iconUrl" 的格式更改为"icon",现在使用Base64 编码的数据流,如"icon":"iVBORw0KGgoAAAAN...,而不是之前写为"iconUrl":"https://..." 的图像URL。
我尝试了"icon":"" 和许多 Base64 编码的值,例如 "icon":"IA"、"icon":"Lw" 和其他一些值 - 没有成功。我收到类似的控制台消息
为"icon":""
{
"error": {
"code": 400,
"message": "The request failed because one of the field of the resource is invalid.",
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": "type.googleapis.com/google.rpc.PreconditionFailure",
"violations": [
{
"type": "client_auth_config",
"subject": "?error_code=9&error_field_name=UpdateIconRequest.icon&error_field_value=%3CByteString@3eeee81e+size%3D0+contents%3D%22%22%3E"
}
]
}
]
}
}
或
{
"error": {
"code": 400,
"message": "Request contains an invalid argument.",
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": "type.googleapis.com/google.identity.clientauthconfig.v1.ClientAuthConfigError",
"code": "ICON_STORAGE_FAILURE"
},
{
"@type": "type.googleapis.com/google.identity.clientauthconfig.v1.IconStorageError",
"reason": "INVALID_IMAGE"
}
]
}
}
或
{
"error": {
"code": 400,
"message": "Invalid value at 'icon' (TYPE_BYTES), Base64 decoding failed for \" \"",
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": "type.googleapis.com/google.rpc.BadRequest",
"fieldViolations": [
{
"field": "icon",
"description": "Invalid value at 'icon' (TYPE_BYTES), Base64 decoding failed for \" \""
}
]
}
]
}
}
有人知道,应该在此处插入什么来从应用程序中删除徽标图像吗?
【问题讨论】:
-
您提出的完整要求是什么?
-
与旧线程中推荐的完全相同:从网络选项卡 XHR 请求复制,该请求是 PUT 并包含
?alt=json&key,将其复制为 bash 的 cURL,编辑其内容 -icon-part 描述,并在 Cloud Shell 中运行它。 -
您的应用程序是内部的吗?上传空白/透明图像不是合适的解决方法吗?我认为没有一种受支持的方法可以删除徽标,至少有一种由 Google 记录的方法。
-
是的,绝对是内部的。空白图片没有帮助 - 图片仍然存在,Google 的意思是,应该对其进行验证。
-
对于遇到此问题的任何人,请在他们的未解决问题上加注星标并发表评论:issuetracker.google.com/issues/158736319
标签: google-apps-script google-cloud-platform google-api google-oauth google-workspace