googleapis / google-cloud-php

Google Cloud Client Library for PHP
https://cloud.google.com/php/docs/reference
Apache License 2.0
1.09k stars 434 forks source link

Could not map bindings for google.longrunning.Operations/GetOperation to any Uri template #3546

Closed fabianaturcu closed 11 months ago

fabianaturcu commented 3 years ago

I'm attempting to delete some user events for recommendations. The import, update, list of events work, but even with the same filters that work on listing, the delete method does not work.

Environment details:

    google/apiclient: 2.7",
    google/cloud": 0.144.0,

This is the code I'm using, which can also be found as sample in the package.


 $userEventServiceClient = new UserEventServiceClient();
        try {
            $formattedParent = $userEventServiceClient->eventStoreName($projectId, $location, $catalog, $event_store);
            $filter = "eventTime > \"2018-10-01T00:00:00Z\" eventType = add-to-cart";
            $operationResponse = $userEventServiceClient->purgeUserEvents($formattedParent, $filter);
            $operationResponse->pollUntilComplete();
            if ($operationResponse->operationSucceeded()) {
                $result = $operationResponse->getResult();
                dd($result);
            } else {
                $error = $operationResponse->getError();
                dd($error);
            }
        } catch (ValidationException $e) {
            dd($e->getMessage());
        }

And this is the entire error:

_^ """ Could not map bindings for google.longrunning.Operations/GetOperation to any Uri template. Bindings: Array ( [name] => purge-userevents-default_catalog-default_eventstore-12675777333379994046 ) UriTemplates: Array ( [0] => /v1beta1/{name=projects//locations//catalogs//operations/} [1] => /v1beta1/{name=projects//locations//catalogs//eventStores//operations/*} ) """

Thank you!

ajupazhamayil commented 11 months ago

Sorry for being late here and Thank you for raising the issue. I see the PHP supported version is >=7.4

Please create a new issue if you face this with supported PHP version.