haiwen / seadroid

Android client for Seafile
Other
540 stars 277 forks source link

Alpha version 3.0.0 not uploading files and crashing #1001

Closed inis17 closed 2 months ago

inis17 commented 6 months ago

When trying to upload files, with the alpha version 3.0.0 files won't upload.

System

Pixel 7a, Graphen OS. apk obtain via obtainium on haiwen/seadroid

Step to reproduce :

i tried to upload a file in one of my library :

Then i receive this notification. (i must say that i don't have storage limit on my account and the drive is far from full)

Then if i repeat this steps on a password protected library the app crash ans won't start for a moment (1-2 min)

You can find the crash report below. Error in Seafile 5aeecd25e62b.txt

Thank you for seafile and the work you're doing !

zhwanng commented 6 months ago

Thank you for your feedback. I will continue to track it

TuxCoder commented 6 months ago

I have the same bug, same settings (unlimited quota)

If I understand correctly: here you parse the account info from a user: https://github.com/haiwen/seadroid/blob/master/app/src/main/java/com/seafile/seadroid2/account/AccountInfo.java#L35

On a webbrowser I geht this data for it /api2/account/info/:

{
   "avatar_url" : "https://seafile.XXX/media/avatars/default.png",
   "collaborate_email_interval" : 0,
   "contact_email" : null,
   "department" : "",
   "email" : "tuxcoder@XXX",
   "file_updates_email_interval" : 0,
   "institution" : "",
   "is_staff" : true,
   "login_id" : "",
   "name" : "XXX",
   "space_usage" : "0%",
   "total" : -2,
   "usage" : 62962239976
}

here the quota is calculated but not take in account, that total - value could be negative (eg. unlimited) https://github.com/haiwen/seadroid/blob/master/app/src/main/java/com/seafile/seadroid2/framework/worker/BaseUploadFileWorker.java#L68

Think the right patch would to add in the calculateQuota function add a case if total is negative return true

TuxCoder commented 6 months ago

Also set my account quota to something high (100GB) but not unlimited and it works, so it has clearly something to do with the quota.

Also here Server data: Using seafile package from nixos : https://search.nixos.org/packages?channel=23.11&from=0&size=50&sort=relevance&type=packages&query=seafile-server version 10.0.1

zhwanng commented 6 months ago

yes, please wait a fixed release.

zhwanng commented 4 months ago

please update to v3.0.1-beta and try it again

notdeadyett commented 4 months ago

This is still an issue with v3.0.1-beta

zhwanng commented 4 months ago

Still showing "Out of quota" and "Crashing"? can describe it in more detail? or provide a screenshot or log file?

notdeadyett commented 4 months ago

Screenshot_20240704-222057_1

I get the Above Quota error when uploading any file, however the app doesn't crash, it just doesn't actually upload the file.

I'm not sure how to get logs from the app.

Thanks

zhwanng commented 4 months ago

Not quite pinpointing the cause of the problem yet, is it possible to answer the following questions?

  1. what is the used space quota and total quota? or unlimited?
  2. manual file upload or folder backup feature?

tips: The directory for the log files is at: /sdcard/Android/data/com.seafile.seadroid2/files/logs/

Or provide json data like this,e.g. the answer above

notdeadyett commented 4 months ago

Manual upload, I haven't tried folder backup yet.

Here is the json data:

{
  "space_usage": "0%",
  "avatar_url": "https://seafile.XXX",
  "email": "XXX",
  "name": "notdeadyett",
  "total": -2,
  "usage": 89641543605,
  "login_id": "",
  "department": "",
  "contact_email": "XXX",
  "institution": "",
  "is_staff": true,
  "enable_subscription": false,
  "file_updates_email_interval": 0,
  "collaborate_email_interval": 0
}
Evangelospro commented 3 months ago

Seems to be fixed for me with v3.0.2-pre. I think this issue can be closed!