Skip to content
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

Invalid database name with MongoDB and replica set #6482

Closed
andreoav opened this issue Jul 28, 2020 · 5 comments
Closed

Invalid database name with MongoDB and replica set #6482

andreoav opened this issue Jul 28, 2020 · 5 comments

Comments

@andreoav
Copy link

Issue type:

[ ] question
[x] bug report
[ ] feature request
[ ] documentation issue

Database system/driver:

[ ] cordova
[x] mongodb
[ ] mssql
[ ] mysql / mariadb
[ ] oracle
[ ] postgres
[ ] cockroachdb
[ ] sqlite
[ ] sqljs
[ ] react-native
[ ] expo

TypeORM version:

[ ] latest
[ ] @next
[x] 0.2.25 (or put your version here)

Steps to reproduce or a small repository showing the problem:

After upgrading to version 0.2.25 my application can't connect to MongoDB.

Invalid database name: 'siteDatabase?readPreference=primary&replicaSet=RS&authSource=siteDatabase'

On production environments I have a replica set and the URI is like the following.

mongodb://user:password@db-mongo-PRD-siteDatabase01.example.com:27017,db-mongo-PRD-siteDatabase02.example.com:27017/siteDatabase?readPreference=primary&replicaSet=RS&authSource=siteDatabase
@scadgek
Copy link
Contributor

scadgek commented Jul 31, 2020

+1, I ran into the same problem after upgrading to 0.2.25. Downgrading to 0.0.24 resolved the issue.

@rcursaru
Copy link

+1, solved by reverting to 0.2.24
scary thing, 0.2.25 is out since 19th May...

@imnotjames
Copy link
Contributor

More information needed - can you include how you are specifying this for TypeORM so I can replicate locally?

@imnotjames
Copy link
Contributor

This should be fixed as of 0.2.26 - This is a duplicate of issue #6389 which was fixed by #6390 !

@scadgek
Copy link
Contributor

scadgek commented Sep 30, 2020

Awesome, thank you James!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants