hoppscotch / hoppscotch

Open source API development ecosystem - https://hoppscotch.io (open-source alternative to Postman, Insomnia)
https://hoppscotch.io
MIT License
65.69k stars 4.57k forks source link

[bug]: https:domain/v1/auth/providers giving 500 error #4536

Open mohijeet-changejar opened 1 week ago

mohijeet-changejar commented 1 week ago

Is there an existing issue for this?

Current behavior

when i am trying to load user dashboard or admin dashboard i am getting error in /v1/auth/providers api, this i am assuming as issue with code, i am also attaching error i am getting in docker-compose container logs


hoppscotch-aio            | Backend Server | Query Complexity: 7
hoppscotch-aio            | Backend Server | Query Complexity: 4
hoppscotch-aio            | Backend Server | Query Complexity: 3
hoppscotch-aio            | Backend Server | Query Complexity: 17
hoppscotch-aio            | Backend Server | Query Complexity: 3
hoppscotch-aio            | Backend Server | [Nest] 37  - 11/13/2024, 6:07:44 PM   ERROR [ExceptionsHandler] Cannot read properties of undefined (reading 'split')
hoppscotch-aio            | Backend Server | TypeError: Cannot read properties of undefined (reading 'split')
hoppscotch-aio            | Backend Server |     at InfraConfigService.getAllowedAuthProviders (/dist/backend/dist/infra-config/infra-config.service.js:266:13)
hoppscotch-aio            | Backend Server |     at AuthService.getAuthProviders (/dist/backend/dist/auth/auth.service.js:248:40)
hoppscotch-aio            | Backend Server |     at AuthController.getAuthProviders (/dist/backend/dist/auth/auth.controller.js:41:50)
hoppscotch-aio            | Backend Server |     at /dist/backend/node_modules/.pnpm/@nestjs+core@10.4.4_@nestjs+common@10.4.4_class-transformer@0.5.1_class-validator@0.14.1_refl_uclmhdhodpinoxc7fwisrergn4/node_modules/@nestjs/core/router/router-execution-context.js:38:29
hoppscotch-aio            | Backend Server |     at InterceptorsConsumer.transformDeferred (/dist/backend/node_modules/.pnpm/@nestjs+core@10.4.4_@nestjs+common@10.4.4_class-transformer@0.5.1_class-validator@0.14.1_refl_uclmhdhodpinoxc7fwisrergn4/node_modules/@nestjs/core/interceptors/interceptors-consumer.js:31:33)
hoppscotch-aio            | Backend Server |     at /dist/backend/node_modules/.pnpm/@nestjs+core@10.4.4_@nestjs+common@10.4.4_class-transformer@0.5.1_class-validator@0.14.1_refl_uclmhdhodpinoxc7fwisrergn4/node_modules/@nestjs/core/interceptors/interceptors-consumer.js:18:86
hoppscotch-aio            | Backend Server |     at AsyncResource.runInAsyncScope (node:async_hooks:206:9)
hoppscotch-aio            | Backend Server |     at bound (node:async_hooks:238:16)
hoppscotch-aio            | Backend Server |     at Observable._subscribe (/dist/backend/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/cjs/internal/observable/defer.js:8:31)
hoppscotch-aio            | Backend Server |     at Observable._trySubscribe (/dist/backend/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/cjs/internal/Observable.js:41:25)
hoppscotch-aio            | Backend Server | [Nest] 37  - 11/13/2024, 6:08:00 PM   ERROR [ExceptionsHandler] Cannot read properties of undefined (reading 'split')
hoppscotch-aio            | Backend Server | TypeError: Cannot read properties of undefined (reading 'split')
hoppscotch-aio            | Backend Server |     at InfraConfigService.getAllowedAuthProviders (/dist/backend/dist/infra-config/infra-config.service.js:266:13)
hoppscotch-aio            | Backend Server |     at AuthService.getAuthProviders (/dist/backend/dist/auth/auth.service.js:248:40)
hoppscotch-aio            | Backend Server |     at AuthController.getAuthProviders (/dist/backend/dist/auth/auth.controller.js:41:50)
hoppscotch-aio            | Backend Server |     at /dist/backend/node_modules/.pnpm/@nestjs+core@10.4.4_@nestjs+common@10.4.4_class-transformer@0.5.1_class-validator@0.14.1_refl_uclmhdhodpinoxc7fwisrergn4/node_modules/@nestjs/core/router/router-execution-context.js:38:29

Steps to reproduce

configured docker-compose file with domain names and hosted on cloud server(ec2), and for accessing user/admin dashboard, configured nginx with one server and four locations

  1. / redirecting on localhost:3000
  2. /admin redirecting on localhost:3100
  3. /v1 redirecting on localhost:3170/v1
  4. /graphql redirecting on localhost:3170/graphql

while accessing either user dashboard or admin dashboard with domain name getting error 500 internal server error while clicking on login tab/

Environment

Production

Version

Self-hosted

mirarifhasan commented 2 days ago

Hi @mohijeet-changejar

Thank you for bringing this to our attention! We're actively working on this type of issue and trying to reproduce it on our end.

If you're still experiencing the problem, could you share a snapshot of the InfraConfig table from your database? Feel free to mask or edit any sensitive data in the snapshot to ensure your information remains secure.