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

Error when logging in by Google on the frontend #171

Open
marcoriesco opened this issue Feb 23, 2021 · 2 comments
Open

Error when logging in by Google on the frontend #171

marcoriesco opened this issue Feb 23, 2021 · 2 comments

Comments

@marcoriesco
Copy link

I'm getting this error, strapi working normally, but I can't log into the strapi through the frontend.

Does anyone go through this?

 OAuthProfile: {
    id: '104265214333844458905',
    email: '[email protected]',
    verified_email: true,
    name: 'SHARKDEV SHARKDEV',
    given_name: 'SHARKDEV',
    family_name: 'SHARKDEV',
    picture: 'https://lh3.googleusercontent.com/a-/AOh14Gh4nDcKYkBW5fcxAC4yb4SjgY8zi5QKdNJEL-B7=s96-c',
    locale: 'pt-BR'
  }
}
[next-auth][error][adapter_connection_error] 
https://next-auth.js.org/errors#adapter_connection_error error: password authentication failed for user "strapi"
    at Parser.parseErrorMessage (D:\DEV\App\tmp\teste\frontend\node_modules\pg-protocol\dist\parser.js:278:15)
    at Parser.handlePacket (D:\DEV\App\tmp\teste\frontend\node_modules\pg-protocol\dist\parser.js:126:29)
    at Parser.parse (D:\DEV\App\tmp\teste\frontend\node_modules\pg-protocol\dist\parser.js:39:38)
    at Socket.<anonymous> (D:\DEV\App\tmp\teste\frontend\node_modules\pg-protocol\dist\index.js:10:42)
    at Socket.emit (events.js:315:20)
    at addChunk (_stream_readable.js:295:12)
    at readableAddChunk (_stream_readable.js:271:9)
    at Socket.Readable.push (_stream_readable.js:212:10)
    at TCP.onStreamRead (internal/stream_base_commons.js:186:23) {
  length: 164,
  severity: 'FATAL',
  code: '28P01',
  detail: undefined,
  hint: undefined,
  position: undefined,
  internalPosition: undefined,
  internalQuery: undefined,
  where: undefined,
  schema: undefined,
  table: undefined,
  column: undefined,
  dataType: undefined,
  constraint: undefined,
  file: 'd:\\pginstaller_13.auto\\postgres.windows-x64\\src\\backend\\libpq\\auth.c',
  line: '334',
  routine: 'auth_failed'
}
[next-auth][error][oauth_callback_handler_error]
https://next-auth.js.org/errors#oauth_callback_handler_error TypeError: Cannot destructure property 'manager' of 'connection' as it is null.
    at Object.<anonymous> (D:\DEV\App\tmp\teste\frontend\node_modules\next-auth\dist\adapters\typeorm\index.js:112:9)
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (D:\DEV\App\tmp\teste\frontend\node_modules\next-auth\dist\adapters\typeorm\index.js:26:103)
    at _next (D:\DEV\App\tmp\teste\frontend\node_modules\next-auth\dist\adapters\typeorm\index.js:28:194)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
@ghoshnirmalya
Copy link
Owner

ghoshnirmalya commented Feb 28, 2021

@marcoriesco I believe that this issue is similar to #4. Please let me know if the discussion in that issue helps you. I'll keep this open for the time being.

@rvanderfeer
Copy link

I was able to resolve by examining #4 - for me the issue was that I had a local postgres instance running, and the docker container's port mapping (5432:5432) was masked by this instance as it uses the default port.
This causes the frontend to connect to the local postgres instance, where the strapi user & db don't exist.

Either stopping the local postgres or changing the external port in frontend/.env and backend/docker-compose.yml 's db section will resolve (gotcha here was not to change the internal DATABASE_PORT used in the backend service).

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

3 participants