Is gRPC a new dependency?

Created on 21 May 2025, 2 months ago

I upgraded from 1.5.1-beta5 to 1.6.0-beta5 with all dependencies. I now get a "The website encountered an unexpected error. Try again later." error when performing a search. The following error was reported in the Drupal logs:

Google\ApiCore\ValidationException: gRPC support has been requested but required dependencies have not been found. For details on how to install the gRPC extension please see https://cloud.google.com/php/grpc. in Google\ApiCore\Transport\GrpcTransport::validateGrpcSupport() (line 56 [...]website/vendor/google/gax/src/GrpcSupportTrait.php).

Is gRPC a new dependency?

The search works when I update the new Transport Options field to "REST".

πŸ’¬ Support request
Status

Active

Version

1.6

Component

Documentation

Created by

πŸ‡ΊπŸ‡ΈUnited States Christian DeLoach

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @Christian DeLoach
  • πŸ‡ΊπŸ‡ΈUnited States tzura

    https://www.drupal.org/project/vertex_ai_search/issues/3525837 πŸ’¬ Is gRPC a new dependency? Active

    There is an issue with PHP8.3 and the gRPC extension. I ran into this in a new environment where the gRPC extension was installed.

    If gRPC is supported, then that will be used first. If not, then it uses REST. We hadn't encountered this issue until working in an environment where the gRPC extension was actually installed. So we added the option.

    Perhaps the REST option should be the default instead.

  • πŸ‡ΊπŸ‡ΈUnited States tzura

    _Error_: Maximum call stack size of 10436608 bytes (zend.max_allowed_stack_size - zend.reserved_stack_size) reached. Infinite recursion? in _Google\ApiCore\CredentialsWrapper->Google\ApiCore\{closure}()_ (line _244_ of _/var/www/html/vendor/google/gax/src/CredentialsWrapper.php_)

    ...this was the error we were seeing.

  • πŸ‡ΊπŸ‡ΈUnited States Christian DeLoach

    Thank you timozura for the quick response!

    I looked at the updates in https://www.drupal.org/project/vertex_ai_search/issues/3524005 πŸ› Conflict with PHP8.3 and gRPC Extension Active and I think I now understand what happened. Previously, the transport argument in DataStoreServiceClient defaulted to "None" which would allow the API to automatically choose the transport.

    Consider adding an "Auto" option to the Transport Options field and default the new Transport Options field to "Auto". If the field is set to "Auto" pass "None" to DataStoreServiceClient. That way if the Transport Options is not set following the module upgrade, the search works the way it did before, allowing DataStoreServiceClient to choose the transport.

    Also, consider changing

    $transport = $values['transport_method'] ?? 'grpc';
    

    to

    $transport = $values['transport_method'] ?? 'None';
    

    Thank you again!

  • πŸ‡ΊπŸ‡ΈUnited States tzura
  • πŸ‡ΊπŸ‡ΈUnited States npoku
  • πŸ‡ΊπŸ‡ΈUnited States tzura
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024