20

Question: how to remove an application logo.

Solution: previous solution from this answer, https://stackoverflow.com/a/57168008/1992004, is no longer working.

Google changed the format of "iconUrl" to "icon", and uses now the Base64-encoded data stream, like "icon":"iVBORw0KGgoAAAAN..., instead of the image URL, previously written as "iconUrl":"https://...".

I've tried "icon":"" and many Base64-encoded values like "icon":"IA", "icon":"Lw", and some of other - no success. I get console messages like

for "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"
          }
        ]
      }
    ]
  }
}

or

{
  "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"
      }
    ]
  }
}

or

{
  "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 \" \""
          }
        ]
      }
    ]
  }
}

Does somebody know, what should be inserted here to remove the logo image from the app?

Rafa Guillermo
  • 14,474
  • 3
  • 18
  • 54
Evgeniy
  • 2,337
  • 2
  • 28
  • 68
  • What is the full request you make? – Rafa Guillermo Jun 17 '20 at 08:47
  • Absolutely identical to those recommended in the older thread: copied from the network tab XHR request, which is PUT and contains `?alt=json&key`, copy it as cURL for bash, edited its content - the `icon`-part as described, and run it in the Cloud Shell. – Evgeniy Jun 17 '20 at 09:39
  • Is your application internal? Is uploading a blank/transparent image not a suitable workaround? I don't think there's a supported way of removing a logo, at least one which is documented by Google. – Rafa Guillermo Jun 17 '20 at 10:38
  • yes, absolutely internal. blank image doesn't help - image remains and Google means, it should be validated. – Evgeniy Jun 17 '20 at 10:46
  • For anybody encountering this issue, please star and leave a comment on their open issue: https://issuetracker.google.com/issues/158736319 – Alexander Riccio Apr 12 '21 at 19:52

2 Answers2

18

Answer:

Unfortunately, there is no way for this to be done.

More Information:

Once an OAuth Application Logo has been uploaded there isn't a supported way of removing it - in the question that you linked the way that this was done is a bit hacky, inspecting the network requests and building a new request from the previous JSON object sent via the UI really shows this.

As the icon URL has changed to need a Base-64 encoded value this has been deprecated. Whether this was intentional by Google or not is hard to say, but now an empty value will always return INVALID_ARGUMENT. Any data in the value for icon will also just replace the image data and so this isn't a viable workaround, as as far as the validation process goes, image data exists and so will need to be verified.

If it's not too much of a arduous process, the only workaround here is to create a new GCP project with a new OAuth consent screen without uploading an image. Of course, you will need to reactivate all the relevant APIs and link the relevant scripts and projects to the new set-up.

Feature Request:

You can however let Google know that this is a feature that is important and that you would like to request they implement it. Google's Issue Tracker is a place for developers to report issues and make feature requests for their development services. I would suggest using the feature request template for G Suite Add-ons as this is a component for which GCP Projects could be used.

Update: The feature request for this is viewable here, to increase visibility on this, hit the ☆ at the top of the page.

Relevant Questions:

Nimantha
  • 6,405
  • 6
  • 28
  • 69
Rafa Guillermo
  • 14,474
  • 3
  • 18
  • 54
  • 2
    Good, one more reason to feel frustrated during the pandemic :) And one more issue tracker to vent on ;) – Eric Gopak Aug 09 '20 at 13:52
  • Using DELETE method worked for a while but not anymore (404 error) https://stackoverflow.com/a/63858175/488666 Sad :-( – Maxime Pacary Dec 14 '20 at 10:25
  • There's now a bug report: https://issuetracker.google.com/issues/185141979. Please, upvote it there, hopefully, it will get more attention than a feature request, 'cause honestly, it IS a bug! – Dmitry Apr 24 '21 at 15:33
  • @Dmitry This isn't a bug, it's currently intended behaviour. [This comment](https://issuetracker.google.com/issues/158736319#comment3) on [this feature request](https://issuetracker.google.com/issues/158736319) from a Googler confirms this - *"This feature request is already forward to the Cloud UI product team and they are working on it. However, there is no ETA atthis time."* - it's more important to star *this* issue so Google sees that it's highly requested and bumps up the priority. – Rafa Guillermo Apr 24 '21 at 16:19
0

May 2021 - It is still possible to completely delete the consent screen (and thus allowing to create it again). See my updated answer in https://stackoverflow.com/a/57168008/1992004

ropsnou
  • 164
  • 2
  • 3