rh-messaging / cli-cpp

Apache License 2.0
1 stars 1 forks source link

'utf-8' codec can't decode byte 0xa1 in position 238: invalid start byte #13

Open jiridanek opened 3 years ago

jiridanek commented 3 years ago
[10:25:31] [PASS] dtestlib.Test :: [root@10.0.135.47]$  /var/dtests/node_data/clients/cli_wrapper.sh  -DDTESTS_PID=15711 -DC_KILLTIME=200 -DC_HANG_ANALYSIS_ENA=0 -DC_CRASH_ANALYSIS_ENA=0 -DC_CRASH_FILE_DELETE_ENA=0  /var/dtests/node_data/clients/aac0_sender  --log-msgs dict --broker admin:admin@10.0.135.47:5672 --connection-options "{  sasl_mechanisms : 'PLAIN', protocol : 'amqp1.0' }" --address "'test_direct_transient_list_message'" --count 1 --msg-content-list-item "" --msg-content-list-item "String" --msg-content-list-item "~1" --msg-content-list-item "~1.0" --msg-content-list-item "1" --msg-content-list-item "1.0" --msg-content-list-item "~-1" --msg-content-list-item "~-1.3" --msg-content-list-item "-1" --msg-content-list-item "~~1" --msg-correlation-id corr-id-cddBEp # ecode:0 (exp. 0), dur.:0.14
$ /var/dtests/node_data/clients/aac0_receiver --log-msgs dict --broker admin:admin@10.0.135.47:5672 --connection-options {  sasl_mechanisms : 'PLAIN', protocol : 'amqp1.0' } --address 'test_direct_transient_list_message' --count 1 >/tmp/dtests_15711/wraptmp.15711.aac0_receiver.1e9b761d.stdout.RCwNgR6zFg.txt 2>/tmp/dtests_15711/wraptmp.15711.aac0_receiver.1e9b761d.stderr.lvAWGR3qyR.txt

$ less /tmp/dtests_15711/wraptmp.15711.aac0_receiver.1e9b761d.stdout.RCwNgR6zFg.txt
{'redelivered': 'False', 'reply_to': '', 'subject': '', 'content_type': 'amqp/list', 'user_id': '', 'id': '', 'correlation_id': 'corr-id-cddBEp', 'priority': '0', 'durable': 'False', 'ttl': 0, 'size': '62',  'properties': {}, 'content': '<A1>^@<A1>^FString<81>^@^@^@^@^@^@^@^A<82>?<F0>^@^@^@^@^@^@<A1>^A1<A1>^C1.0<81><FF><FF><FF><FF><FF><FF><FF><FF><82>
<BF><F4><CC><CC><CC><CC><CC>͡^B-1<A1>^B~1'}```
jiridanek commented 3 years ago

This is seriously weird, because I clearly remember we fixed this. It apparently resurfaced just because the binary is compiled differently? Or due to some other mistake I made now? The original fix for this is bef127ac58c64e8a37c33d0589c13bb7034cf001, https://issues.redhat.com/browse/MSGQE-5824.

jiridanek commented 3 years ago

The problem appears to be the ENABLE_MODERN CMake flag/preprocessor define. We've fixed the legacy path, but not the "modern" code path for printing.

jiridanek commented 3 years ago

Printing with -DENABLE_MODERN=OFF does work,

{'redelivered': True, 'reply_to': None, 'subject': None, 'content_type': 'amqp/list', 'id': None, 'user_id': None, 'correlation_id': 'corr-id-cddBEp', 'priority': 0, 'durable': False, 'ttl': 0, 'properties': {'x-amqp-delivery-count': 1}, 'content': [None, 'String', 1, 1.000000e+00, '1', '1.0', -1, -1.300000e+00, '-1', '~1']}