Troubleshooting

Introduction

This is a brief troubleshooting guide which will help you get the data necessary for identifying the root cause.

Log Files

Effectively debugging software requires as much relevant information as can be obtained. To assist the ownCloud support personnel, please try to provide as many relevant logs as possible. Log output can help with tracking down problems and, if you report a bug, log output can help to resolve an issue more quickly.

Here you have a description about how to get relevant information to be handled in case of any issue. You can ship this information via mail (android-app@owncloud.com), creating a new issue in the open GitHub ownCloud Android repository, or in public ownCloud forum.

Capturing App Debug Logs

You will find the Logs in the Settings view of the Android app. If the Logs option is not visible, tap five times on the build number (bottom of the Settings view), and Logs section will be visible.

Additionally, you can enable Log HTTP requests and responses. This will include information about every http request performed. It will help us to locate the issue. Logs may contain sensitive information. Sharing logs with others is sole user responsibility.

When you have reproduced the issue you want to address, the "Send History" button will automatically add the logs to a new mail message. Please follow the next steps to send us your logs:

  1. Delete History

  2. Perform the steps to reproduce the error

  3. Go back to the settings and select Logs

  4. Send History

If your issue is an app crash, also the Logcat log can be helpful. To get it:

  1. Delete History

  2. Perform the steps to reproduce the error

  3. Go back to the settings and select Logs

  4. In the three-dot-button (top right corner), select Logcat

  5. Send History

Deleting the history before getting logs is a good practice that will help the team to debug the problem, avoiding unnecessary noise.

Log HTTP Requests and Responses

If HTTP logging is enabled, log files will contain additional entries:

D: 2023-09-04 09:57:38:398(LogBuilder.kt:38) .logHttp()[Network, request] [info] [686c8df9-e611-431c-9786-e784b659c1e6] Method: GET URL: https://cloud.example…
D: 2023-09-04 09:57:38:408(LogBuilder.kt:38) .logHttp()[Network, request] [header] [686c8df9-e611-431c-9786-e784b659c1e6] Host: cloud.example…
D: 2023-09-04 09:57:38:412(LogBuilder.kt:38) .logHttp()[Network, request] [body] [686c8df9-e611-431c-9786-e784b659c1e6] Empty body
D: 2023-09-04 09:57:38:537(LogBuilder.kt:38) .logHttp()[Network, response] [info] [686c8df9-e611-431c-9786-e784b659c1e6] Method: GET URL: https://cloud.example…
D: 2023-09-04 09:57:38:538(LogBuilder.kt:38) .logHttp()[Network, response] [header] [686c8df9-e611-431c-9786-e784b659c1e6] Content-Length: 0
D: 2023-09-04 09:57:38:562(LogBuilder.kt:38) .logHttp()[Network, response] [body] [686c8df9-e611-431c-9786-e784b659c1e6] --> Body start for response


Log Content Description

2023-09-04 09:57:38:408

Timestamp

.logHttp()[Network, request]

Log item category label

[686c8df9-e611-431c-9786-e784b659c1e6]

X-REQUEST-ID to find corresponding requests and responses and to find related entries in owncloud.log or Apache logs

[header]

List of all HTTP headers

[body]

HTTP bodies (JSON, XML)

ownCloud Server Log File

The ownCloud server also maintains an ownCloud specific log file. This log file must be enabled through the ownCloud Administration page. On that page, you can adjust the log level. We recommend that when setting the log file level that you set it to a verbose level like Debug or Info.

You can view the server log file using the web interface or you can open it directly from the file system in the ownCloud server data directory.

Please see the ownCloud server logging pages to read more.

Webserver Log Files

It can be helpful to view your webserver’s error log file to isolate any ownCloud-related problems. For Apache on Linux, the error logs are typically located in the /var/log/apache2 directory. Some helpful files include the following:

  • error_log — Maintains errors associated with PHP code.

  • access_log — Typically records all requests handled by the server; very useful as a debugging tool because the log line contains information specific to each request and its result.

The ownCloud Android app sends the X-REQUEST-ID header with every request. You’ll find the X-REQUEST-ID in the owncloud.log, and you can configure your webserver to add the X-REQUEST-ID to the logs. Here you can find more information.

Please see the Apache logging pages to get more information.