Skip to content

Base64 decoding failed.  #10

@Dayjo

Description

@Dayjo

Hello, I'm getting the following error response when trying to use this library;

array(1) {
  ["error"]=>
  array(4) {
    ["code"]=>
    int(400)
    ["message"]=>
    string(110) "Invalid value at 'requests[0].image.content' (TYPE_BYTES), Base64 decoding failed for "data:image/jpg;base64,""
    ["status"]=>
    string(16) "INVALID_ARGUMENT"
    ["details"]=>
    array(1) {
      [0]=>
      array(2) {
        ["@type"]=>
        string(41) "type.googleapis.com/google.rpc.BadRequest"
        ["fieldViolations"]=>
        array(1) {
          [0]=>
          array(2) {
            ["field"]=>
            string(25) "requests[0].image.content"
            ["description"]=>
            string(110) "Invalid value at 'requests[0].image.content' (TYPE_BYTES), Base64 decoding failed for "data:image/jpg;base64,""
          }
        }
      }
    }
  }
}

I've tried with multiple files and types (png and jpg) and get the same error.

I'm using the demo code;

$gcv->setImage("public/images/upsell/drinks1.jpg");

// 1 is Max result
$gcv->addFeature("LABEL_DETECTION", 1);

Doesn't seem to be anything I can do to get it to work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions