android drive sync


#1

hello!

I just finished setting up a self-host instance. but backing up the pictures through the app is not doing anything. I see that the server is receiving the requests and the “X remaining pictures” keep going down. but I don’t see any pictures saved in the drive or in the recent tab.

I also downloaded the drive desktop app and uploaded one picture and it uploaded the image ok.

how can I debug that and see what is the problem?


#2

Hello @vjustov,

Welcome aboard!

The photos backed up from your phone should be stored inside the /Photos/Backed up from my phone folder in your Cozy. Can you seem them there?


#3

No, they are not there.

just to give a little more info, I tried yesterday night again. the app its trying to backup around 950 pictures at somewhat 4MB each. when i check the logs i see requests like the ones below as the number of “remainig pictures” decrease. at some point i managed to see the number of remaining pictures at 600. but no trace of the pictures when checking through the browser on my laptop.

62.216.208.225 - - [13/Jan/2020:20:30:58 +0000] “POST /files/2737a4e1f9842b39c0b0492f3c02c96d?Name=IMG_20181212_195202.jpg&Type=file&Tags=library&Executable=false HTTP/2.0” 499 0 “-” “Dalvik/2.1.0 (Linux; U; Android 8.0.0; ONEPLUS A3000 Build/OPR1.170623.032)”
62.216.208.225 - - [13/Jan/2020:20:30:58 +0000] “GET /files/metadata?Path=%2Fmobile.settings.media_backup.media_folder%2Fmobile.settings.media_backup.backup_folder%2FIMG_20181212_195203.jpg HTTP/2.0” 404 93 “-” “Mozilla/5.0 (Linux; Android 8.0.0; ONEPLUS A3000 Build/OPR1.170623.032; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/79.0.3945.93 Mobile Safari/537.36 io.cozy.drive.mobile-1.18.24”


#4

Ok, could you have a look in the mobile.settings.media_backup.media_folder/mobile.settings.media_backup.backup_folder folder?

This is a known issue that will be fixed soon. In some case, the mobile application use the backup folder internal id instead of its name.


#5

While those folders do exist, they are empty.


#6

Well, there’s something weird in the first line of logs: the return code seems to be 499, which is, as far as I know, not a valid HTTP status code.
Any idea where it could come from?


#7

Good catch, according to this answer https://stackoverflow.com/questions/12973304/nginx-499-error-codes

HTTP 499 in Nginx means that the client closed the connection before the server answered the request. In my experience is usually caused by client side timeout . As I know it’s an Nginx specific error code.

maybe the server in my instance is too slow? is there a what is the timeout for the client calls?


#8

I remember an issue with Nginx and HTTP/2. Could you try to disable HTTP/2 support in Nginx configuration and see if this solves the 499 error?


#9

Eureka!
for future searches
by removing the http2 from the /etc/nginx/sites-available/<your.domain> it is baking up to mobile.settings.media_backup.media_folder/mobile.settings.media_backup.backup_folder.

Thank you very much for your help!. once the issue is fixed, would the cozy-coclyco scripts update the configuration or do i have to manually do it?


#10

I guess you’ll have to update the configuration by hand.

The Nginx configuration may need some improvements, we gonna have a look at this in the next few days.

Thanks a lot pour your feedback!