Skip to content

Debugging issues with the Sync Client

Christian Kamm edited this page Jul 17, 2019 · 2 revisions

Collecting Client logs

See https://doc.owncloud.org/desktop/troubleshooting.html#log-files

Network debugging

Since we're dealing with a client application, it's key to gather all the information we're sending and receiving from the server in order to determine which side might be responsible for an issue.

While all erroneous, wrong or unexpected network replies will appear on the client logs we just reviewed. There's quite a lot of information out of their scope that can help us troubleshoot and reproduce the conditions that lead to an issue.

In order to do this, you can use mitmproxy to intercept the client's network activity in detail. You can find installation instructions for your platform on the project website. In a gist, when running mitmproxy on your terminal, you're starting a server daemon on localhost:8080 (if the port is already allocated on your system - use -p/--port to specify a different one) that will act as network proxy. This can be set easily on the client's Network tab, under the Proxy Settings section:

ownCloud mitmproxy settings

  • Switch to Specify proxy manually as... + HTTP(S) proxy
  • Host 127.0.0.1 : 8080

After setting up the proxy between your ownCloud and the client, you'll need to manually accept its self-signed certificate so it can begin to intercept all traffic:

Here you can see how an mitmproxy invocation and an account setup from the client looks like on a bash session:

asciicast

Notes

  • If you happen to have a self-signed, expired or any other kind, you'll need to pass the --insecure flag to mitmproxy so it ignores the issues when authenticating the upstream certificate.
  • All the requests sent to localhost will not pass through the proxy. If both ownCloud and your client are located on the same host, use your full hostname or any DNS record to connect both. Otherwise, your requests will not appear on mitmproxy.
  • If you're using Windows cmd, there are some well known limitations for TUIs. You can replace it by mitmweb (the web UI version of the CLI tool) or use the mitmproxy official docker image.

Alternatives to mitmproxy

If you don't happen to like TUIs or you would rather use a different tool, you can also try the powerful wireshark to filter your client's traffic. Or some paid alternative like fiddler or charles proxy for instance.