haiwen / seadroid

Android client for Seafile
Other
540 stars 277 forks source link

RuntimeException: Unable to create application com.seafile.seadroid2.SeadroidApplication - invalid path (sd card) on 7.1.1 #614

Closed 92lleo closed 5 months ago

92lleo commented 7 years ago

Hello, Im running the latest ResurrectionRemix (Android 7.1.1_r9), build on 11th Jan 17 on a htc one m8. The first time running seafile everything works fine, i can log in to my server, i can browse my libaries and so on. But when the application was closed once, it won't start again. Checking the logs it seems to have a problem with the sdcard path when getting storage sizes. The complete log: E/AndroidRuntime(23466): Process: com.seafile.seadroid2, PID: 23466 E/AndroidRuntime(23466): java.lang.RuntimeException: Unable to create application com.seafile.seadroid2.SeadroidApplication: java.lang.IllegalArgumentException: Invalid path: /storage/D01F-5444/Android/media E/AndroidRuntime(23466): at com.seafile.seadroid2.data.StorageManagerLollipop.getStorageSize(StorageManagerLollipop.java:31) E/AndroidRuntime(23466): at com.seafile.seadroid2.data.StorageManager.fillLocationInfo(StorageManager.java:118) E/AndroidRuntime(23466): at com.seafile.seadroid2.data.StorageManager.getStorageLocations(StorageManager.java:203) E/AndroidRuntime(23466): at com.seafile.seadroid2.data.StorageManager.lookupStorageLocation(StorageManager.java:320) E/AndroidRuntime(23466): at com.seafile.seadroid2.data.StorageManager.getStorageLocation(StorageManager.java:337) E/AndroidRuntime(23466): at com.seafile.seadroid2.data.StorageManager.getThumbnailsDir(StorageManager.java:410) E/AndroidRuntime(23466): at com.seafile.seadroid2.SeadroidApplication.initImageLoader(SeadroidApplication.java:40) E/AndroidRuntime(23466): at com.seafile.seadroid2.SeadroidApplication.onCreate(SeadroidApplication.java:28) E/AndroidRuntime(23935): Process: com.seafile.seadroid2, PID: 23935 E/AndroidRuntime(23935): java.lang.RuntimeException: Unable to create application com.seafile.seadroid2.SeadroidApplication: java.lang.IllegalArgumentException: Invalid path: /storage/D01F-5444/Android/media E/AndroidRuntime(23935): at com.seafile.seadroid2.data.StorageManagerLollipop.getStorageSize(StorageManagerLollipop.java:31) E/AndroidRuntime(23935): at com.seafile.seadroid2.data.StorageManager.fillLocationInfo(StorageManager.java:118) E/AndroidRuntime(23935): at com.seafile.seadroid2.data.StorageManager.getStorageLocations(StorageManager.java:203) E/AndroidRuntime(23935): at com.seafile.seadroid2.data.StorageManager.lookupStorageLocation(StorageManager.java:320) E/AndroidRuntime(23935): at com.seafile.seadroid2.data.StorageManager.getStorageLocation(StorageManager.java:337) E/AndroidRuntime(23935): at com.seafile.seadroid2.data.StorageManager.getThumbnailsDir(StorageManager.java:410) E/AndroidRuntime(23935): at com.seafile.seadroid2.SeadroidApplication.initImageLoader(SeadroidApplication.java:40) E/AndroidRuntime(23935): at com.seafile.seadroid2.SeadroidApplication.onCreate(SeadroidApplication.java:28) I/ActivityManager(894): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.seafile.seadroid2/.ui.activity.BrowserActivity bnds=[852,658][1060,942] (has extras)} from uid 10054 on display 0 I/ActivityManager(894): Start proc 21933:com.seafile.seadroid2/u0a152 for activity com.seafile.seadroid2/.ui.activity.BrowserActivity W/System(21933): ClassLoader referenced unknown path: /data/app/com.seafile.seadroid2-2/lib/arm D/VoldConnector(894): SND -> {146 volume mkdirs /storage/D01F-5444/Android/media/com.seafile.seadroid2/} D/VoldConnector(894): SND -> {147 volume mkdirs /storage/D01F-5444/Android/data/com.seafile.seadroid2/cache/} W/System.err(21933): at com.seafile.seadroid2.data.StorageManagerLollipop.getStorageFreeSpace(StorageManagerLollipop.java:38) W/System.err(21933): at com.seafile.seadroid2.data.StorageManager.fillLocationInfo(StorageManager.java:117) W/System.err(21933): at com.seafile.seadroid2.data.StorageManager.getStorageLocations(StorageManager.java:203) W/System.err(21933): at com.seafile.seadroid2.data.StorageManager.lookupStorageLocation(StorageManager.java:320) W/System.err(21933): at com.seafile.seadroid2.data.StorageManager.getStorageLocation(StorageManager.java:337) W/System.err(21933): at com.seafile.seadroid2.data.StorageManager.getThumbnailsDir(StorageManager.java:410) W/System.err(21933): at com.seafile.seadroid2.SeadroidApplication.initImageLoader(SeadroidApplication.java:40) W/System.err(21933): at com.seafile.seadroid2.SeadroidApplication.onCreate(SeadroidApplication.java:28) E/AndroidRuntime(21933): Process: com.seafile.seadroid2, PID: 21933 E/AndroidRuntime(21933): java.lang.RuntimeException: Unable to create application com.seafile.seadroid2.SeadroidApplication: java.lang.IllegalArgumentException: Invalid path: /storage/D01F-5444/Android/media E/AndroidRuntime(21933): at com.seafile.seadroid2.data.StorageManagerLollipop.getStorageSize(StorageManagerLollipop.java:31) E/AndroidRuntime(21933): at com.seafile.seadroid2.data.StorageManager.fillLocationInfo(StorageManager.java:118) E/AndroidRuntime(21933): at com.seafile.seadroid2.data.StorageManager.getStorageLocations(StorageManager.java:203) E/AndroidRuntime(21933): at com.seafile.seadroid2.data.StorageManager.lookupStorageLocation(StorageManager.java:320) E/AndroidRuntime(21933): at com.seafile.seadroid2.data.StorageManager.getStorageLocation(StorageManager.java:337) E/AndroidRuntime(21933): at com.seafile.seadroid2.data.StorageManager.getThumbnailsDir(StorageManager.java:410) E/AndroidRuntime(21933): at com.seafile.seadroid2.SeadroidApplication.initImageLoader(SeadroidApplication.java:40) E/AndroidRuntime(21933): at com.seafile.seadroid2.SeadroidApplication.onCreate(SeadroidApplication.java:28) W/ActivityManager(894): Force finishing activity com.seafile.seadroid2/.ui.activity.BrowserActivity W/ActivityManager(894): Activity pause timeout for ActivityRecord{5220dcd u0 com.seafile.seadroid2/.ui.activity.BrowserActivity t2450 f} I/WindowManager(894): Failed to capture screenshot of Token{9428682 ActivityRecord{5220dcd u0 com.seafile.seadroid2/.ui.activity.BrowserActivity t2450 f}} appWin=Window{691200b u0 Starting com.seafile.seadroid2} drawState=4 When completle reinstalling seafile (delete data), i can start the app again once, then the same error occurs. I didn't encounter that problem with any other app so far. As this is my only phone running android 7, i couldn't test it on more devices or roms. Maybe this is rom related, but then I don't get why other apps like file managers, spotify (having the temp dir on sd card) and others have no problem.

If you need more information, just tell me.

92lleo commented 7 years ago

Just to add: The directory /storage/D01F-5444/Android/media/ exists, the seafile app has storage permissions. The problem happend with the previous version and is still present in 2.1.9

AndrewW-GIT commented 7 years ago

I've got an identical issue with Lineage 14.1 (aka Android 7.1.2)

seafile-only-adb.txt

KausL commented 7 years ago

I can confirm this issue with Lineage 14.1 on a Galaxy Note Pro 12.2. It would be nice if anybody can have a look on it as it make the Client unusable under Lineage OS. If needed I can provide any log, trace or whatever is needed to solve this bug. Thank you in advance!