I haven't tried all possible calls, but for both the metadata() and search() methods of the DropboxAPI class in Android, I am being hit with an SSLPeerUnverifiedException using both a Samsung Galaxy Tab Pro and an HTC One M8 device. Both are on relatively recent Android builds.
com.dropbox.client2.exception.DropboxSSLException: javax.net.ssl.SSLPeerUnverifiedException: No peer certificate
at com.dropbox.client2.RESTUtility.execute(RESTUtility.java:420)
at com.dropbox.client2.RESTUtility.execute(RESTUtility.java:339)
at com.dropbox.client2.RESTUtility.streamRequest(RESTUtility.java:194)
at com.dropbox.client2.RESTUtility.request(RESTUtility.java:124)
at com.dropbox.client2.DropboxAPI.metadata(DropboxAPI.java:1919)
at com.xxxx.DAL.DropBoxAuthenticator$DropboxLister.listFiles(DropBoxAuthenticator.java:262)
at com.xxxx.DAL.DropBoxAuthenticator$DropboxLister.doInBackground(DropBoxAuthenticator.java:233)
at com.xxxx.DAL.DropBoxAuthenticator$DropboxLister.doInBackground(DropBoxAuthenticator.java:227)
at android.os.AsyncTask$2.call(AsyncTask.java)
at java.util.concurrent.FutureTask.run(FutureTask.java)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java)
at java.lang.Thread.run(Thread.java)
Caused by: javax.net.ssl.SSLPeerUnverifiedException: No peer certificate
at com.android.org.conscrypt.SSLNullSession.getPeerCertificates(SSLNullSession.java)
at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java)
at com.dropbox.client2.SecureSSLSocketFactory.createSocket(SecureSSLSocketFactory.java:164)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java)
at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java)
at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java)
at com.dropbox.client2.RESTUtility.execute(RESTUtility.java:387)
at com.dropbox.client2.RESTUtility.execute(RESTUtility.java:339)
at com.dropbox.client2.RESTUtility.streamRequest(RESTUtility.java:194)
at com.dropbox.client2.RESTUtility.request(RESTUtility.java:124)
at com.dropbox.client2.DropboxAPI.metadata(DropboxAPI.java:1919)
at com.xxxx.DAL.DropBoxAuthenticator$DropboxLister.listFiles(DropBoxAuthenticator.java:262)
at com.xxxx.DAL.DropBoxAuthenticator$DropboxLister.doInBackground(DropBoxAuthenticator.java:233)
at com.xxxx.DAL.DropBoxAuthenticator$DropboxLister.doInBackground(DropBoxAuthenticator.java:227)
at android.os.AsyncTask$2.call(AsyncTask.java)
at java.util.concurrent.FutureTask.run(FutureTask.java)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java)
at java.lang.Thread.run(Thread.java)
I searched the fora, and haven't seen this as a common problem.
One possibility is that my OAuth2 code is off, but that error doesn't seem to apply. I'm not clear why, but the Dropbox permission screen does not reliably return to my activity. Are there errors I can check for with my subsequent execution instance calls to the AndroidAuthSession(appKeyPair, oAuth2Token) constructor? My understanding is that I then pass that session to the DropboxAPI<AndroidAuthSession>() to get my DropboxAPI, but that I don't need to call DropboxApi.finishAuthentication() in this case. Correct?