You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jmeter.apache.org by bu...@apache.org on 2020/07/24 16:33:53 UTC

[Bug 64624] New: Russian language in field Type of error encode

https://bz.apache.org/bugzilla/show_bug.cgi?id=64624

            Bug ID: 64624
           Summary: Russian language in field Type of error encode
           Product: JMeter
           Version: 5.2.1
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Main
          Assignee: issues@jmeter.apache.org
          Reporter: nonealexq@gmail.com
  Target Milestone: JMETER_5.3.1

Created attachment 37371
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37371&action=edit
csv report and png of dashboard

Hello!
I have a problem with encoding when generating a dashboard report.
In .csv file the label field is displayed correctly in Russian language, but in
Type of error field the text is displayed incorrectly ('\u041A
\u0441\u043E\u0436\...').
In the search for the truth, I replaced sampleresult.default.encoding = UTF-8
in jmeter.propertis, I also added this encoding for all my requests.
Found such a bug https://bz.apache.org/bugzilla/show_bug.cgi?id=59889 and it
went into the release, checked that this patch is in my version ..

I generate the report like this:
eval $ jmeter -g $ loadReports /report1.csv -o $ loadReports /report

or so, if it is launched through teamcity:
jmeter -n -t $ {JMETER_PATH} / test-plan / $ {FILE_NAME} .jmx -Jlayer = $
{LAYER} -Jusers = $ {USERS_NUMBER} -l /result/result_$ {FILE_NAME }.jtl -j /
result /jmeter_$ {FILE_NAME }.log -e -o / result / report _ $ {FILE_NAME} /

Please tell me how i can fix it

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64624] Russian language in field Type of error encode

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64624

--- Comment #1 from nonealexq <no...@gmail.com> ---
Created attachment 37372
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37372&action=edit
csv report

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64624] Russian language encode in field Type of error in Dashboard report

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64624

--- Comment #11 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Hello Felix,
This looks good to me. 
Thanks for fix

Regards

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64624] Russian language encode in field Type of error in Dashboard report

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64624

--- Comment #5 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Hello,
For now all I can propose to you is build your own version of JMeter with the
call to escape commented.
Keep the replace.

Regards

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64624] Russian language encode in field Type of error in Dashboard report

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64624

nonealexq <no...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Russian language in field   |Russian language encode in
                   |Type of error encode        |field Type of error in
                   |                            |Dashboard report

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64624] Russian language encode in field Type of error in Dashboard report

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64624

--- Comment #18 from Felix Schumacher <fe...@internetallee.de> ---
Note, that due to current changes of the build infrastructure, the current
trunk builds might have been moved to
https://ci-builds.apache.org/job/JMeter/job/JMeter-trunk/

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64624] Russian language encode in field Type of error in Dashboard report

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64624

--- Comment #10 from yicaifeitian <40...@qq.com> ---
Thank very much, this bug is disapper 3.X . 
long long ago, i think whether my config wrong, and then i try envthing i
can(but not commit this bug)

@nonealexq, Thank very much! I got the answer.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64624] Russian language encode in field Type of error in Dashboard report

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64624

Felix Schumacher <fe...@internetallee.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |404051211@qq.com

--- Comment #8 from Felix Schumacher <fe...@internetallee.de> ---
*** Bug 64682 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64624] Russian language encode in field Type of error in Dashboard report

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64624

--- Comment #16 from nonealexq <no...@gmail.com> ---
Hi, I'd love to check it out, but can't find the build, tell me where can I
download the nightly build with this fix?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64624] Russian language encode in field Type of error in Dashboard report

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64624

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|CLOSED                      |---

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64624] Russian language encode in field Type of error in Dashboard report

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64624

Felix Schumacher <fe...@internetallee.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |NEEDINFO
           Keywords|                            |FixedInTrunk

--- Comment #12 from Felix Schumacher <fe...@internetallee.de> ---
Committed to trunk. Could you test the next nightly and report back, whether it
fixed your problems?

commit 21128b56ac4fa1f4d9a260b1f0e4ec3cfa7f033b
AuthorDate: Fri Aug 21 12:53:01 2020 +0200

    Use less aggressive escaping for JSON Strings in reports error messages

    Bug 64624
---
 .../org/apache/jmeter/report/dashboard/JsonizerVisitor.java   |  5 +++--
 .../apache/jmeter/report/processor/ErrorsSummaryConsumer.java | 11 +++++++++--
 xdocs/changes.xml                                             |  1 +
 3 files changed, 13 insertions(+), 4 deletions(-)

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64624] Russian language encode in field Type of error in Dashboard report

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64624

