Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

gRPC not working #36

Open
iazaran opened this issue Feb 13, 2022 · 0 comments
Open

gRPC not working #36

iazaran opened this issue Feb 13, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@iazaran
Copy link
Owner

iazaran commented Feb 13, 2022

Describe the bug
Unknown issue on gRPC response

To Reproduce
Steps to reproduce the behavior:

  1. Start docker-compose up -d that include requirements for gRPC
  2. Making sure that .proto is updated and PHP classes generated by
docker-compose exec php-mvc-app protoc -I=src/Controllers/API \
    src/Controllers/API/blog.proto \
    --php_out=src/Controllers/API/gRPC \
    --grpc_out=src/Controllers/API/gRPC \
    --plugin=protoc-gen-grpc=/usr/bin/grpc_php_plugin
  1. There is an example route to Show method in grpc/index.php. Now run grpcurl -v -plaintext -d '{"slug": "an-example"}' -proto ./src/Controllers/API/blog.proto localhost:8585 blog.Blog/Show

Expected behavior
Something like

{"id": 1, "slug": "an-example", ... "updated_at": "2022-02-14 00:00:00"}

But I receive:

Resolved method descriptor:
// READ one
rpc Show ( .blog.PostRequest ) returns ( .blog.PostResponse );

Request metadata to send:
(empty)

Response headers received:
content-type: application/grpc+proto
date: Sun, 13 Feb 2022 22:31:07 GMT
server: nginx/1.21.3
x-powered-by: PHP/8.1.1

Response trailers received:
(empty)
Sent 1 request and received 0 responses
ERROR:
  Code: ResourceExhausted
  Message: grpc: received message larger than max (808722512 vs. 4194304)

Even after including grpc.max_receive_message_length on client class. Also testing by PostMan and Kreya shows the 13 Internal error and 'Failed to deserialize response message'

@iazaran iazaran added the bug Something isn't working label Feb 13, 2022
@iazaran iazaran self-assigned this Feb 13, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant