Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Channel messages with long base64 data is wrongly displayed #6312

Open
ppazos opened this issue Sep 23, 2024 · 4 comments
Open

[BUG] Channel messages with long base64 data is wrongly displayed #6312

ppazos opened this issue Sep 23, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@ppazos
Copy link

ppazos commented Sep 23, 2024

Describe the bug
I have a JSON with some data that is base64 encoded, the data is long, when I try to:

  1. send a message to a channel from the Channel Messages screen
  2. display the contents of the logs from the Channel Messages screen

All I see is the long, single line data, kind of displayed wrapped but in the same line, so it's basically noise.

Screenshot_2024-09-23_20-11-47

To Reproduce

Steps to reproduce the behavior:

  1. Create a channel that receives JSON, like a HTTP Listener
  2. Create a sample JSON with one field and the value is base64 encoded data, like a PDF in B64
  3. Deploy the channel
  4. Send the JSON to the channel (if you send from the Channel Messages > Right click > Send Message, you will see the noise when you paste the JSON there)
  5. Go to the Channel Messages to check the logs
  6. Select the log, below in Raw you will see the JSON with the strange noise instead of the data

Expected behavior
Display the data as is in the original message.

Actual behavior
It's showing noise.

Screenshots
See above.

Environment (please complete the following information):

  • OS: Linux Mint
  • Java Distribution/Version OpenJDK 11
  • Connect Version 4.5.0 (it happened in previous versions too)

Workaround(s)
None

@ppazos ppazos added the bug Something isn't working label Sep 23, 2024
@pacmano1
Copy link
Collaborator

I don't think it has anything to with base64. I have seen this before also. If I remember correctly, it was using the admin tool on Linux only (Windows and MacOS didn't mess the display up). I think I finally gave up after the rabbit hole of Linux video drivers, Linux versions and java versions.

@pacmano1
Copy link
Collaborator

pacmano1 commented Sep 23, 2024

Oh - do import the windows font to Linux - Tahoma I think, there are other posts on it. I know you posted about font size in the admin tool itself some time ago.

I did replicate your problem again albeit in a VM with Tahoma font installed.

@ppazos
Copy link
Author

ppazos commented Sep 24, 2024

@pacmano1 I believe the issue is with any long continuous text, the base64 was just my case.

I can't install the windows font in my linux box because it breaks the text for other applications. There should be some other workaround or it would be better to just dump the whole layout manager which is painful to work with, though I'm not 100% sure this is because of the layout manager.

@Shurazi
Copy link

Shurazi commented Sep 29, 2024

Sounds like this: https://bugs.openjdk.org/browse/JDK-8262010
Suggested fix is to add -Dsun.java2d.xrender=false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants