[Android] App crashes when opening a library

Samsung Galaxy S4 running 5.0.1

I can open the app and connect to my server. However when I attempt to open a library, I get the message “Unfortunately, Seafile has stopped”.

I have a Nvidia Android tablet and a Windows desktop client that can both connect the the server fine, so I’m fairly sure its not the way I have the server setup.

Any ideas?

Maybe it caused by an RuntimeException when trying to create folders on SD card, but some crash log is helpful to fix the bug. Did you install the app from Google Play?
I can see from Google Play dev console that both

  • Galaxy S4 (jfvelte) Bibliotheken werden in der Android App angezeigt. Beim Öffnen der jeweiligen Ordner stürzt die App laufend ab mit der Meldung ‘‘Seafile angehalten’’.
  • Galaxy S4 (jfltecan) Cannot open any folder on seafile. App always crashes.
    have the crash as below
RuntimeException: Could not create repo directory Documents
at com.seafile.seadroid2.data.DataManager.getRepoDir(DataManager.java:247)
	at com.seafile.seadroid2.data.DataManager.getLocalRepoFile(DataManager.java:264)
	at com.seafile.seadroid2.ui.adapter.SeafItemAdapter.setFileView(SeafItemAdapter.java:331)
	at com.seafile.seadroid2.ui.adapter.SeafItemAdapter.getDirentView(SeafItemAdapter.java:303)
	at com.seafile.seadroid2.ui.adapter.SeafItemAdapter.getView(SeafItemAdapter.java:453)

If that is exactly your case, it is a known bug and will be fixed soon.

Thanks.

To get the crash logs, I sugguest to use SysLog.

Sorry for the late reply! It seems cant use Syslog to get anything useful without rooting. Is there another method?

1 Like

@Alex_Larioza
have you tried clearing the cache and clearing the app-data as well of the seafile android app? I remember that I had a similar issue after updating the android app. Clearing application data in android settings menu helped then.

@infinity I have tried clearing both and even reinstalling, but I’ve had no success. :sweat:

1 Like

I will look into it and comment back.

I also have a Samsung Galaxy S4 Android 5.0.1 on Bell (Canada). I can open the seafile app fine and my 4 Libraries show, but when I try to open a library I get the “unfortunately seafile has stopped” message.

I had seadroid 2.1.3 and got the following error:

08-23 12:46:55.906 I/am_crash( 1068): [9120,0,com.seafile.seadroid2,13155908,java.lang.RuntimeException,Could not create repo directory Documents,DataManager.java,247]

I just updated to the 2.1.5 and I am still getting the crash with the following Event.log:

