Error on image attachments

42 views
Skip to first unread message

Yat Tim

unread,
Sep 4, 2025, 1:05:01 PMSep 4
to Orbeon Forms
Hello

When files are uploaded to image attachment fields, image will be distorted. It will also generate a broken PDF. image upload works fine for a while when server is restarted. What could be the potential cause ? 

Thank you
Tim 
Orbeon_image.png

Alessandro Vernet

unread,
Sep 4, 2025, 4:57:22 PMSep 4
to orb...@googlegroups.com
Hi Tim,

Can you reproduce this on the Orbeon Forms demo instance (see link below)? If so, could you share a link to the form where I can see the issue?


--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orbeon+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/orbeon/64a6beac-00e4-422e-a694-3de3577f8cf5n%40googlegroups.com.

Yat Tim

unread,
Sep 7, 2025, 3:14:01 PMSep 7
to Orbeon Forms
Alex 

I have made a few attempts however I couldnt reproduce the issue on demo site. On my local server, it seems that I am able to upload the image properly for anything within 100KB. Orbeon log shows that document cache is within limit tho. 

 "source": "xforms", "message": "after cacheOrStore", "document cache current size": "10", "document cache max size": "50"}

Orbeon_image_2.png


Tim

Alessandro Vernet

unread,
Sep 7, 2025, 8:14:16 PMSep 7
to orb...@googlegroups.com
Hi Tim,

Thank you for checking the demo server (it would certainly have been easier if we could reproduce the problem there). When you upload the image, does it appear corrupted immediately, or only after saving the data and reloading the form? Which database are you using for persistence, the built-in SQLite or an external relational database? Could you also check whether the attachment is corrupted in the database (see the table `orbeon_form_data_attach`)?

-Alex

Yat Tim

unread,
Sep 9, 2025, 10:45:26 PMSep 9
to Orbeon Forms
Alex

Images are corrupted immediately. It is an external database. Attachments are also corrupted in database.

Tim

Alessandro Vernet

unread,
Sep 9, 2025, 10:51:38 PMSep 9
to orb...@googlegroups.com
Hi Tim,

Got it. If the images are corrupted right away, even before saving, then this isn't a persistence issue. Do you see the same behavior in different browsers, such as Firefox and Chrome? Which version of Orbeon Forms are you running, and on which servlet container (Tomcat, WildFly, etc.)?  Is this happening only with a specific form or with any form to which you add an image attachment?

-Alex

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orbeon+un...@googlegroups.com.

Yat Tim

unread,
Sep 12, 2025, 9:33:19 PM (14 days ago) Sep 12
to Orbeon Forms
Alex

It is 2023.1.3.202406131619 thru tomcat. All forms adding image attachment are having this issue. 

Tim

Alessandro Vernet

unread,
Sep 13, 2025, 2:33:35 AM (13 days ago) Sep 13
to orb...@googlegroups.com
Hi Tim,

So this is with a fairly recent version of Orbeon Forms. Are you seeing this in both Chrome and Firefox? If you're using an older JVM, could you try a more recent one, like Java 17 or 21?

-Alex

Yat Tim

unread,
Sep 19, 2025, 1:59:18 AM (7 days ago) Sep 19
to Orbeon Forms
Hi Alex

I am able to reproduce issue from multiple workstations, Chrome, Firefox and Edge. Server JVM build is 21.0.7

Tim

Alessandro Vernet

unread,
Sep 19, 2025, 2:11:02 AM (7 days ago) Sep 19
to orb...@googlegroups.com
Hi Tim,

Thank you for testing this with different browsers. I believe we can eliminate the possibility of this issue being browser-related. Since Java 21.0.7 is the latest release of Java 21, you're covered on that front as well.

Could you try saving the corrupted image as shown in the browser and comparing it to the file you uploaded? Do you notice any specific differences? Is the file size smaller? Is it the same until a certain point, after which it might be truncated?

-Alex

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orbeon+un...@googlegroups.com.

Yat Tim

unread,
Sep 23, 2025, 11:43:54 AM (3 days ago) Sep 23
to Orbeon Forms
Alex

Everything seems to be identical except the broken part. see one of the attached sample.

Tim
Screenshot 2025-09-21 173759.png
Screenshot 2025-09-21 173750.png

Alessandro Vernet

unread,
Sep 23, 2025, 2:51:32 PM (3 days ago) Sep 23
to orb...@googlegroups.com
Hi Tim,

The file sizes do appear to match. It's possible that in the corrupted version, the file ends with zeros for some reason. Unfortunately, I don't see a way to investigate further, as I can't reproduce the problem.

Could you try running Orbeon Forms with Docker to see if the issue occurs there as well? It should be fairly straightforward, even if you're not very familiar with Docker (see point 2 on the page linked below).


Reply all
Reply to author
Forward
0 new messages