Cloudant + Acralyser - ReportSenderException, SSLPeerUnverifiedException

714 Views Asked by At

Have been trying to make Acralyser to work with Cloudant.

  1. Replicated the ACRA couchDB instances into my cloudant account. Guess it is working as i can see both my databases in my cloudant account.
  2. Created a Write user (reporter) and generated an API key for the user.
  3. In the application side i have added the following Annotation.

    @ReportsCrashes(formKey = "", formUri = "http://[my-cloudant]/[my-db]/_design/acra-storage/_update/report", reportType = HttpSender.Type.JSON, httpMethod = HttpSender.Method.PUT, formUriBasicAuthLogin = "[my-reporter-user]", formUriBasicAuthPassword = "[my-reporter-password]", mode = ReportingInteractionMode.TOAST)

In the formUri if i am using 'http' looks like ACRA request to cloudant went through without any issues. However i am not seeing anything in the reports page.

Report URL: https://[my-cloudant]/acralyzer/_design/acralyzer/index.html#/dashboard/

In the formURI if i am using 'https' i am getting the following ACRA error:

org.acra.sender.ReportSenderException: Error while sending JSON report via Http PUT
            at org.acra.sender.HttpSender.send(HttpSender.java:228)
            at org.acra.SendWorker.sendCrashReport(SendWorker.java:179)
            at org.acra.SendWorker.checkAndSendReports(SendWorker.java:141)
            at org.acra.SendWorker.run(SendWorker.java:77)
     Caused by: javax.net.ssl.SSLPeerUnverifiedException: No peer certificate
            at org.apache.harmony.xnet.provider.jsse.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:137)

I am testing the above using emulator as well as with Samsung S2 (rooted) device.

Happy to provide further information if needed.

1

There are 1 best solutions below

0
On

Have you tried using POST instead of PUT? Also, you may already have this, but the acra databases need to be preceded by the keyword 'acra' So, for example, if your database name is my-database then this is not correct; it needs to be acra-my-database.

Please view the documentation here::

https://github.com/ACRA/acralyzer/wiki/setup

and also if you set it up manually::

https://github.com/ACRA/acralyzer/wiki/manual-setup

Can't tell if you already have this in your URL since you're using [my-db]