Hi all!
There is an issue with upload of media bundles.
Getting "unknown" error:
{ "message": "Request contains an invalid argument.", "code": 3, "status": "INVALID_ARGUMENT", "details": [ { "@type": 0, "data": "type.googleapis.com\/google.ads.googleads.v2.errors.GoogleAdsFailure" }, { "@type": 0, "data": [ { "errorCode": { "requestError": "UNKNOWN" }, "message": "The error code is not in this version.", "location": { "fieldPathElements": [ { "fieldName": "operations", "index": "0" } ] } } ] } ] }
and after that, I checked the file in Google UI and it works there.
Full code:
$mediaBundleAsset = new MediaBundleAsset();
$mediaBundleAsset->setDataUnwrapped(file_get_contents($playable_url));
$asset = new Asset();
$asset->setNameUnwrapped($playable_name);
$asset->setType(AssetType::MEDIA_BUNDLE);
$asset->setMediaBundleAsset($mediaBundleAsset);
$assetOperation = new AssetOperation();
$assetOperation->setCreate($asset);
$assetServiceClient = $googleAdsClient->getAssetServiceClient();
$response = $assetServiceClient->MutateAssets($account_id, [$assetOperation]);
almost same code for image, video asset works...
The error still occurs:
Response
-------
Headers: {
"request-id": "LrDpC6pCM614H6v0gq54Og",
"date": "Thu, 26 Mar 2020 15:58:36 GMT",
"alt-svc": "quic=\":443\"; ma=2592000; v=\"46,43\",h3-Q050=\":443\"; ma=2592000,h3-Q049=\":443\"; ma=2592000,h3-Q048=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,h3-T050=\":443\"; ma=2592000"
}
Fault
-------
Status code: 3
Details: Request contains an invalid argument.
Failure: {"errors":[{"errorCode":{"requestError":"UNKNOWN"},"message":"The error code is not in this version.","location":{"fieldPathElements":[{"fieldName":"operations","index":"0"}]}}]}
In Google Ads UI same file works (see screenshot)