Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-87179

Google Cloud Vision Auto Tag Provider sends the wrong JSON payload


    • Type: Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: Master
    • Fix Version/s: Master
    • Component/s: DM, DM > Auto Tagging
    • Labels:


      Steps to reproduce:

      1. Go to master private.
      2. Enable Asset Auto Tagging in "System Settings --> Assets
      3. Enable the Google Cloud Vision Auto Tag Provider in "System Settings --> Documents And Media" with a valid API Key (https://cloud.google.com/docs/authentication/api-keys).
      4. Add an image to the document library.

      Expected: The image is tagged by google cloud vision.
      Actual: The image is not tagged and an error is displayed in the logs.

      What is actually happening is that we are building a malformed JSON string:

      This is what we should be sending:


      But we are sending something like:


      The problem is that the call we use to create an inline JSON array is passing the value as an Object instead of a JSONObject which ends up being serialized as a String.


          Issue Links



              • Votes:
                0 Vote for this issue
                0 Start watching this issue


                • Created:
                  Days since last comment:
                  6 weeks, 4 days ago