Felix Schumacher <fe...@internetallee.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |RESOLVED
         Resolution|---                         |FIXED

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64624] Russian language encode in field Type of error in Dashboard report

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64624

Felix Schumacher <fe...@internetallee.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |PatchAvailable

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64624] Russian language encode in field Type of error in Dashboard report

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64624

--- Comment #4 from nonealexq <no...@gmail.com> ---
Thanks for the answer, I assumed that the matter is somewhere in the root of
the Java script. Tell me how I can fix this, as I see, this code snippet is
already in visitValueResult, but in version 5.3 I also have broken encoding

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64624] Russian language encode in field Type of error in Dashboard report

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64624

--- Comment #15 from Felix Schumacher <fe...@internetallee.de> ---
To any of the original reporters. Could you test the current nightlies and
report back, if your problems are fixed?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64624] Russian language encode in field Type of error in Dashboard report

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64624

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|JMETER_5.3.1                |---

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64624] Russian language encode in field Type of error in Dashboard report

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64624

--- Comment #13 from Felix Schumacher <fe...@internetallee.de> ---
commit 9a900cb55604c45f7a85dbcd78ba210a17dd9f72
AuthorDate: Sun Aug 30 10:44:47 2020 +0200

    Correct test cases for new behaviour of report generation

    Use less aggressive escaping for JSON Strings in reports error messages

    Relates to 21128b56ac4fa1f4d9a260b1f0e4ec3cfa7f033b
    Bugzilla Id: 64624
---
 .../org/apache/jmeter/report/processor/ErrorsSummaryConsumerTest.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64624] Russian language encode in field Type of error in Dashboard report

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64624

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |p.mouawad@ubik-ingenierie.c
                   |                            |om

--- Comment #3 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
The issue is due to this:

https://github.com/apache/jmeter/blob/master/src/core/src/main/java/org/apache/jmeter/report/dashboard/JsonizerVisitor.java#L99

Escaping is needed to avoid reserved characters breaking the Javascript code.
But the method transforms russian chars into their unicode representation
leading to what you see.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64624] Russian language encode in field Type of error in Dashboard report

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64624

--- Comment #6 from nonealexq <no...@gmail.com> ---
Thank you, in the near future I will add a java script file here that can help
other guys who have encountered the same problem

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64624] Russian language encode in field Type of error in Dashboard report

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64624

--- Comment #17 from Felix Schumacher <fe...@internetallee.de> ---
Thanks, have a look at https://jmeter.apache.org/nightly.html. Both nightlies
and current builds from trunk should work.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64624] Russian language encode in field Type of error in Dashboard report

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64624

--- Comment #20 from nonealexq <no...@gmail.com> ---
Created attachment 37426
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37426&action=edit
afterFix

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64624] Russian language in field Type of error encode

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64624

--- Comment #2 from nonealexq <no...@gmail.com> ---
Sorry, I have a mistake in the sentence.
In the csv file, the encoding and words are correct, but after generating the
report, this field Type of error is generated incorrectly**

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64624] Russian language encode in field Type of error in Dashboard report

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64624

--- Comment #19 from nonealexq <no...@gmail.com> ---
Created attachment 37425
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37425&action=edit
beforeFix

All OK! Thank you very much for the work done. I attach two files before and
after the fix

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64624] Russian language encode in field Type of error in Dashboard report

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64624

nonealexq <no...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #37371|csv report and png of       |png of dashboard
        description|dashboard                   |

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64624] Russian language encode in field Type of error in Dashboard report

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64624

Felix Schumacher <fe...@internetallee.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |805340489@qq.com

--- Comment #14 from Felix Schumacher <fe...@internetallee.de> ---
*** Bug 63997 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64624] Russian language encode in field Type of error in Dashboard report

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64624

nonealexq <no...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |CLOSED

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64624] Russian language encode in field Type of error in Dashboard report

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64624

--- Comment #7 from nonealexq <no...@gmail.com> ---
In fact, the problem was in the generation and you can fix it - replace \\ with
\. Hastily drew a solution in the form of a bash script:

#!/bin/sh

_dashPath=$(find -name "dashboard.js")
_template='\\\\'; _raplace='\\'

_arrFiles=$(echo $_dashPath | tr " " "\n")

for x in $_arrFiles
do
    echo "\"$x\""
    sed -i -e "s%$_template%$_raplace%g" $x
done

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64624] Russian language encode in field Type of error in Dashboard report

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64624

--- Comment #9 from Felix Schumacher <fe...@internetallee.de> ---
Created attachment 37400
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37400&action=edit
Encode JSON special chars, only

The attached patch seems to work with the given Russian sample CSV file.

-- 
You are receiving this mail because:
You are the assignee for the bug.