Open bardram opened 1 week ago
There is no media file in CAWS when I download the data.
This can be caused by several things:
The video task now works with the UI w/o the exception above.
However, the media is still not uploaded to CAWS. Here is the log:
[log] [CAMS DEBUG] DataStreamBuffer - getting data stream batch for device 'Primary Phone' and data type 'dk.cachet.carp.audio'.
[log] [CAMS DEBUG] DataStreamBuffer - getting data stream batch for device 'Primary Phone' and data type 'dk.cachet.carp.image'.
But neither the json or the files are in the download from CAWS.
Now the JSON and files are uploaded to CAWS. But when downloading, the filenames of the downloaded files does not match the names of the files uploaded.
Here are two audio recordings:
"measurements": [
{
"data": {
"id": "f2307b9b-e401-4014-b2c7-68e05e2ca17c",
"__type": "dk.cachet.carp.audio",
"upload": true,
"filename": "f2307b9b-e401-4014-b2c7-68e05e2ca17c.mp4",
"metadata": {},
"mediaType": "audio",
"endRecordingTime": "2024-10-29T19:30:46.677579Z",
"startRecordingTime": "2024-10-29T19:30:34.778037Z"
},
"sensorEndTime": 1730230246677579,
"sensorStartTime": 1730230234778037
},
{
"data": {
"id": "f2307b9b-e401-4014-b2c7-68e05e2ca17c",
"__type": "dk.cachet.carp.audio",
"upload": true,
"filename": "f2307b9b-e401-4014-b2c7-68e05e2ca17c.mp4",
"metadata": {},
"mediaType": "audio",
"endRecordingTime": "2024-10-29T19:30:46.677579Z",
"startRecordingTime": "2024-10-29T19:30:34.778037Z"
},
"sensorEndTime": 1730230246677579,
"sensorStartTime": 1730230234778037
}
]
But the files downloaded with it looks like this
The file upload task seems to work fine with audio files but not image files - here is the log, where only one file upload tasks ends....?
[log] [CAMS INFO] CarpDataManager - File attachment upload to CAWS started - path : '/data/user/0/dk.cachet.carp_study_app/app_flutter/carp/deployments/b8b4bf38-5026-417f-bd2f-218fa704b4f7/data/media/073f1797-7ba0-48d7-9e9f-c9fe98250126.mp4'
[log] [CAMS INFO] CarpDataManager - File attachment upload to CAWS started - path : '/data/user/0/dk.cachet.carp_study_app/cache/CAP4387157332099287494.jpg'
[log] [CAMS DEBUG] DataStreamBuffer - cleaned up. N=11 records deleted.
[log] [CAMS INFO] CarpDataManager - File upload to CAWS finished - server id : 60
Subsequently getting TimeoutException
on the upload task:
I/flutter (13522): TimeoutException - Retrying to SEND https://dev.carp.dk/api/studies/d4ed449f-eb15-443e-b768-416e50d92a80/files
Sometimes it return an HTTP error 413
:
[log] [CAMS WARNING] CarpDataManager - Error uploading file attachment - 413 null
which is defined as;
A 413 HTTP error code occurs when the size of a client's request exceeds the server's file size limit. This typically happens when a client attempts to upload a large file to a web server, and the server responds with a 413 error to alert the client.
When using the image task it fails with an assertion error when clicking on the "green" save button.
The picture is taken but not uploaded to the database / saved in any way.
Testing on the Samsung S10e Android 12 / SDK 33 phone.
The log is:
and