Repository navigation
Open
Labels
Milestone
Description
When the server returns an empty mimetype on a PROPFIND, the app will crash because it tries to figure out weather the current resource element is a direcotry or not by comparing the returned mimetype against the string DIR. However since the returned mimetype is null the app crashes:
java.lang.String.equalsIgnoreCase(java.lang.String)' on a null object reference
at com.owncloud.android.utils.FileStorageUtils.createOCFileFromRemoteFile(FileStorageUtils.java:108)
at com.owncloud.android.operations.SynchronizeFolderOperation.mergeRemoteFolder(SynchronizeFolderOperation.java:337)
at com.owncloud.android.operations.SynchronizeFolderOperation.run(SynchronizeFolderOperation.java:225)
at com.owncloud.android.lib.common.operations.RemoteOperation.runOperation(RemoteOperation.java:240)
at com.owncloud.android.lib.common.operations.RemoteOperation.execute(RemoteOperation.java:205)
at com.owncloud.android.operations.common.SyncOperation.execute(SyncOperation.java:87)
at com.owncloud.android.operations.RefreshFolderOperation.run(RefreshFolderOperation.java:143)
at com.owncloud.android.lib.common.operations.RemoteOperation.runOperation(RemoteOperation.java:240)
at com.owncloud.android.lib.common.operations.RemoteOperation.run(RemoteOperation.java:259)
This does normally not happen as the server should always send a mimetype, however if he does not we aparently must be prepared.
Steps to reproduce:
- Use mitm proxy and intercept response
- Pull down to refresh inside files view
- When response of propfind is send remove content inside the
<contenttype></contenttype>tag
This may sometimes happen when a user creates a file without file ending, or if a file without file ending is shared.
fix: #2986
Activity
michaelstingl commentedon Jun 1, 2021
@jesmrec can you try to reproduce?
jesmrec commentedon Jun 1, 2021
Reopened because #2977 (comment)
But, more info is needed. Not able to reproduce.
@candrea21 could you provide extra info?
candrea21 commentedon Jun 1, 2021
Same happens as already reported. When opening a folder containing an "exotic" file, as for example "test.db" on a WebDAV storage, the app crashes.
jesmrec commentedon Jun 1, 2021
Could you add logs?
i can not reproduce the problem after using a WebDAV storage with multiple file names....
candrea21 commentedon Jun 2, 2021
DeepDiver1975 commentedon Jun 28, 2026
Triaging this older report (opened 2020, last activity mid-2021, still labelled Needs info).
The logs attached above are debug-level sync logs and don't actually contain a crash stacktrace — they show a folder refresh where a thumbnail
GETfortest.dbreturns404 Not Found, after which the sync completes normally. There's no exception or fatal trace, so we can't confirm where (or whether) an empty-mimetype crash currently occurs.The Android app has also been substantially rewritten since this was filed (new modular architecture and data layer), so a 2020/2021 crash path may no longer exist.
To keep this actionable, could you confirm whether this still reproduces on a current release and, if so, provide:
Without a current-release reproduction and stacktrace we can't locate the cause. If it no longer reproduces, feel free to close; otherwise the above will let us pinpoint it. Thanks!
🤖 Generated with Claude Code