mongoose icon indicating copy to clipboard operation
mongoose copied to clipboard

MongoError: Authentication failed (for empty user/pass)

Open adamreisnz opened this issue 11 years ago • 8 comments

This used to work a couple versions back but now I keep getting a MongoError: Authentication failed. error when trying to connect to my localhost database. Can't we connect without credentials anymore?

This is in version 4.2.2, but 4.1.12 is also affected, but working fine when I downgrade to 4.1.6. A little bit worrisome, as there aren't supposed to be any breaking changes for patch releases.

DB config is:

db: {
  uri: 'mongodb://localhost/meanie',
  debug: true,
  options: {
    user: '',
    pass: ''
  }
},

adamreisnz avatar Oct 25 '15 09:10 adamreisnz

Should be fixed with #3498 when 4.2.3 gets shipped tomorrow.

vkarpov15 avatar Oct 25 '15 17:10 vkarpov15

Thanks! On Oct 26, 2015 6:04 AM, "Valeri Karpov" [email protected] wrote:

Should be fixed with #3498 https://github.com/Automattic/mongoose/pull/3498 when 4.2.3 gets shipped tomorrow.

— Reply to this email directly or view it on GitHub https://github.com/Automattic/mongoose/issues/3500#issuecomment-150944574 .

adamreisnz avatar Oct 25 '15 18:10 adamreisnz

Just to double check, is this fix in 4.2.3 or 4.2.4? If the latter, when is 4.2.4 due to come out?

adamreisnz avatar Oct 29 '15 01:10 adamreisnz

It's in 4.2.3, which is already released. Re-open if you're still having this issue after upgrading.

vkarpov15 avatar Oct 29 '15 14:10 vkarpov15

Ok will retest, just that you modified the milestone from 4.2.3 to 4.2.4 had me a bit confused.

adamreisnz avatar Oct 29 '15 19:10 adamreisnz

From 4.2.3 to 4.2.5, this bug also exists. When I used 4.1.11 this bug not exists. Why?

zhangjx avatar Nov 10 '15 08:11 zhangjx

@zhangjx can you show a code example? OP for #3498 said that this issue was fixed...

vkarpov15 avatar Nov 10 '15 14:11 vkarpov15

I'm on mongoose 4.2.4 now and I can confirm that this issue has been fixed. I am no longer getting an error for empty credentials.

adamreisnz avatar Nov 10 '15 20:11 adamreisnz