Hello.
I recently updated my Google Ads API client code from v17 to v18, but I’m encountering an unexpected error. The same code was working perfectly in v17. Here’s the error I get when running the updated version:
Here’s a simplified version of my code:
When I updated GoogleAdsClient.load_from_env(version="v17") to version="v18", the error started appearing.
I checked the release notes for v18, but I couldn’t find any mention of changes related to CampaignCriterionService or MutateCampaignCriteria.
I would appreciate any insights or suggestions for resolving this issue.
Thanks in advance!
Hi,
Thank you for reaching out to the Google Ads API support team.
From the provided logs, I understand that you have encountered the “UNKNOWN, The error code is not in this version” error while trying to mutate the Campaign Criteria and also I could see that the code was working perfectly as expected in V17 but generated an unknown error in V18. Kindly note that we have replicated your issue and successfully mutated the Campaign Criteria in V18. So I would recommend you to attempt the API request again.
If you still face any issues, please feel free to contact us.
![]() |
Google Ads API Team |
Dear Google Ads API Support Team,
Thank you for your response and for replicating the issue on your side. However, I have attempted the API request again after updating my Python packages to the latest versions, and I am still encountering the same error:
google.ads.googleads.errors.GoogleAdsException: (<_InactiveRpcError of RPC that terminated with:
status = StatusCode.INVALID_ARGUMENT
details = "Request contains an invalid argument."
debug_error_string = "UNKNOWN:Error received from peer ipv4:XXX.XXX.XXX.XXX:443 {grpc_message:"Request contains an invalid argument.", grpc_status:3, created_time:"2024-12-13T11:28:47.891219+09:00"}"
>, <_InactiveRpcError of RPC that terminated with:
status = StatusCode.INVALID_ARGUMENT
details = "Request contains an invalid argument."
debug_error_string = "UNKNOWN:Error received from peer ipv4:XXX.XXX.XXX.XXX:443 {grpc_message:"Request contains an invalid argument.", grpc_status:3, created_time:"2024-12-13T11:28:47.891219+09:00"}"
>, errors {
error_code {
request_error: UNKNOWN
}
message: "The error code is not in this version."
trigger {
string_value: "OWNED_AND_OPERATED"
}
location {
field_path_elements {
field_name: "operations"
index: 0
}
field_path_elements {
field_name: "create"
}
field_path_elements {
field_name: "language"
}
}
}
request_id: "S1q2EhUZJKqcW_dfodWnrQ"
, 'S1q2EhUZJKqcW_dfodWnrQ')
====================
======================
Could you please take another look? I would greatly appreciate any further insights or advice on resolving this issue.
Thank you for your continued support.
Best regards,
Hi,
As you have mentioned that your code was working fine with the V17 version, please share the complete updated API logs (request and response with request-id and request header) generated at your end without redacting any information for the same request using the version V17 of the Google Ads API.
You can send the details via Reply privately to the author option, or direct private reply to this email.