owncloud / android

:phone: The ownCloud Android App
GNU General Public License v2.0
3.81k stars 3.05k forks source link

[BUG] upload failure on Android #4449

Closed gaochuntie closed 1 week ago

gaochuntie commented 1 month ago

Actual behaviour

-Tell us what happens When upload multiple videos at the same time,there may be serval ones failed with connection error or unknown error.

Expected behaviour

-Tell us what should happen ALL Videos upload serially and all success if no network error

Steps to reproduce

  1. I have an extra partition,I mounted it at /mnt/aaa , and then disable selinux,and then mount -o --bind it to /sdcard/aaa , THIS step is no problem,because I successfully uploaded files in it to server.
  2. open a dir in app and click + and then select 15 videos to upload
  3. ALL VIDEOS ARE UPLOADING parallelly!
  4. 5 videos randomly failed with connection error or unknown error

Can this problem be reproduced with the official owncloud server? (url: https://ocis.ocis.master.owncloud.works, user: einstein, password: relativity) YES YES YES , I only tested Android app

Environment data

Android version: 13 Device model: xiaomi redmi note 12 turbo (POCO F5 foreign) Stock or customized system: Stock MIUI 14 ownCloud app version: 4.3.1 ownCloud server version: 10.15.0

Logs

Web server error log

Insert your webserver log here

/etc/apache2/access.log and error.log nothing match my date

ownCloud log (data/owncloud.log)

Insert your ownCloud log here

ALSO NOTHING MATCH MY DATE {"reqId":"NmzHhYTuLOzLRhdUQBqs","level":2,"time":"2024-08-08T10:44:44+00:00","remoteAddr":"192.168.2.245","user":"--","app":"core","method":"GET","url":"\/index.php\/apps\/market\/","message":"Trusted domain error. \"192.168.2.245\" tried to access using \"192.168.2.25\" as host."} {"reqId":"Slexr9CYiHAoTCyGflGQ","level":2,"time":"2024-08-08T10:45:44+00:00","remoteAddr":"192.168.2.245","user":"--","app":"core","method":"POST","url":"\/index.php\/login","message":"Login failed: 'gaochuntie' (Remote IP: '192.168.2.245')"} {"reqId":"AB93O8OZJPNNaN5MDxAa","level":3,"time":"2024-08-08T10:45:44+00:00","remoteAddr":"192.168.2.245","user":"--","app":"PHP","method":"GET","url":"\/index.php\/login?user=gaochuntie","message":"Undefined index: loginName at \/var\/www\/owncloud\/core\/Controller\/LoginController.php#171"} {"reqId":"qLzIj1vu8XVh4tfYCUAB","level":2,"time":"2024-08-08T10:45:54+00:00","remoteAddr":"192.168.2.245","user":"--","app":"core","method":"POST","url":"\/index.php\/login?user=gaochuntie","message":"Login failed: 'gaochuntie' (Remote IP: '192.168.2.245')"} {"reqId":"Nqe1MFnTwmJ2CRjcvKW9","level":3,"time":"2024-08-08T10:45:54+00:00","remoteAddr":"192.168.2.245","user":"--","app":"PHP","method":"GET","url":"\/index.php\/login?user=gaochuntie","message":"Undefined index: loginName at \/var\/www\/owncloud\/core\/Controller\/LoginController.php#171"} {"reqId":"uZ48O5LzhXhkXVHKrkdh","level":3,"time":"2024-08-08T10:46:04+00:00","remoteAddr":"192.168.2.245","user":"--","app":"PHP","method":"GET","url":"\/index.php\/login?user=gaochuntie","message":"Undefined index: loginName at \/var\/www\/owncloud\/core\/Controller\/LoginController.php#171"}

gaochuntie commented 1 month ago

I suggest add a switch for parallel upload or serially upload. And if failed,auto retry.

jesmrec commented 1 month ago

@gaochuntie thanks a lot for reporting.

Some inputs:

thanks in advance!!

gaochuntie commented 1 month ago

@gaochuntie thanks a lot for reporting.

Some inputs:

  • Logs you attached are server logs, and don't seem to be related with the problem you described. Android logs could help (you'll find them in Settings > Logging , please always checking the Log HTTP requests and responses). Without logs, we can not know what's causing the problem
  • Videos (and any file) are enqueued and then sent to the server using workers. Workers' handling in on the hands of the operating system... there should not be any problem in parallel uploading.
  • Is the problem only happening with videos? other kind of files work fine? Don't forget that ownCloud works as a whole, that means, an error in the uploads is not always caused by the app. For that reason, logs are pretty important.
  • Do retries also fail?

thanks in advance!!

Oh sorry,I am now stuck by another issue.The data dir is used by a ftp server , a apache download site,a another server ,and owncloud at the same time.So I cant chown it to 770,I have binfs it to forcely use root user and 777 permission.But owncloud refused to launch and give error Your Data directory is readable by other users Please change the permissions to 0770 so that the directory cannot be listed by other users. I am very clear how important the protective function is ,but the cloud is only used my self and it is locally only. I very need a way to disable the permission set and check of owncloud. As for the orig issue,now I can't test because just now my rpi4b owncloud server crashed for high tempurature.Now I can't launch owncloud server.

jesmrec commented 1 month ago

Oh sorry,I am now stuck by another issue.The data dir is used by a ftp server , a apache download site,a another server ,and owncloud at the same time.So I cant chown it to 770,I have binfs it to forcely use root user and 777 permission.But owncloud refused to launch and give error Your Data directory is readable by other users Please change the permissions to 0770 so that the directory cannot be listed by other users. I am very clear how important the protective function is ,but the cloud is only used my self and it is locally only. I very need a way to disable the permission set and check of owncloud. As for the orig issue,now I can't test because just now my rpi4b owncloud server crashed for high tempurature.Now I can't launch owncloud server

but, this issue is a server side one. If you need help from the server team, reach them in the oc10 repo, or open a new thread in the central.owncloud.org public forum.

Here, we'll help you with Android issues ;)

JuancaG05 commented 1 week ago

Hi @gaochuntie! Were you able to recover your ownCloud server and do some testing about the original issue? In any case, as @jesmrec commented, parallel or serial uploads should have nothing to do with problems in uploads, server is able to handle parallel uploads perfectly 👍

gaochuntie commented 1 week ago

Hi @gaochuntie! Were you able to recover your ownCloud server and do some testing about the original issue? In any case, as @jesmrec commented, parallel or serial uploads should have nothing to do with problems in uploads, server is able to handle parallel uploads perfectly 👍

Hi,thanks for your help.I have just tried again on official server.I selected 3 video and 25 pictures,but this time,they are serially uploaded even the uploading list contains several items. However , no error occus. All files were uploaded successfully this time.Note : I have formated my phone two weeks ago and flashed another version of rom. So I think the problem is caused by that rom .Not owncloud app or server. Or I guess the problem is caused by <I have an extra partition,I mounted it at /mnt/aaa , and then disable selinux,and then mount -o --bind it to /sdcard/aaa > because android's linux feature often cause problem ,for example,selinux,losetup.

All in all,it seems that owncloud app and server have no problem.There is no another one complaining this problem yet.

Thanks for your help !