-
Notifications
You must be signed in to change notification settings - Fork 154
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
TypeError: db.info is not a function #374
Comments
Looks like line 30 of var db = req.PouchDB.new(name, utils.makeOpts(req)); I've create a pull request that I believe fixes it. #433 |
so, I looked @benbenbenbenbenben's implementation, and he's right. One catch, it's not ALWAYS a promise. Using pouchdb-authentication with express-pouchdb you have a couple scenarios of users:
So, i let it resolve if it is a promise, and if its not, resolve will pass the db through anyway. My solution is as follows:
`
` I then used patch-package to save these changes to my project express-pouchdb. It was the easiest since this is a monorepo and hard to install via git in npm if i forked pouch-db server. I might make a pull request but. From the looks of it, it will sit stale. |
I'm also going to note, this error, should have been properly wrapped anyway. right now it will fail and the WHOLE express app will stop functioning. So, kind of problematic. i don't know why this hasn't come up or people are just not using pouchdb-authentication at all |
This bug was reported Feb 2019, it's now nearly 3 years later. I did this with CURL Server Did This TypeError: db.info is not a function Conclusion This software is ABANDON WEAR and should not be used because no one fixes security issues such as these in anywhere near a timely fashion! I just wated 7 hours come find out I need to delete this and find a windows based CouchDB alternative.. |
Whenever I try creating a database or performing actions that require authentication that I don't have, instead of the server returning an unauthorized message, it never responds and I get this error:
However, with proper authorization no error occurs and the request completes and responds successfully.
My code is here:
The text was updated successfully, but these errors were encountered: