Can't upload more than 3 images on central server from collect

What is the problem? Please be detailed.

Hello everyone, I have been using ODK for a certain period of time, and it has been proven a great tool for us. But recently we got stuck on an error, regarding submission_attachments. Let me just go you through the whole situation.

Whenever I try to submit the form on the collect app(The form contains multiple widgets), it gets all the data on the database except the attachments, and by attachments here I mean the images. Whenever I try to upload more than 3 images it gives me an error, I can see it in the logs on the central server whereas on the ODK collect app I don't see any failure response, it shows me Form sent successfully.

And how I know that only 3 or less than 3 images are getting uploaded to the central server, I have already tested it many times, firstly I thought it would be a network issue, as we were not getting attachments with the text data, and on central when I try to download the image it shows me 404, image not found, as the blob is not present in the DB But after filling so many forms we figured out the pattern.

One more thing to notice here is that when I see the logs of the central service container, it shows me the image name that I uploaded from the ODK collect app, but when I try to search the name in the submission_attachments table I don't find record while filtering it with the name column, so I don't know from where it is fetching the name.

Also, I have made some changes on both ODK collect and ODK central according to my customization needs, like we needed geo-tagging on images that are being captured also we have created a function to parse the data from XML to JSON.

What ODK tool and version are you using? And on what device and operating system version?

Currently, I have hosted the central server on Ubuntu 20.04.6 LTS x86_64 GNU/Linux. The virtual machine is currently on Azure cloud. Currently, we have hosted the Central 2023.3 version.

What steps can we take to reproduce the problem?

To reproduce this error I tried uploading more than 3 images, eventually, I haven't tried this on any other server except my server.

What have you tried to fix the problem?

We have tried reducing the pixels of the images, reduced it to 100 pixels, thinking this could be an image size issue, but it wasn't Also we haven't changed anything in central's backend. I have seen a similar issue in the KOBO community, I will attach the link to the thread below, but there wasn't any solution to this on that thread

Thread link: https://community.kobotoolbox.org/t/unable-to-download-file-while-trying-to-edit-the-submissions/15163

Anything else we should know or have? If you have a test form or screenshots or logs, attach them here

I have attached below the screenshot of the exact error that we got in the logs while uploading more than 3 images.

Here I have attached a screenshot of the Enketo web view, where I can edit the existing form, that was submitted.

Can you reproduce this problem on unmodified versions of Collect and Central?

Yes, I have tried reproducing this on the 2023.3.0 version(unmodified), but after running the containers(docker-compose up) it shows me the following error.

After attempting to automatically migrate the database, we have detected unapplied migrations, which suggests a problem with the database migration step. Please look in the console above this message for any errors and post what you find in the forum: https://forum.getodk.org/

then I tried reproducing this error on 2023.3.1, but I encountered the same error on this version too and wasn't even able to start containers.

then I tried updating to the latest version which is 2023.4.0, the containers started successfully and yes I was able to upload more than 3 images on the server. It was working pretty fine.

I did all of these things on a new fresh virtual machine.

Apply your customizations to v2023.4.0 and see if submissions still work. If they do, then an upgrade to the latest Central should solve your problem. If they don't, then the problem is with your customizations.