-
Notifications
You must be signed in to change notification settings - Fork 265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to call to undefined method getRealContainingOneof #891
Comments
Could you please tell me more what protobuf implementation (C or PHP) do you use? |
Hello, We are currently using the PHP implementation (v3.22.2). |
Could you please share your code to reproduce, then? Thanks. |
Sure. In this example, we are updating an asset with a sitelinkAsset inside of it. ( The ### are the correct names, they are strings that we are using to test. )
|
$adOperation = new AdOperation(); |
Hello, |
Sorry for keeping you waiting. Can you try upgrading to 3.22.3 first? To be 100% sure, you can remove the protobuf directories in Apart from that, some of your other dependencies or projects may fix your protobuf to the older versions than that, or have their own protobuf versions that can silently overwrite the version you think you're using too. You may double-check if that's the case. |
It helped me. Thanks. |
Hmm... Do you use any IDEs? What happens when you trace the Could you also check this answer too? |
Hello, After updating the Google Ad's api version it seems that we had some mix between C's and PHP's implementation and we had both 'working' at the same time. We deleted the C version completely and now it seems to work. Thanks for your time and sorry for all the trouble. |
That's what I thought that there might be a mix between implementations. Sorry that I didn't think of this early. Anyway, I'm happy that you could resolve the issue. |
While trying to update our version of the google-ads-php library to the latest version, v19, we've been facing a problem with the classes in the vendor library that we haven't been able to solve.
Basically, whenever we try to use the FieldMasks utility, more specifically its allSetFieldsOf() static function, we get the following error:
Attempted to call an undefined method named "getRealContainingOneof" of class "Google\Protobuf\FieldDescriptor".
Which is to say, it is as if the class FieldDescriptor didn't contain the getRealContainingOneof() method, except the method appears to be implemented in the class. We considered the possibility that it might be a namespace issue of the class FieldDescriptor, but as far as we can tell, the class methods that return simple types (getName and such) are functional - it's only the methods that would return a Protobuf type message that fail.
If it helps, these are the current versions of the related vendor libraries we're running:
PHP 8.0
Symfony 5.2.14
Google Ads Api V13
Google ads php 19.0.9
Google protobuf 3.22.2
The text was updated successfully, but these errors were encountered: