#12652 closed enhancement (fixed)
[Patch] Do not ...snip... bug report messages after 6000 characters.
Reported by: | michael2402 | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 16.04 |
Component: | Core bugreport | Version: | |
Keywords: | Cc: | stoecker |
Description (last modified by )
A URL get parameter is restricted to 2000 characters (server/client dependent). JOSM increases that limit by using GZIP but strips all stack traces after 6000 characters. There are several cases where this is not enough and JOSM did not send along the interesting "Caused by..." line.
#12603 contains the server side code for this. That patch is already applied so this code is ready to be used.
This is what it looks like if an error occurred while opening the browser window:
Attachments (3)
Change History (21)
by , 9 years ago
Attachment: | patch-bugreport-longer-error-message-1.png added |
---|
by , 9 years ago
Attachment: | patch-bugreport-longer-error-message.patch added |
---|
comment:1 by , 9 years ago
Description: | modified (diff) |
---|
comment:2 by , 9 years ago
Component: | Core → Core bugreport |
---|---|
Milestone: | → 16.03 |
comment:4 by , 9 years ago
That's bad, this means that something is wrong with the python script. This is what it should look like.
[java] INFO: POST https://josm.openstreetmap.de/josmticket (642 B) ... [java] INFO: POST https://josm.openstreetmap.de/josmticket -> 200 [java] INFO: Öffne URL: https://josm.openstreetmap.de/josmticket?pdata_stored=ac4a1d656daa4075bac5c82c
For me, it worked this time and the times before that. If you encounter this again, can you try to dump the complete server response by adding this in BugReportSender
after Response connection = client.connect();
? There should be a python error message.
System.out.println(new Scanner(connection.getContentReader()).useDelimiter("\\A").next());
comment:6 by , 9 years ago
There is still a problem with this...
[java] File "/home/josm/trac/plugins/JOSM.py", line 361, in process_request [java] req.session['preparedticket'] = pdata.encode('utf-8') [java] UnicodeDecodeError: 'ascii' codec can't decode byte 0xe4 in position 480: ordinal not in range(128)
There seems to be an issue with the database storing that text.
I'll try to read into postgres code and find a fix that changes the encoding tomorrow... For the post parameters I added this later on:
xxx.decode('utf-8', errors='ignore')
by , 9 years ago
Attachment: | patch-bugreport-longer-error-message.2.patch added |
---|
comment:8 by , 9 years ago
I updated the patch. The only change is to use UTF-8 to encode the base64 string.
Base64#encode(String) can only handle ascii.
comment:9 by , 9 years ago
There's still one problem, in the About action we still have a link to https://josm.openstreetmap.de/josmticket?gdata=<...>
It fails:
Erreur impliquant Genshi (UnicodeDecodeError - '/usr/local/lib/python2.7/dist-packages/Trac-1.0.9-py2.7.egg/trac/ticket/templates/ticket.html', line 251, char -1)
It needs to be fixed for older JOSM clients.
it does not work: