-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cryptic error for chttpd_auth_cache:username #1821
Comments
That's a definite bug - are you able to try Couch 2.3.0 to see if this is fixed? |
This is not from a db's VDU, but from auth_cache. The field This is not exactly a bug, more of exception not been handled gracefully, because assumption here is that validation on @akircher Check out for a doc |
@eiri agreed there should only be docs in |
@wohali oh yeah, for sure, this is a good beginner-friendly defect to fix. Crashing the auth cache's changes reader on a misconfiguration is excessive, a log's warning on an invalid username and then ignore would be a better way to handle this. |
@eiri that did it! Not sure how a user got in there with that _id. We had some recent code changes that used 'force=true' as an option, maybe some type of automatic conflict resolution is what did it. |
I'm working on a fix. What would be the proper place to add a test for that? |
@popojargo I don't see an obvious existing test file, so I would probably create a new one called test/chttpd_auth_cache_test.erl and add any new tests there. For a simple unit test, It's tempting to just add a test to chttpd_auth_cache.erl itself, but there are obscure interactions between meck and eunit that will occasionally prevent such tests from running when invoked via |
@jaydoane I was planning on doing the following: Test 1: Check if the user is removed from auth cache when it has a valid id Since I started working with erlang yesterday, I might need few advices.
|
Update: deleting the user was not enough. I deleted the doc and am still getting the error. Maybe a purge will work. |
I'm hitting this as well (accidentally created a document in CouchDB 2.3.1
|
I apologize if this is documented elsewhere, but I am seeing a lot of the error below on our production server. Is this okay? If not, is this an error in our code or in couchdb? To my knowledge none of our views/validation use a function called "username". Thank you in advance for your time.
Expected Behavior
No notice or error is logged
Your Environment
This is running on Couch DB 2.2.0, Node 10.9.0, Ubuntu 16.04.5
The text was updated successfully, but these errors were encountered: