[ 
https://issues.apache.org/jira/browse/THRIFT-5305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18112794#comment-18112794
 ] 

Sylwester Lachiewicz edited comment on THRIFT-5305 at 9/8/26 1:45 PM:
----------------------------------------------------------------------

{{Bytes.convert_to_utf8_byte_buffer}} 
([bytes.rb:80|https://github.com/apache/thrift/blob/master/lib/rb/lib/thrift/bytes.rb#L80])
 is unchanged from the 0.13.0 the stack trace comes from — the body is 
identical to v0.13.0 lines 78-87 — so a Symbol reaching {{write_string}} still 
fails on {{String#encode}} at line 83. The value in the trace is a Symbol where 
a string field is expected, so what is open is whether the Ruby client should 
coerce it or raise a typed protocol error. Reopening.


was (Author: slachiewicz):
{{Bytes.convert_to_utf8_byte_buffer}} 
([bytes.rb:80|https://github.com/apache/thrift/blob/master/lib/rb/lib/thrift/bytes.rb#L80])
 is unchanged from the 0.13.0 the stack trace comes from — the body is 
identical to v0.13.0 lines 78-87 — so a Symbol reaching {{write_string}} still 
fails on {{String#encode}} at line 83. The value in the trace is a Symbol where 
a string field is expected, so what is open is whether the Ruby client should 
coerce it or raise a typed protocol error. Reopening.

> undefined method `encode' in convert_to_utf8_byte_buffer
> --------------------------------------------------------
>
>                 Key: THRIFT-5305
>                 URL: https://issues.apache.org/jira/browse/THRIFT-5305
>             Project: Thrift
>          Issue Type: Bug
>          Components: Ruby - Compiler, Ruby - Library
>            Reporter: Dinuka DeSilva
>            Priority: Major
>
>  I'm using the generated thrift client to build a library.
> [https://github.com/apache/airavata/pull/265]
>  
> I'm actually blocked with this issue. 
> {{}}
> {code:java}
> Failure/Error: send_message('isUserExists', IsUserExists_args, :authzToken => 
> authzToken, :gatewayId => gatewayId, :userName => userName) NoMethodError: 
> undefined method `encode' for :userName:Symbol Did you mean? encoding # 
> ./vendor/bundle/ruby/2.3.0/gems/thrift-0.13.0/lib/thrift/bytes.rb:81:in 
> `convert_to_utf8_byte_buffer' # 
> ./vendor/bundle/ruby/2.3.0/gems/thrift-0.13.0/lib/thrift/protocol/binary_protocol.rb:110:in
>  `write_string' # 
> ./vendor/bundle/ruby/2.3.0/gems/thrift-0.13.0/lib/thrift/client.rb:44:in 
> `write' # 
> ./vendor/bundle/ruby/2.3.0/gems/thrift-0.13.0/lib/thrift/client.rb:44:in 
> `send_message_args' # 
> ./vendor/bundle/ruby/2.3.0/gems/thrift-0.13.0/lib/thrift/client.rb:30:in 
> `send_message' # ./lib/airavata.rb:21:in `send_isUserExists' # 
> ./lib/airavata.rb:16:in `isUserExists' # ./spec/sdk_spec.rb:15:in `block (2 
> levels) in <top (required)>'{code}
> {{}}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to