08-23 16:31:03.847 I/am_create_activity( 1068): [0,131125020,10754,com.seafile.seadroid2/.ui.activity.BrowserActivity,android.intent.action.MAIN,NULL,NULL,268435456,com.sec.android.app.launcher] 08-23 16:31:03.847 I/wm_task_created( 1068): [10754,1] 08-23 16:31:03.847 I/wm_task_moved( 1068): [10754,1,3] 08-23 16:31:03.857 I/am_pause_activity( 1068): [0,977527207,com.sec.android.app.launcher/com.android.launcher2.Launcher] 08-23 16:31:03.857 I/power_partial_wake_state( 1068): [1,ActivityManager-Launch] 08-23 16:31:03.867 I/am_on_paused_called( 1593): [0,com.android.launcher2.Launcher] 08-23 16:31:03.887 I/am_restart_activity( 1068): [0,131125020,10754,com.seafile.seadroid2/.ui.activity.BrowserActivity] 08-23 16:31:04.017 I/sf_frame_dur( 274): [com.sec.android.app.launcher/com.android.launcher2.Launcher,293,5,4,1,3,0,1] 08-23 16:31:04.447 I/am_on_resume_called(26216): [0,com.seafile.seadroid2.ui.activity.BrowserActivity] 08-23 16:31:04.938 I/am_activity_launch_time( 1068): [0,131125020,com.seafile.seadroid2/.ui.activity.BrowserActivity,1060,1060,0] 08-23 16:31:04.968 I/power_partial_wake_state( 1068): [0,ActivityManager-Launch] 08-23 16:31:07.190 I/power_partial_wake_state( 1068): [0,AudioMix] 08-23 16:31:09.652 I/power_partial_wake_state( 1068): [1,AudioMix] 08-23 16:31:10.133 I/am_crash( 1068): [26216,0,com.seafile.seadroid2,13155908,java.lang.RuntimeException,Could not create repo directory QuickShare,DataManager.java,247] 08-23 16:31:10.143 I/am_finish_activity( 1068): [0,131125020,10754,com.seafile.seadroid2/.ui.activity.BrowserActivity,crashed] 08-23 16:31:10.143 I/am_focus_stack( 1068): [0,movestack to true] 08-23 16:31:10.143 I/wm_task_moved( 1068): [10707,1,3] 08-23 16:31:10.173 I/am_pause_activity( 1068): [0,131125020,com.seafile.seadroid2/.ui.activity.BrowserActivity] 08-23 16:31:10.173 I/power_partial_wake_state( 1068): [1,ActivityManager-Launch] 08-23 16:31:10.363 I/force_gc( 2188): Binder 08-23 16:31:10.673 I/am_resume_activity( 1068): [0,977527207,10707,com.sec.android.app.launcher/com.android.launcher2.Launcher] 08-23 16:31:10.723 I/am_on_resume_called( 1593): [0,com.android.launcher2.Launcher] 08-23 16:31:10.793 I/am_kill ( 1068): [0,21727,com.google.android.calendar,15,empty #13] 08-23 16:31:10.803 I/am_kill ( 1068): [0,31341,com.sec.android.widgetapp.SPlannerAppWidget,15,empty #14] 08-23 16:31:10.803 I/am_kill ( 1068): [0,31320,com.android.calendar,15,empty #15] 08-23 16:31:10.823 I/am_kill ( 1068): [0,31958,com.facebook.katana,15,empty #11] 08-23 16:31:10.833 I/am_kill ( 1068): [0,32157,com.samsung.android.nearby.mediaserver,15,empty #10] 08-23 16:31:10.843 I/am_kill ( 1068): [0,25597,com.google.process.gapps,15,empty #9] 08-23 16:31:10.853 I/am_proc_died( 1068): [0,32157,com.samsung.android.nearby.mediaserver,15,73,303] 08-23 16:31:10.873 I/am_proc_died( 1068): [0,31320,com.android.calendar,15,75,303] 08-23 16:31:10.893 I/am_proc_died( 1068): [0,25597,com.google.process.gapps,15,82,303] 08-23 16:31:10.913 I/am_proc_died( 1068): [0,31341,com.sec.android.widgetapp.SPlannerAppWidget,15,83,303] 08-23 16:31:10.923 I/am_proc_died( 1068): [0,21727,com.google.android.calendar,15,83,303] 08-23 16:31:10.934 I/power_partial_wake_state( 1068): [0,ActivityManager-Launch] 08-23 16:31:10.954 I/am_proc_died( 1068): [0,31958,com.facebook.katana,15,90,303] 08-23 16:31:10.964 I/am_destroy_activity( 1068): [0,131125020,10754,com.seafile.seadroid2/.ui.activity.BrowserActivity,finish-imm] 08-23 16:31:11.804 I/am_proc_died( 1068): [0,26216,com.seafile.seadroid2,11,136,303] 08-23 16:31:11.804 I/am_service_crashed_too_much( 1068): [0,2,com.seafile.seadroid2/.monitor.FileMonitorService,26216] 08-23 16:31:11.804 I/am_service_crashed_too_much( 1068): [0,2,com.seafile.seadroid2/.cameraupload.MediaObserverService,26216] 08-23 16:31:11.804 I/am_service_crashed_too_much( 1068): [0,2,com.seafile.seadroid2/.transfer.TransferService,26216] 08-23 16:31:11.814 I/wm_task_removed( 1068): [10754,removeAppToken: last token] 08-23 16:31:11.814 I/wm_task_removed( 1068): [10754,removeTask] 08-23 16:31:11.814 I/sf_frame_dur( 274): [com.seafile.seadroid2/com.seafile.seadroid2.ui.activity.BrowserActivity,49,3,1,1,0,1,1] 08-23 16:31:11.954 I/sf_frame_dur( 274): [Application Error: com.seafile.seadroid2,20,2,0,1,0,1,0]

Can you fix this? I really really really want this to work and everything else about seafile has been great (now that I got it working on NGINX behind a NAT with HTTPS enabled, which took FOREVER to configure).

Thanks!
Damon

There are several reasons could lead up creating folders to fail. Here are some tips for troubleshooting.

  1. Specifically for Android 6.0, user should manually turn on storage permissions by Settings -> Apps -> Seafile -> Permissions, then turn on the switch.
  2. Restart your device.
  3. In some cases the SD card has been mounted by the hosting PC. You have to unmount it (you can do it from the phone or from the PC) in order to gain write permission.
  4. Open the Seafile app, go to Settings -> Cache storage location -> Change to another location if you have one more SD card mounted and try again.
  5. The ultimate explanation is, unfortunately, it looks like some manufactures have broken the getExternalStorageDirectory code, and somehow it’s returning a false location. The issue only occurs on certain phones, e.g.Galaxy S5 Mini (kminilte) and Samsung Galaxy S4 (jflte), I have no idea about how to fix that.

I fixed the issue by changing the Seafile cache location to the device rather than the SD card. Thanks for the list of solutions!

Thanks for the help everyone. When I try to change the Seafile Cache Location to the device, Seafile also crashes with the same message. Should I post the logs?

Have you tried the latest version 2.1.6: https://github.com/haiwen/seadroid/releases