Issues with grpc-objc

82 views
Skip to first unread message

Nitsan Asraf

unread,
Jan 10, 2024, 4:02:38 PMJan 10
to grpc.io
Hello guys, I am having issues with integrating grpc objective-c with my framework.
I also can't find any modern documentation about how to make a call using gRPC so I used the old one, but I see it causes issues.
Basically when I run it on the simulator it works, but on a physical device it crashes with this:

E0110 21:06:41.205103000 6102937600 ssl_transport_security.cc:1527] Handshake failed with fatal error SSL_ERROR_SSL: error:100000f7:SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER. D0110 21:06:41.205595000 6102937600 security_handshaker.cc:206] Security handshake failed: UNKNOWN:Ssl handshake failed {tsi_code:10, tsi_error:"TSI_PROTOCOL_FAILURE", created_time:"2024-01-10T21:06:41.205249+01:00", file_line:409, file:"/Users/[obscured]/security_handshaker.cc"} E0110 21:06:45.898875000 6104657920 ssl_transport_security.cc:1527] Handshake failed with fatal error SSL_ERROR_SSL: error:100000f7:SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER. D0110 21:06:45.899278000 6104657920 security_handshaker.cc:206] Security handshake failed: UNKNOWN:Ssl handshake failed {tsi_code:10, tsi_error:"TSI_PROTOCOL_FAILURE", created_time:"2024-01-10T21:06:45.899005+01:00", file_line:409, file:"/Users/[obscured]/security_handshaker.cc"} E0110 21:06:51.677430000 6102364160 ssl_transport_security.cc:1527] Handshake failed with fatal error SSL_ERROR_SSL: error:100000f7:SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER. D0110 21:06:51.677834000 6102364160 security_handshaker.cc:206] Security handshake failed: UNKNOWN:Ssl handshake failed {tsi_code:10, tsi_error:"TSI_PROTOCOL_FAILURE", created_time:"2024-01-10T21:06:51.677562+01:00", file_line:409, file:"/Users/[obscured]/security_handshaker.cc"} E0110 21:07:01.889579000 6105804800 ssl_transport_security.cc:1527] Handshake failed with fatal error SSL_ERROR_SSL: error:100000f7:SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER. D0110 21:07:01.889936000 6105804800 security_handshaker.cc:206] Security handshake failed: UNKNOWN:Ssl handshake failed {file:"/Users/[obscured]/security_handshaker.cc", file_line:409, created_time:"2024-01-10T21:07:01.889691+01:00", tsi_error:"TSI_PROTOCOL_FAILURE", tsi_code:10}

I0110 21:07:01.891270000 6105804800 init.cc:208]                       



grpc_shutdown(void)


This is my client code:

   GRPCMutableCallOptions *options = [[GRPCMutableCallOptions alloc] init];

    options.transport = GRPCDefaultTransportImplList.core_insecure;

    SomeRPCService *service = [[SomeRPCService alloc] initWithHost: kHostAddress callOptions: options];


    SomeRPCServiceRequest *request = [[SomeRPCServiceRequest alloc] init];

    request.apiKey = self.apiKey;


    [service SomeRPCServiceRequest:request handler:^(SomeRPCServiceResponse *response, NSError *error) {

        if (response) {

        } else {

        }

    }];

Eryu Xia

unread,
Jan 18, 2024, 7:44:11 PMJan 18
to grpc.io
Thanks for asking!

Could you check if your server is using SSL properly?

If not, you could specify the following option:
options.transport = GRPCDefaultTransportImplList.core_insecure

As in this example below:

Hope that helps!
Reply all
Reply to author
Forward
0 new messages