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

MongoDB Connector #908

Closed
BrandonCopley opened this issue Dec 4, 2020 · 12 comments
Closed

MongoDB Connector #908

BrandonCopley opened this issue Dec 4, 2020 · 12 comments
Labels
bug Something isn't working hacktoberfest-help-needed The maintainer needs help due to time constraint/missing knowledge upstream The issue dervies from one of next-auth dependencies

Comments

@BrandonCopley
Copy link

BrandonCopley commented Dec 4, 2020

I am trying to connect to mongodb using next-auth and I receive the error:

Cannot destructure property 'manager' of 'connection' as it is null

I have added my string to the [...nextAuth].js file, adding the option:

database:   'mongodb://username:password@cluster0.vlmha.mongodb.net:27017/winston'

The database is a BLANK slate. Yet I cannot seem to connect to it and do email login.

@BrandonCopley BrandonCopley added the bug Something isn't working label Dec 4, 2020
@BrandonCopley
Copy link
Author

I'm seeing lots of errors from the docs, I just think the docs may be outdated with google provider? I no longer get verified email from google oauth.

@balazsorban44 balazsorban44 added the hacktoberfest-help-needed The maintainer needs help due to time constraint/missing knowledge label Dec 14, 2020
@balazsorban44 balazsorban44 reopened this Dec 14, 2020
@BrandonCopley
Copy link
Author

@balazsorban44 are you seeing errors now as well? I'm getting some really funky errors today from nextAuth.js

@balazsorban44
Copy link
Member

Don't know if it's coincidence, might be related to Google outages today?: https://www.bbc.com/news/technology-55299779

@BrandonCopley
Copy link
Author

BrandonCopley commented Dec 14, 2020 via email

@CodingJinxx
Copy link

Same here

@trivektor
Copy link

Me too

@balazsorban44
Copy link
Member

balazsorban44 commented Jan 9, 2021

@CodingJinxx @trivektor, thanks for chipping in, but a reproduction repo and some config information would be very helpful.

@BrandonCopley do you have something maybe?

@gitnasr
Copy link

gitnasr commented Jan 10, 2021

+1 here

@trivektor
Copy link

Here's my config https://github.com/trivektor/nextjs-ticket-tracking/blob/main/pages/api/auth/%5B...nextauth%5D.js#L11

After googling around, I found that the solution is to use typeorm 0.2.28

https://github.com/trivektor/nextjs-ticket-tracking/blob/main/package.json#L25

@gitnasr
Copy link

gitnasr commented Jan 10, 2021

Here's my config https://github.com/trivektor/nextjs-ticket-tracking/blob/main/pages/api/auth/%5B...nextauth%5D.js#L11

After googling around, I found that the solution is to use typeorm 0.2.28

https://github.com/trivektor/nextjs-ticket-tracking/blob/main/package.json#L25

{ "name": "next-test-auth", "version": "0.1.0", "private": true, "scripts": { "dev": "next dev", "build": "next build", "start": "next start" }, "dependencies": { "axios": "^0.21.1", "jsonwebtoken": "^8.5.1", "mongodb": "^3.6.3", "next": "10.0.5", "next-auth": "^3.1.0", "react": "17.0.1", "react-dom": "17.0.1", "reflect-metadata": "^0.1.13", "typeorm": "0.2.28" }, "peerOptionalDependencies": { "mongodb": "^3.6.2" }, "resolutions": { "typeorm": "0.2.28" } }

my Package.json and still get this error

[next-auth][error][oauth_callback_handler_error] TypeError: Cannot destructure property 'manager' of 'connection' as it is null.

@BrandonCopley
Copy link
Author

BrandonCopley commented Jan 10, 2021 via email

@balazsorban44
Copy link
Member

So as far as I can understand, this is an upstream issue, not directly next-auth. I would like to close this issue then, feel free to comment later on, when a fix is released upstream, so we can incorporate it here as well.

@balazsorban44 balazsorban44 added the upstream The issue dervies from one of next-auth dependencies label Jan 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working hacktoberfest-help-needed The maintainer needs help due to time constraint/missing knowledge upstream The issue dervies from one of next-auth dependencies
Projects
None yet
Development

No branches or pull requests

5 participants