ACRA / acralyzer

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

Reporter User doesn't work :( : I must use admin to report crash #28

Closed jefBinomed closed 11 years ago

jefBinomed commented 11 years ago

I have an issue with reporter user... indeed, when I create a reporter user with this command : curl -X PUT -u [adminuser]:[adminpassword] http://[your.couchdb.host]:[port]/_users/org.couchdb.user:[newuserid] -d '{"name":"[newusername]", "password":"[newuserpassword]", "roles":["reporter", "reader"], "type":"user"}' -H "Content-Type: application/json"

He is well created but when i enter it in configuration, the report is not realy send....

[Thu, 21 Mar 2013 16:22:27 GMT] [debug] [] 'PUT' /acra-[mydb]/_design/acra-storage/update/report/8a29f8ad-b3da-4842-8007-73baf6b37ac3 {1, 1} Headers: [{'Accept',"text/html,application/xml,application/json,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,/_;q=0.5"}, {'Authorization',"Basic Z2FtaWZpY2F0aW9uX3JlcG9ydGVyOklubm92YXRpMG40NA=="}, {'Connection',"Keep-Alive"}, {'Content-Length',"13147"}, {'Content-Type',"application/json"}, {'Host',"[myApp].cloudapp.net:5984"}, {'User-Agent',"Android"}]

[Thu, 21 Mar 2013 16:22:27 GMT] [debug] [] OAuth Params: []

[Thu, 21 Mar 2013 16:22:27 GMT] [debug] [] Minor error in HTTP request: {unauthorized, <<"Name or password is incorrect.">>}

[Thu, 21 Mar 2013 16:22:27 GMT] [debug] [] Stacktrace: [{couch_httpd_auth,default_authentication_handler,1}, {couch_httpd,authenticate_request,2}, {couch_httpd,handle_request_int,5}, {mochiweb_http,headers,5}, {proc_lib,init_p_do_apply,3}]

[Thu, 21 Mar 2013 16:22:27 GMT] [info] [] 90.84.144.194 - - 'PUT' /acra-[mydb]/_design/acra-storage/_update/report/8a29f8ad-b3da-4842-8007-73baf6b37ac3 302

[Thu, 21 Mar 2013 16:22:27 GMT] [debug] [] 'PUT' /acra-[mydb]/_design/acra-storage/update/report/8a29f8ad-b3da-4842-8007-73baf6b37ac3 {1, 1} Headers: [{'Accept',"text/html,application/xml,application/json,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,/_;q=0.5"}, {'Authorization',"Basic Z2FtaWZpY2F0aW9uX3JlcG9ydGVyOklubm92YXRpMG40NA=="}, {'Connection',"Keep-Alive"}, {'Content-Length',"13147"}, {'Content-Type',"application/json"}, {'Host',"[myApp].cloudapp.net:5984"}, {'User-Agent',"Android"}]

[Thu, 21 Mar 2013 16:22:27 GMT] [debug] [] OAuth Params: []

[Thu, 21 Mar 2013 16:22:27 GMT] [debug] [] Minor error in HTTP request: {unauthorized, <<"Name or password is incorrect.">>}

[Thu, 21 Mar 2013 16:22:27 GMT] [debug] [] Stacktrace: [{couch_httpd_auth,default_authentication_handler,1}, {couch_httpd,authenticate_request,2}, {couch_httpd,handle_request_int,5}, {mochiweb_http,headers,5}, {proc_lib,init_p_do_apply,3}]

[Thu, 21 Mar 2013 16:22:27 GMT] [info] [] 90.84.144.194 - - 'PUT' /acra-[mydb]/_design/acra-storage/_update/report/8a29f8ad-b3da-4842-8007-73baf6b37ac3 302

What is strange is that it works if I'm using the admin user with "reporter" rules

KevinGaudin commented 11 years ago

It might be caused by an inconsistency between the user doc id which has to be "org.couchdb.user:[newuserid]" and the user name "name" : "[username]". [newuserid] and [newusername] must be identical.

jefBinomed commented 11 years ago

I already create the reporter user with the same username and usernameid so it can comes from here... :(

KevinGaudin commented 11 years ago

Can you login to Futon with your reporter user ?

jefBinomed commented 11 years ago

Indeed ! I couldn't login my user to Futon...

jefBinomed commented 11 years ago

The error is due to the version of CouchDB i'm using : 1.0.1

I try the solution of alternative creation user and it still doesn"t work.. :(

jefBinomed commented 11 years ago

I finally use couchDB 1.3.x and it works