ACRA / acralyzer

Open source backend for ACRA reports.
GNU General Public License v3.0
489 stars 90 forks source link

acra-undefined no such file or directory #62

Closed papachan closed 10 years ago

papachan commented 10 years ago

When i starting my application i have a 404 response from my server.

On the couchapp logs i have: Could not open file /var/lib/couchdb/acra-undefined.couch: no such file or directory

So i cannot send correctly a report. Something missing? i would like a more helful wiki page about installation. thanks.

KevinGaudin commented 10 years ago

Is your app called "undefined" ?

Please paste here your @ReportsCrashes configuration details.

papachan commented 10 years ago

Hmmmm no. its called acralyzer. i have done a couchapp push acralyzer. I am connecting through my aws domain and port 5984 or 80.

here there is the log from the app 11-19 13:10:20.039: E/ACRA(1117): Failed to send crash report for 1384884619000-approved.stacktrace 11-19 13:10:20.039: E/ACRA(1117): org.acra.sender.ReportSenderException: Error while sending JSON report via Http PUT 11-19 13:10:20.039: E/ACRA(1117): at org.acra.sender.HttpSender.send(HttpSender.java:228) 11-19 13:10:20.039: E/ACRA(1117): at org.acra.SendWorker.sendCrashReport(SendWorker.java:179) 11-19 13:10:20.039: E/ACRA(1117): at org.acra.SendWorker.checkAndSendReports(SendWorker.java:141) 11-19 13:10:20.039: E/ACRA(1117): at org.acra.SendWorker.run(SendWorker.java:77) 11-19 13:10:20.039: E/ACRA(1117): Caused by: org.apache.http.conn.HttpHostConnectException: Connection to http://[here my host domain].amazonaws.com refused 11-19 13:10:20.039: E/ACRA(1117): at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:178)

My @Reportcrashes is:

@ReportsCrashes( mode = ReportingInteractionMode.TOAST, formKey = "", formUri = "http://[here my host domain]:5984/acralyzer/_design/acra-storage/_update/report", resToastText = R.string.crash_toast_text, reportType=Type.JSON, httpMethod=Method.PUT, formUriBasicAuthLogin="reporter", formUriBasicAuthPassword="password")

KevinGaudin commented 10 years ago

In:

formUri = "http://[here my host domain]:5984/acralyzer/design/acra-storage/update/report",

You should send your reports to the couchapp you pushed from the acra-storage (usually named acra-YourAndroidAppName).

This would look like:

formUri = "http://[here my host domain]:5984/acra-YourAndroidAppName/design/acra-storage/update/report".

You must have at least 2 couchapps: acralyzer which contains the webapp code, and an acra-storage instance which stores the reports.

papachan commented 10 years ago

OK my problem is i dont have any acra-storage installed. I only have pushed the acralyzer dashboard to couchapp.

papachan commented 10 years ago

Now i have a error 401

11-21 13:14:54.689: E/ACRA(2837): ACRA caught a RuntimeException exception for xxxxxxxxxxxxxxxxx Building report. 11-21 13:14:54.699: D/ACRA(2837): Using default Report Fields 11-21 13:14:55.489: I/ACRA(2837): READ_LOGS not allowed. ACRA will not include LogCat and DropBox data. 11-21 13:14:55.489: D/ACRA(2837): Writing crash report file 1385057695000.stacktrace. 11-21 13:14:55.519: D/ACRA(2837): About to start ReportSenderWorker from #handleException 11-21 13:14:55.529: D/ACRA(2837): Mark all pending reports as approved. 11-21 13:14:55.529: D/ACRA(2837): Looking for error files in /data/data/xxxxxxxxxxxxxxxxxxxxxx/files 11-21 13:14:55.529: D/ACRA(2837): #checkAndSendReports - start 11-21 13:14:55.529: D/ACRA(2837): Looking for error files in /data/data/xxxxxxxxxxxxxxxxxxxxx/files 11-21 13:14:55.529: I/ACRA(2837): Sending file 1385057695000-approved.stacktrace 11-21 13:14:55.539: D/ACRA(2837): Waiting for Toast + worker... 11-21 13:14:55.679: D/ACRA(2837): Connect to http://myhostname:5984/acra-myapp/_design/acra-storage/_update/report 11-21 13:14:55.919: D/ACRA(2837): Sending request to http://myhostname:5984/acra-myapp/_design/acra-storage/_update/report/e635c19f-dca0-43c4-820c-e49c655cfdde 11-21 13:14:57.509: W/DefaultRequestDirector(2837): Authentication error: Unable to respond to any of these challenges: {} 11-21 13:14:57.759: E/ACRA(2837): Failed to send crash report for 1385057695000-approved.stacktrace 11-21 13:14:57.759: E/ACRA(2837): org.acra.sender.ReportSenderException: Error while sending JSON report via Http PUT 11-21 13:14:57.759: E/ACRA(2837): at org.acra.sender.HttpSender.send(HttpSender.java:228) 11-21 13:14:57.759: E/ACRA(2837): at org.acra.SendWorker.sendCrashReport(SendWorker.java:179) 11-21 13:14:57.759: E/ACRA(2837): at org.acra.SendWorker.checkAndSendReports(SendWorker.java:141) 11-21 13:14:57.759: E/ACRA(2837): at org.acra.SendWorker.run(SendWorker.java:77) 11-21 13:14:57.759: E/ACRA(2837): Caused by: java.io.IOException: Host returned error code 401 11-21 13:14:57.759: E/ACRA(2837): at org.acra.util.HttpRequest.send(HttpRequest.java:173) 11-21 13:14:57.759: E/ACRA(2837): at org.acra.sender.HttpSender.send(HttpSender.java:225) 11-21 13:14:57.759: E/ACRA(2837): ... 3 more 11-21 13:14:57.759: D/ACRA(2837): #checkAndSendReports - finish

papachan commented 10 years ago

I wasnt logged as a reader and reporter user. Thanks it works :+1: