[GH-ISSUE #2990] [bug]: Self host backend container deploy fail and continuous restart when using Mailcatcher #970

Closed
opened 2026-03-16 17:51:54 +03:00 by kerem · 18 comments
Owner

Originally created by @hoppscotchScope on GitHub (Apr 14, 2023).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/2990

Originally assigned to: @balub on GitHub.

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

When setting up the beta self hosted Hoppscotch and running everything using the provided docker images and following the documentation, the hoppscotch-backend container goes into a continual restart loop as it keeps trying configure the mailer using the mailer config I've provided in my .env which is a locally hosted MailCatcher url, which is apparently supported according to the docs.

The error logs from the hoppscotch-backend container are below:

> hoppscotch-backend@2023.4.0 start:prod /usr/src/app
> node dist/main

Running in production: true
Port: 3000
Database: postgresql://postgres:testpass@hoppscotch-db:5432/hoppscotch?connect_timeout=300
[Nest] 19  - 04/14/2023, 2:46:21 PM     LOG [NestFactory] Starting Nest application...
[Nest] 19  - 04/14/2023, 2:46:21 PM     LOG [InstanceLoader] PubSubModule dependencies initialized +75ms
[Nest] 19  - 04/14/2023, 2:46:21 PM     LOG [InstanceLoader] PrismaModule dependencies initialized +1ms
[Nest] 19  - 04/14/2023, 2:46:21 PM     LOG [InstanceLoader] MailerModule dependencies initialized +0ms
[Nest] 19  - 04/14/2023, 2:46:21 PM     LOG [InstanceLoader] PassportModule dependencies initialized +0ms
[Nest] 19  - 04/14/2023, 2:46:21 PM     LOG [InstanceLoader] ThrottlerModule dependencies initialized +1ms
[Nest] 19  - 04/14/2023, 2:46:21 PM     LOG [InstanceLoader] JwtModule dependencies initialized +1ms
[Nest] 19  - 04/14/2023, 2:46:21 PM   ERROR [ExceptionHandler] Cannot create property 'mailer' on string '"smtp://127.0.0.1:1025"'
TypeError: Cannot create property 'mailer' on string '"smtp://127.0.0.1:1025"'
    at new Mail (/usr/src/app/node_modules/.pnpm/nodemailer@6.9.1/node_modules/nodemailer/lib/mailer/index.js:45:33)
    at module.exports.createTransport (/usr/src/app/node_modules/.pnpm/nodemailer@6.9.1/node_modules/nodemailer/lib/nodemailer.js:53:14)
    at MailerTransportFactory.createTransport (/usr/src/app/node_modules/.pnpm/@nestjs-modules+mailer@1.8.1_@nestjs+common@9.2.1_@nestjs+core@9.2.1_nodemailer@6.9.1/node_modules/@nestjs-modules/mailer/dist/mailer-transport.factory.js:13:49)
    at new MailerService (/usr/src/app/node_modules/.pnpm/@nestjs-modules+mailer@1.8.1_@nestjs+common@9.2.1_@nestjs+core@9.2.1_nodemailer@6.9.1/node_modules/@nestjs-modules/mailer/dist/mailer.service.js:38:54)
    at Injector.instantiateClass (/usr/src/app/node_modules/.pnpm/@nestjs+core@9.2.1_@nestjs+common@9.2.1_@nestjs+platform-express@9.2.1_reflect-metadata@0.1.13_rxjs@7.6.0/node_modules/@nestjs/core/injector/injector.js:340:19)
    at callback (/usr/src/app/node_modules/.pnpm/@nestjs+core@9.2.1_@nestjs+common@9.2.1_@nestjs+platform-express@9.2.1_reflect-metadata@0.1.13_rxjs@7.6.0/node_modules/@nestjs/core/injector/injector.js:53:45)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Injector.resolveConstructorParams (/usr/src/app/node_modules/.pnpm/@nestjs+core@9.2.1_@nestjs+common@9.2.1_@nestjs+platform-express@9.2.1_reflect-metadata@0.1.13_rxjs@7.6.0/node_modules/@nestjs/core/injector/injector.js:132:24)
    at async Injector.loadInstance (/usr/src/app/node_modules/.pnpm/@nestjs+core@9.2.1_@nestjs+common@9.2.1_@nestjs+platform-express@9.2.1_reflect-metadata@0.1.13_rxjs@7.6.0/node_modules/@nestjs/core/injector/injector.js:57:13)
    at async Injector.loadProvider (/usr/src/app/node_modules/.pnpm/@nestjs+core@9.2.1_@nestjs+common@9.2.1_@nestjs+platform-express@9.2.1_reflect-metadata@0.1.13_rxjs@7.6.0/node_modules/@nestjs/core/injector/injector.js:84:9)
 ELIFECYCLE  Command failed with exit code 1.

My .env file is as follows:

#-----------------------Backend Config------------------------------#
# Prisma Config
DATABASE_URL=postgresql://postgres:testpass@hoppscotch-db:5432/hoppscotch

# Auth Tokens Config
JWT_SECRET="secret1233"
TOKEN_SALT_COMPLEXITY=10
MAGIC_LINK_TOKEN_VALIDITY= 3
REFRESH_TOKEN_VALIDITY="604800000" # Default validity is 7 days (604800000 ms) in ms
ACCESS_TOKEN_VALIDITY="86400000" # Default validity is 1 day (86400000 ms) in ms
SESSION_SECRET='add some secret here'

# Hoppscotch App Domain Config
REDIRECT_URL="http://localhost:3000"
WHITELISTED_ORIGINS="http://localhost:3170,http://localhost:3000,http://localhost:3100"

# Github Auth Config
GITHUB_CLIENT_ID="redacted"
GITHUB_CLIENT_SECRET=redacted"
GITHUB_CALLBACK_URL="http://localhost:3170/v1/auth/github/callback"
GITHUB_SCOPE="user:email"

# Mailer config
MAILER_SMTP_URL='smtp://127.0.0.1:1025'
MAILER_ADDRESS_FROM='From HoppscotchScope Hoppscotch <hoppscotch@localhostHoppscotch.com>'

# Rate Limit Config
RATE_LIMIT_TTL=60 # In seconds
RATE_LIMIT_MAX=100 # Max requests per IP


#-----------------------Frontend Config------------------------------#


# Base URLs
VITE_BASE_URL=http://localhost:3000
VITE_SHORTCODE_BASE_URL=http://localhost:3000
VITE_ADMIN_URL=http://localhost:3100

# Backend URLs
VITE_BACKEND_GQL_URL=http://localhost:3170/graphql
VITE_BACKEND_WS_URL=wss://localhost:3170/graphql
VITE_BACKEND_API_URL=http://localhost:3170/v1

# Terms Of Service And Privacy Policy Links (Optional)
VITE_APP_TOS_LINK=https://docs.hoppscotch.io/terms
VITE_APP_PRIVACY_POLICY_LINK=https://docs.hoppscotch.io/privacy

Steps to reproduce

  1. Follow the docs to install the requirements for your self hosted hoppscotch beta
  2. Set up MailCatcher on your local machine
  3. Test that MailCatcher works using a simple Python (or other) script
  4. Populate your .env file in the root directory of the project folder - include MailCatcher smpt url in it

MAILER_SMTP_URL='smtp://127.0.0.1:1025'

  1. Follow the rest of the docs to configure, build and run the relevant docker containers
  2. Run docker ps and note the container ID of the 'hoppscotch_hoppscotch-backend' container
  3. Container Status will be "Restarting"
  4. Run 'docker logs id' to get logs and you will see the error I provided above

Environment

Production

Version

Self-hosted

Originally created by @hoppscotchScope on GitHub (Apr 14, 2023). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/2990 Originally assigned to: @balub on GitHub. ### Is there an existing issue for this? - [X] I have searched the existing issues ### Current behavior When setting up the beta self hosted Hoppscotch and running everything using the provided docker images and following the documentation, the hoppscotch-backend container goes into a continual restart loop as it keeps trying configure the mailer using the mailer config I've provided in my .env which is a locally hosted MailCatcher url, which is apparently supported according to the docs. The error logs from the hoppscotch-backend container are below: ``` > hoppscotch-backend@2023.4.0 start:prod /usr/src/app > node dist/main Running in production: true Port: 3000 Database: postgresql://postgres:testpass@hoppscotch-db:5432/hoppscotch?connect_timeout=300 [Nest] 19 - 04/14/2023, 2:46:21 PM LOG [NestFactory] Starting Nest application... [Nest] 19 - 04/14/2023, 2:46:21 PM LOG [InstanceLoader] PubSubModule dependencies initialized +75ms [Nest] 19 - 04/14/2023, 2:46:21 PM LOG [InstanceLoader] PrismaModule dependencies initialized +1ms [Nest] 19 - 04/14/2023, 2:46:21 PM LOG [InstanceLoader] MailerModule dependencies initialized +0ms [Nest] 19 - 04/14/2023, 2:46:21 PM LOG [InstanceLoader] PassportModule dependencies initialized +0ms [Nest] 19 - 04/14/2023, 2:46:21 PM LOG [InstanceLoader] ThrottlerModule dependencies initialized +1ms [Nest] 19 - 04/14/2023, 2:46:21 PM LOG [InstanceLoader] JwtModule dependencies initialized +1ms [Nest] 19 - 04/14/2023, 2:46:21 PM ERROR [ExceptionHandler] Cannot create property 'mailer' on string '"smtp://127.0.0.1:1025"' TypeError: Cannot create property 'mailer' on string '"smtp://127.0.0.1:1025"' at new Mail (/usr/src/app/node_modules/.pnpm/nodemailer@6.9.1/node_modules/nodemailer/lib/mailer/index.js:45:33) at module.exports.createTransport (/usr/src/app/node_modules/.pnpm/nodemailer@6.9.1/node_modules/nodemailer/lib/nodemailer.js:53:14) at MailerTransportFactory.createTransport (/usr/src/app/node_modules/.pnpm/@nestjs-modules+mailer@1.8.1_@nestjs+common@9.2.1_@nestjs+core@9.2.1_nodemailer@6.9.1/node_modules/@nestjs-modules/mailer/dist/mailer-transport.factory.js:13:49) at new MailerService (/usr/src/app/node_modules/.pnpm/@nestjs-modules+mailer@1.8.1_@nestjs+common@9.2.1_@nestjs+core@9.2.1_nodemailer@6.9.1/node_modules/@nestjs-modules/mailer/dist/mailer.service.js:38:54) at Injector.instantiateClass (/usr/src/app/node_modules/.pnpm/@nestjs+core@9.2.1_@nestjs+common@9.2.1_@nestjs+platform-express@9.2.1_reflect-metadata@0.1.13_rxjs@7.6.0/node_modules/@nestjs/core/injector/injector.js:340:19) at callback (/usr/src/app/node_modules/.pnpm/@nestjs+core@9.2.1_@nestjs+common@9.2.1_@nestjs+platform-express@9.2.1_reflect-metadata@0.1.13_rxjs@7.6.0/node_modules/@nestjs/core/injector/injector.js:53:45) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async Injector.resolveConstructorParams (/usr/src/app/node_modules/.pnpm/@nestjs+core@9.2.1_@nestjs+common@9.2.1_@nestjs+platform-express@9.2.1_reflect-metadata@0.1.13_rxjs@7.6.0/node_modules/@nestjs/core/injector/injector.js:132:24) at async Injector.loadInstance (/usr/src/app/node_modules/.pnpm/@nestjs+core@9.2.1_@nestjs+common@9.2.1_@nestjs+platform-express@9.2.1_reflect-metadata@0.1.13_rxjs@7.6.0/node_modules/@nestjs/core/injector/injector.js:57:13) at async Injector.loadProvider (/usr/src/app/node_modules/.pnpm/@nestjs+core@9.2.1_@nestjs+common@9.2.1_@nestjs+platform-express@9.2.1_reflect-metadata@0.1.13_rxjs@7.6.0/node_modules/@nestjs/core/injector/injector.js:84:9)  ELIFECYCLE  Command failed with exit code 1. ``` My .env file is as follows: ``` #-----------------------Backend Config------------------------------# # Prisma Config DATABASE_URL=postgresql://postgres:testpass@hoppscotch-db:5432/hoppscotch # Auth Tokens Config JWT_SECRET="secret1233" TOKEN_SALT_COMPLEXITY=10 MAGIC_LINK_TOKEN_VALIDITY= 3 REFRESH_TOKEN_VALIDITY="604800000" # Default validity is 7 days (604800000 ms) in ms ACCESS_TOKEN_VALIDITY="86400000" # Default validity is 1 day (86400000 ms) in ms SESSION_SECRET='add some secret here' # Hoppscotch App Domain Config REDIRECT_URL="http://localhost:3000" WHITELISTED_ORIGINS="http://localhost:3170,http://localhost:3000,http://localhost:3100" # Github Auth Config GITHUB_CLIENT_ID="redacted" GITHUB_CLIENT_SECRET=redacted" GITHUB_CALLBACK_URL="http://localhost:3170/v1/auth/github/callback" GITHUB_SCOPE="user:email" # Mailer config MAILER_SMTP_URL='smtp://127.0.0.1:1025' MAILER_ADDRESS_FROM='From HoppscotchScope Hoppscotch <hoppscotch@localhostHoppscotch.com>' # Rate Limit Config RATE_LIMIT_TTL=60 # In seconds RATE_LIMIT_MAX=100 # Max requests per IP #-----------------------Frontend Config------------------------------# # Base URLs VITE_BASE_URL=http://localhost:3000 VITE_SHORTCODE_BASE_URL=http://localhost:3000 VITE_ADMIN_URL=http://localhost:3100 # Backend URLs VITE_BACKEND_GQL_URL=http://localhost:3170/graphql VITE_BACKEND_WS_URL=wss://localhost:3170/graphql VITE_BACKEND_API_URL=http://localhost:3170/v1 # Terms Of Service And Privacy Policy Links (Optional) VITE_APP_TOS_LINK=https://docs.hoppscotch.io/terms VITE_APP_PRIVACY_POLICY_LINK=https://docs.hoppscotch.io/privacy ``` ### Steps to reproduce 1. Follow the docs to install the requirements for your self hosted hoppscotch beta 3. Set up MailCatcher on your local machine 4. Test that MailCatcher works using a simple Python (or other) script 5. Populate your .env file in the root directory of the project folder - include MailCatcher smpt url in it > MAILER_SMTP_URL='smtp://127.0.0.1:1025' 6. Follow the rest of the docs to configure, build and run the relevant docker containers 7. Run docker ps and note the container ID of the 'hoppscotch_hoppscotch-backend' container 8. Container Status will be "Restarting" 9. Run 'docker logs id' to get logs and you will see the error I provided above ### Environment Production ### Version Self-hosted
kerem 2026-03-16 17:51:54 +03:00
Author
Owner

@AndrewBastin commented on GitHub (Apr 14, 2023):

Based on docker rules, you cannot directly connect to the host machine's localhost (or 127.0.0.1) via Docker containers directly. Instead you have to use host.docker.internal in place of 127.0.0.1.

Please do let me know if this fixes the issue.

<!-- gh-comment-id:1508823134 --> @AndrewBastin commented on GitHub (Apr 14, 2023): Based on docker rules, you cannot directly connect to the host machine's localhost (or 127.0.0.1) via Docker containers directly. Instead you have to use `host.docker.internal` in place of `127.0.0.1`. Please do let me know if this fixes the issue.
Author
Owner

@hoppscotchScope commented on GitHub (Apr 14, 2023):

@AndrewBastin Thanks for getting back to me, no this didn't work I've the exact same issue:

[Nest] 19  - 04/14/2023, 3:45:56 PM   ERROR [ExceptionHandler] Cannot create property 'mailer' on string '"smtp://host.docker.internal:1025"'
hoppscotch-backend     | TypeError: Cannot create property 'mailer' on string '"smtp://host.docker.internal:1025"'

I've just tried it there with using Gmail as the smpts, and the same issue, there appears maybe to be an issue with nodemailer possibly?

<!-- gh-comment-id:1508852547 --> @hoppscotchScope commented on GitHub (Apr 14, 2023): @AndrewBastin Thanks for getting back to me, no this didn't work I've the exact same issue: ``` [Nest] 19 - 04/14/2023, 3:45:56 PM ERROR [ExceptionHandler] Cannot create property 'mailer' on string '"smtp://host.docker.internal:1025"' hoppscotch-backend | TypeError: Cannot create property 'mailer' on string '"smtp://host.docker.internal:1025"' ``` I've just tried it there with using Gmail as the smpts, and the same issue, there appears maybe to be an issue with nodemailer possibly?
Author
Owner

@AndrewBastin commented on GitHub (Apr 14, 2023):

We use Mailcatcher internally to debug our mailer so we are pretty sure this should work. 😅

Can you post the .env file (just the MAILER bits would be fine).

<!-- gh-comment-id:1508927954 --> @AndrewBastin commented on GitHub (Apr 14, 2023): We use Mailcatcher internally to debug our mailer so we are pretty sure this should work. 😅 Can you post the `.env` file (just the MAILER bits would be fine).
Author
Owner

@hoppscotchScope commented on GitHub (Apr 14, 2023):

Ah okay, now the worry that I've just misconfigured something is setting in... lol

The full .env file is posted above, but this is the mailer part from it:

# Mailer config
MAILER_SMTP_URL='smtp://127.0.0.1:1025'
MAILER_ADDRESS_FROM='From HoppscotchScope Hoppscotch <hoppscotch@localhostHoppscotch.com>'
<!-- gh-comment-id:1509060765 --> @hoppscotchScope commented on GitHub (Apr 14, 2023): Ah okay, now the worry that I've just misconfigured something is setting in... lol The full .env file is posted above, but this is the mailer part from it: ``` # Mailer config MAILER_SMTP_URL='smtp://127.0.0.1:1025' MAILER_ADDRESS_FROM='From HoppscotchScope Hoppscotch <hoppscotch@localhostHoppscotch.com>' ```
Author
Owner

@balub commented on GitHub (Apr 15, 2023):

@hoppscotchScope , like @AndrewBastin said we use mailcatcher to test the mailer and we are certain it works with mailcatcher. Could you change the MAILER_ADDRESS_FROM to an actual email like just username@domain.com and try.

<!-- gh-comment-id:1509712220 --> @balub commented on GitHub (Apr 15, 2023): @hoppscotchScope , like @AndrewBastin said we use mailcatcher to test the mailer and we are certain it works with mailcatcher. Could you change the `MAILER_ADDRESS_FROM` to an actual email like just `username@domain.com` and try.
Author
Owner

@hoppscotchScope commented on GitHub (Apr 17, 2023):

@balub I tried this using the following config:

Mailer config

MAILER_SMTP_URL='smtp://127.0.0.1:1025'
MAILER_ADDRESS_FROM='myPersonalEmail@gmail.com'

And no luck :(

The only other thing I can think of is I have MailCatcher running locally on my own machine and the hoppscotch-backend is running in the docker container, but that shouldn't cause any issues really

Any other thoughts?

<!-- gh-comment-id:1511081101 --> @hoppscotchScope commented on GitHub (Apr 17, 2023): @balub I tried this using the following config: # Mailer config MAILER_SMTP_URL='smtp://127.0.0.1:1025' MAILER_ADDRESS_FROM='myPersonalEmail@gmail.com' And no luck :( The only other thing I can think of is I have MailCatcher running locally on my own machine and the hoppscotch-backend is running in the docker container, but that shouldn't cause any issues really Any other thoughts?
Author
Owner

@balub commented on GitHub (Apr 17, 2023):

@hoppscotchScope can you change MAILER_SMTP_URL to equal smtp://host.docker.internal:1025 .

<!-- gh-comment-id:1511177916 --> @balub commented on GitHub (Apr 17, 2023): @hoppscotchScope can you change `MAILER_SMTP_URL` to equal `smtp://host.docker.internal:1025` .
Author
Owner

@hoppscotchScope commented on GitHub (Apr 17, 2023):

@balub Yes sorry I should've said I tried that also:

# Mailer config
MAILER_SMTP_URL="smtp://host.docker.internal:1025"
MAILER_ADDRESS_FROM="myPersonalEmail@gmail.com"

And still the exact same error... I'm very perplexed.

Current error logging:

labuser@hoppscotch ~/hoppscotch $ docker-compose up hoppscotch-backend 
WARNING: Found orphan containers (hoppscotch_web_1) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.
hoppscotch_hoppscotch-db_1 is up-to-date
Recreating hoppscotch-backend ... done
Attaching to hoppscotch-backend
hoppscotch-backend     | 
hoppscotch-backend     | > hoppscotch-backend@2023.4.0 start:prod /usr/src/app
hoppscotch-backend     | > node dist/main
hoppscotch-backend     | 
hoppscotch-backend     | Running in production: true
hoppscotch-backend     | Port: 3000
hoppscotch-backend     | Database: postgresql://postgres:testpass@hoppscotch-db:5432/hoppscotch?connect_timeout=300
hoppscotch-backend     | [Nest] 18  - 04/17/2023, 2:10:08 PM     LOG [NestFactory] Starting Nest application...
hoppscotch-backend     | [Nest] 18  - 04/17/2023, 2:10:09 PM     LOG [InstanceLoader] PubSubModule dependencies initialized +83ms
hoppscotch-backend     | [Nest] 18  - 04/17/2023, 2:10:09 PM     LOG [InstanceLoader] PrismaModule dependencies initialized +1ms
hoppscotch-backend     | [Nest] 18  - 04/17/2023, 2:10:09 PM     LOG [InstanceLoader] MailerModule dependencies initialized +0ms
hoppscotch-backend     | [Nest] 18  - 04/17/2023, 2:10:09 PM     LOG [InstanceLoader] PassportModule dependencies initialized +1ms
hoppscotch-backend     | [Nest] 18  - 04/17/2023, 2:10:09 PM     LOG [InstanceLoader] ThrottlerModule dependencies initialized +1ms
hoppscotch-backend     | [Nest] 18  - 04/17/2023, 2:10:09 PM     LOG [InstanceLoader] JwtModule dependencies initialized +0ms
hoppscotch-backend     | [Nest] 18  - 04/17/2023, 2:10:09 PM   ERROR [ExceptionHandler] Cannot create property 'mailer' on string '"smtp://host.docker.internal:1025"'
hoppscotch-backend     | TypeError: Cannot create property 'mailer' on string '"smtp://host.docker.internal:1025"'
hoppscotch-backend     |     at new Mail (/usr/src/app/node_modules/.pnpm/nodemailer@6.9.1/node_modules/nodemailer/lib/mailer/index.js:45:33)
hoppscotch-backend     |     at module.exports.createTransport (/usr/src/app/node_modules/.pnpm/nodemailer@6.9.1/node_modules/nodemailer/lib/nodemailer.js:53:14)
hoppscotch-backend     |     at MailerTransportFactory.createTransport (/usr/src/app/node_modules/.pnpm/@nestjs-modules+mailer@1.8.1_@nestjs+common@9.2.1_@nestjs+core@9.2.1_nodemailer@6.9.1/node_modules/@nestjs-modules/mailer/dist/mailer-transport.factory.js:13:49)
hoppscotch-backend     |     at new MailerService (/usr/src/app/node_modules/.pnpm/@nestjs-modules+mailer@1.8.1_@nestjs+common@9.2.1_@nestjs+core@9.2.1_nodemailer@6.9.1/node_modules/@nestjs-modules/mailer/dist/mailer.service.js:38:54)
hoppscotch-backend     |     at Injector.instantiateClass (/usr/src/app/node_modules/.pnpm/@nestjs+core@9.2.1_@nestjs+common@9.2.1_@nestjs+platform-express@9.2.1_reflect-metadata@0.1.13_rxjs@7.6.0/node_modules/@nestjs/core/injector/injector.js:340:19)
hoppscotch-backend     |     at callback (/usr/src/app/node_modules/.pnpm/@nestjs+core@9.2.1_@nestjs+common@9.2.1_@nestjs+platform-express@9.2.1_reflect-metadata@0.1.13_rxjs@7.6.0/node_modules/@nestjs/core/injector/injector.js:53:45)
hoppscotch-backend     |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
hoppscotch-backend     |     at async Injector.resolveConstructorParams (/usr/src/app/node_modules/.pnpm/@nestjs+core@9.2.1_@nestjs+common@9.2.1_@nestjs+platform-express@9.2.1_reflect-metadata@0.1.13_rxjs@7.6.0/node_modules/@nestjs/core/injector/injector.js:132:24)
hoppscotch-backend     |     at async Injector.loadInstance (/usr/src/app/node_modules/.pnpm/@nestjs+core@9.2.1_@nestjs+common@9.2.1_@nestjs+platform-express@9.2.1_reflect-metadata@0.1.13_rxjs@7.6.0/node_modules/@nestjs/core/injector/injector.js:57:13)
hoppscotch-backend     |     at async Injector.loadProvider (/usr/src/app/node_modules/.pnpm/@nestjs+core@9.2.1_@nestjs+common@9.2.1_@nestjs+platform-express@9.2.1_reflect-metadata@0.1.13_rxjs@7.6.0/node_modules/@nestjs/core/injector/injector.js:84:9)
hoppscotch-backend     |  ELIFECYCLE  Command failed with exit code 1.
<!-- gh-comment-id:1511426680 --> @hoppscotchScope commented on GitHub (Apr 17, 2023): @balub Yes sorry I should've said I tried that also: ``` # Mailer config MAILER_SMTP_URL="smtp://host.docker.internal:1025" MAILER_ADDRESS_FROM="myPersonalEmail@gmail.com" ``` And still the exact same error... I'm very perplexed. Current error logging: ``` labuser@hoppscotch ~/hoppscotch $ docker-compose up hoppscotch-backend WARNING: Found orphan containers (hoppscotch_web_1) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up. hoppscotch_hoppscotch-db_1 is up-to-date Recreating hoppscotch-backend ... done Attaching to hoppscotch-backend hoppscotch-backend | hoppscotch-backend | > hoppscotch-backend@2023.4.0 start:prod /usr/src/app hoppscotch-backend | > node dist/main hoppscotch-backend | hoppscotch-backend | Running in production: true hoppscotch-backend | Port: 3000 hoppscotch-backend | Database: postgresql://postgres:testpass@hoppscotch-db:5432/hoppscotch?connect_timeout=300 hoppscotch-backend | [Nest] 18 - 04/17/2023, 2:10:08 PM LOG [NestFactory] Starting Nest application... hoppscotch-backend | [Nest] 18 - 04/17/2023, 2:10:09 PM LOG [InstanceLoader] PubSubModule dependencies initialized +83ms hoppscotch-backend | [Nest] 18 - 04/17/2023, 2:10:09 PM LOG [InstanceLoader] PrismaModule dependencies initialized +1ms hoppscotch-backend | [Nest] 18 - 04/17/2023, 2:10:09 PM LOG [InstanceLoader] MailerModule dependencies initialized +0ms hoppscotch-backend | [Nest] 18 - 04/17/2023, 2:10:09 PM LOG [InstanceLoader] PassportModule dependencies initialized +1ms hoppscotch-backend | [Nest] 18 - 04/17/2023, 2:10:09 PM LOG [InstanceLoader] ThrottlerModule dependencies initialized +1ms hoppscotch-backend | [Nest] 18 - 04/17/2023, 2:10:09 PM LOG [InstanceLoader] JwtModule dependencies initialized +0ms hoppscotch-backend | [Nest] 18 - 04/17/2023, 2:10:09 PM ERROR [ExceptionHandler] Cannot create property 'mailer' on string '"smtp://host.docker.internal:1025"' hoppscotch-backend | TypeError: Cannot create property 'mailer' on string '"smtp://host.docker.internal:1025"' hoppscotch-backend | at new Mail (/usr/src/app/node_modules/.pnpm/nodemailer@6.9.1/node_modules/nodemailer/lib/mailer/index.js:45:33) hoppscotch-backend | at module.exports.createTransport (/usr/src/app/node_modules/.pnpm/nodemailer@6.9.1/node_modules/nodemailer/lib/nodemailer.js:53:14) hoppscotch-backend | at MailerTransportFactory.createTransport (/usr/src/app/node_modules/.pnpm/@nestjs-modules+mailer@1.8.1_@nestjs+common@9.2.1_@nestjs+core@9.2.1_nodemailer@6.9.1/node_modules/@nestjs-modules/mailer/dist/mailer-transport.factory.js:13:49) hoppscotch-backend | at new MailerService (/usr/src/app/node_modules/.pnpm/@nestjs-modules+mailer@1.8.1_@nestjs+common@9.2.1_@nestjs+core@9.2.1_nodemailer@6.9.1/node_modules/@nestjs-modules/mailer/dist/mailer.service.js:38:54) hoppscotch-backend | at Injector.instantiateClass (/usr/src/app/node_modules/.pnpm/@nestjs+core@9.2.1_@nestjs+common@9.2.1_@nestjs+platform-express@9.2.1_reflect-metadata@0.1.13_rxjs@7.6.0/node_modules/@nestjs/core/injector/injector.js:340:19) hoppscotch-backend | at callback (/usr/src/app/node_modules/.pnpm/@nestjs+core@9.2.1_@nestjs+common@9.2.1_@nestjs+platform-express@9.2.1_reflect-metadata@0.1.13_rxjs@7.6.0/node_modules/@nestjs/core/injector/injector.js:53:45) hoppscotch-backend | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) hoppscotch-backend | at async Injector.resolveConstructorParams (/usr/src/app/node_modules/.pnpm/@nestjs+core@9.2.1_@nestjs+common@9.2.1_@nestjs+platform-express@9.2.1_reflect-metadata@0.1.13_rxjs@7.6.0/node_modules/@nestjs/core/injector/injector.js:132:24) hoppscotch-backend | at async Injector.loadInstance (/usr/src/app/node_modules/.pnpm/@nestjs+core@9.2.1_@nestjs+common@9.2.1_@nestjs+platform-express@9.2.1_reflect-metadata@0.1.13_rxjs@7.6.0/node_modules/@nestjs/core/injector/injector.js:57:13) hoppscotch-backend | at async Injector.loadProvider (/usr/src/app/node_modules/.pnpm/@nestjs+core@9.2.1_@nestjs+common@9.2.1_@nestjs+platform-express@9.2.1_reflect-metadata@0.1.13_rxjs@7.6.0/node_modules/@nestjs/core/injector/injector.js:84:9) hoppscotch-backend |  ELIFECYCLE  Command failed with exit code 1. ```
Author
Owner

@hoppscotchScope commented on GitHub (Apr 17, 2023):

@balub Just to say as well I've tried this with smpts from gandi.net (couldnt try google as I've MFA enabled) and it doesn't work either, so there seems to do an actual issue with nodeMailer, or I've somehow misconfigured something - but I don't know how that would be possible as I'm just running your docker image.

Example of what I tried for gandi smtp:

# Mailer config
MAILER_SMTP_URL="smtps://name@mySite.ie:password@mail.gandi.net"
MAILER_ADDRESS_FROM="myPersonalEmail@gmail.com"

and also tried it containing the port too:

# Mailer config
MAILER_SMTP_URL="smtps://name@mySite.ie:password@mail.gandi.net:465"
MAILER_ADDRESS_FROM="myPersonalEmail@gmail.com"

Sorry for the long message, just trying to give as much detail as possible. So I don't think MailCatcher is the issue

<!-- gh-comment-id:1511542171 --> @hoppscotchScope commented on GitHub (Apr 17, 2023): @balub Just to say as well I've tried this with smpts from gandi.net (couldnt try google as I've MFA enabled) and it doesn't work either, so there seems to do an actual issue with nodeMailer, or I've somehow misconfigured something - but I don't know how that would be possible as I'm just running your docker image. Example of what I tried for gandi smtp: ``` # Mailer config MAILER_SMTP_URL="smtps://name@mySite.ie:password@mail.gandi.net" MAILER_ADDRESS_FROM="myPersonalEmail@gmail.com" ``` and also tried it containing the port too: ``` # Mailer config MAILER_SMTP_URL="smtps://name@mySite.ie:password@mail.gandi.net:465" MAILER_ADDRESS_FROM="myPersonalEmail@gmail.com" ``` Sorry for the long message, just trying to give as much detail as possible. So I don't think MailCatcher is the issue
Author
Owner

@balub commented on GitHub (Apr 18, 2023):

@hoppscotchScope I have a few questions I would like the answer to be able to help you solve this problem:

  • Which OS are you trying to run the service on?
  • What command are you using to start mailcatcher?
  • Could you open an interactive terminal with the backend container and check to see if the env's are being set correctly?
<!-- gh-comment-id:1513103555 --> @balub commented on GitHub (Apr 18, 2023): @hoppscotchScope I have a few questions I would like the answer to be able to help you solve this problem: - Which OS are you trying to run the service on? - What command are you using to start mailcatcher? - Could you open an interactive terminal with the backend container and check to see if the env's are being set correctly?
Author
Owner

@balub commented on GitHub (Apr 18, 2023):

Could you run the mailcatcher with the -f flag, so essentially the command will be mailcatcher -f and try again.

<!-- gh-comment-id:1513106255 --> @balub commented on GitHub (Apr 18, 2023): Could you run the mailcatcher with the `-f` flag, so essentially the command will be `mailcatcher -f` and try again.
Author
Owner

@hoppscotchScope commented on GitHub (Apr 18, 2023):

@balub
Which OS are you trying to run the service on?
System details:

OS: Ubuntu 20.04.3 LTS x86_64 
Host: VMware Virtual Platform None 
Kernel: 5.4.0-89-generic 
Uptime: 67 days, 4 hours, 30 mins 
Packages: 725 (dpkg), 5 (snap) 
Shell: bash 5.0.17 
Resolution: preferred 
Terminal: /dev/pts/0 
CPU: Intel Xeon Gold 5220R (8) @ 2.194GHz 
GPU: 00:0f.0 VMware SVGA II Adapter 
Memory: 637MiB / 16012MiB

Could you open an interactive terminal with the backend container and check to see if the env's are being set correctly?
Because the container doesn't start correctly due to the mailer issue the container is in a constant state of "Restarting", meaning when I try to exec in I get this error:
Error response from daemon: Container 60603137063e01a2f48d91483e597cbaca7083eae08b8eedfbaf90cfdfee40cb is restarting, wait until the container is running
Although due to the fact that the mailer error includes my custom MAILER_SMTP_URL from my .env file, I'd say it's safe to assume that the env vars are set correctly... unless there are others that might be off?

What command are you using to start mailcatcher?/Could you run the mailcatcher with the -f flag
I'm running mailcatcher as a systemd service so I could simply tail the logs but for good measure I ran it with "mailcatcher -f" and checked the logs, when I use my testScript to send an email MailCatcher reports back correctly:

labuser@hoppscotch ~ $ mailcatcher -f
Starting MailCatcher v0.8.2
==> smtp://127.0.0.1:1025
/usr/lib/ruby/2.7.0/net/protocol.rb:66: warning: already initialized constant Net::ProtocRetryError
/var/lib/gems/2.7.0/gems/net-protocol-0.2.1/lib/net/protocol.rb:68: warning: previous definition of ProtocRetryError was here
/usr/lib/ruby/2.7.0/net/protocol.rb:206: warning: already initialized constant Net::BufferedIO::BUFSIZE
/var/lib/gems/2.7.0/gems/net-protocol-0.2.1/lib/net/protocol.rb:214: warning: previous definition of BUFSIZE was here
/usr/lib/ruby/2.7.0/net/protocol.rb:503: warning: already initialized constant Net::NetPrivate::Socket
/var/lib/gems/2.7.0/gems/net-protocol-0.2.1/lib/net/protocol.rb:541: warning: previous definition of Socket was here
/var/lib/gems/2.7.0/gems/thin-1.5.1/lib/thin/server.rb:104: warning: constant ::Fixnum is deprecated
==> http://127.0.0.1:1080
==> SMTP: Received message from '<myusername@myemal.com> size=212' (212 bytes)

But when I try to start the hoppscotch-backend container I don't see anything at all in the MailCatcher logs.

<!-- gh-comment-id:1513477513 --> @hoppscotchScope commented on GitHub (Apr 18, 2023): @balub **Which OS are you trying to run the service on?** System details: ``` OS: Ubuntu 20.04.3 LTS x86_64 Host: VMware Virtual Platform None Kernel: 5.4.0-89-generic Uptime: 67 days, 4 hours, 30 mins Packages: 725 (dpkg), 5 (snap) Shell: bash 5.0.17 Resolution: preferred Terminal: /dev/pts/0 CPU: Intel Xeon Gold 5220R (8) @ 2.194GHz GPU: 00:0f.0 VMware SVGA II Adapter Memory: 637MiB / 16012MiB ``` **Could you open an interactive terminal with the backend container and check to see if the env's are being set correctly?** Because the container doesn't start correctly due to the mailer issue the container is in a constant state of "Restarting", meaning when I try to exec in I get this error: `Error response from daemon: Container 60603137063e01a2f48d91483e597cbaca7083eae08b8eedfbaf90cfdfee40cb is restarting, wait until the container is running` Although due to the fact that the mailer error includes my custom MAILER_SMTP_URL from my .env file, I'd say it's safe to assume that the env vars are set correctly... unless there are others that might be off? **What command are you using to start mailcatcher?/Could you run the mailcatcher with the -f flag** I'm running mailcatcher as a systemd service so I could simply tail the logs but for good measure I ran it with "mailcatcher -f" and checked the logs, when I use my testScript to send an email MailCatcher reports back correctly: ``` labuser@hoppscotch ~ $ mailcatcher -f Starting MailCatcher v0.8.2 ==> smtp://127.0.0.1:1025 /usr/lib/ruby/2.7.0/net/protocol.rb:66: warning: already initialized constant Net::ProtocRetryError /var/lib/gems/2.7.0/gems/net-protocol-0.2.1/lib/net/protocol.rb:68: warning: previous definition of ProtocRetryError was here /usr/lib/ruby/2.7.0/net/protocol.rb:206: warning: already initialized constant Net::BufferedIO::BUFSIZE /var/lib/gems/2.7.0/gems/net-protocol-0.2.1/lib/net/protocol.rb:214: warning: previous definition of BUFSIZE was here /usr/lib/ruby/2.7.0/net/protocol.rb:503: warning: already initialized constant Net::NetPrivate::Socket /var/lib/gems/2.7.0/gems/net-protocol-0.2.1/lib/net/protocol.rb:541: warning: previous definition of Socket was here /var/lib/gems/2.7.0/gems/thin-1.5.1/lib/thin/server.rb:104: warning: constant ::Fixnum is deprecated ==> http://127.0.0.1:1080 ==> SMTP: Received message from '<myusername@myemal.com> size=212' (212 bytes) ``` But when I try to start the hoppscotch-backend container I don't see anything at all in the MailCatcher logs.
Author
Owner

@hoppscotchScope commented on GitHub (Apr 19, 2023):

UPDATE:
docker-compose != docker compose lol I didn't realise there was such a difference between compose v1 and compose v2, so after I installed docker compose v2 this is my output:

labuser@hoppscotch ~/hoppscotch $ docker compose up hoppscotch-backend -
[+] Running 1/0
 ✔ Container hoppscotch-hoppscotch-db-1  Running                                                                                                                                                                                                                          0.0s 
Attaching to hoppscotch-backend
hoppscotch-backend exited with code 1
hoppscotch-backend  | 
hoppscotch-backend  | > hoppscotch-backend@2023.4.0 start:prod /usr/src/app
hoppscotch-backend  | > node dist/main
hoppscotch-backend  | 
hoppscotch-backend  | Running in production: true
hoppscotch-backend  | Port: 3000
hoppscotch-backend  | Database: postgresql://postgres:testpass@hoppscotch-db:5432/hoppscotch?connect_timeout=300
hoppscotch-backend  | [Nest] 19  - 04/19/2023, 1:32:52 PM     LOG [NestFactory] Starting Nest application...
hoppscotch-backend  | [Nest] 19  - 04/19/2023, 1:32:52 PM     LOG [InstanceLoader] PubSubModule dependencies initialized +71ms
hoppscotch-backend  | [Nest] 19  - 04/19/2023, 1:32:52 PM     LOG [InstanceLoader] PrismaModule dependencies initialized +1ms
hoppscotch-backend  | [Nest] 19  - 04/19/2023, 1:32:52 PM     LOG [InstanceLoader] MailerModule dependencies initialized +0ms
hoppscotch-backend  | [Nest] 19  - 04/19/2023, 1:32:52 PM     LOG [InstanceLoader] PassportModule dependencies initialized +0ms
hoppscotch-backend  | [Nest] 19  - 04/19/2023, 1:32:52 PM     LOG [InstanceLoader] ThrottlerModule dependencies initialized +2ms
hoppscotch-backend  | [Nest] 19  - 04/19/2023, 1:32:52 PM     LOG [InstanceLoader] JwtModule dependencies initialized +0ms
hoppscotch-backend  | [Nest] 19  - 04/19/2023, 1:32:52 PM     LOG [InstanceLoader] MailerCoreModule dependencies initialized +0ms
hoppscotch-backend  | [Nest] 19  - 04/19/2023, 1:32:52 PM     LOG [InstanceLoader] AppModule dependencies initialized +1ms
hoppscotch-backend  | [Nest] 19  - 04/19/2023, 1:32:52 PM     LOG [InstanceLoader] MailerModule dependencies initialized +3ms
hoppscotch-backend  | [Nest] 19  - 04/19/2023, 1:32:52 PM   ERROR [ExceptionHandler] Cannot read properties of undefined (reading 'split')
hoppscotch-backend  | TypeError: Cannot read properties of undefined (reading 'split')
hoppscotch-backend  |     at new GoogleStrategy (/usr/src/app/dist/auth/strategies/google.strategy.js:26:45)
hoppscotch-backend  |     at Injector.instantiateClass (/usr/src/app/node_modules/.pnpm/@nestjs+core@9.2.1_@nestjs+common@9.2.1_@nestjs+platform-express@9.2.1_reflect-metadata@0.1.13_rxjs@7.6.0/node_modules/@nestjs/core/injector/injector.js:340:19)
hoppscotch-backend  |     at callback (/usr/src/app/node_modules/.pnpm/@nestjs+core@9.2.1_@nestjs+common@9.2.1_@nestjs+platform-express@9.2.1_reflect-metadata@0.1.13_rxjs@7.6.0/node_modules/@nestjs/core/injector/injector.js:53:45)
hoppscotch-backend  |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
hoppscotch-backend  |     at async Injector.resolveConstructorParams (/usr/src/app/node_modules/.pnpm/@nestjs+core@9.2.1_@nestjs+common@9.2.1_@nestjs+platform-express@9.2.1_reflect-metadata@0.1.13_rxjs@7.6.0/node_modules/@nestjs/core/injector/injector.js:132:24)
hoppscotch-backend  |     at async Injector.loadInstance (/usr/src/app/node_modules/.pnpm/@nestjs+core@9.2.1_@nestjs+common@9.2.1_@nestjs+platform-express@9.2.1_reflect-metadata@0.1.13_rxjs@7.6.0/node_modules/@nestjs/core/injector/injector.js:57:13)
hoppscotch-backend  |     at async Injector.loadProvider (/usr/src/app/node_modules/.pnpm/@nestjs+core@9.2.1_@nestjs+common@9.2.1_@nestjs+platform-express@9.2.1_reflect-metadata@0.1.13_rxjs@7.6.0/node_modules/@nestjs/core/injector/injector.js:84:9)
hoppscotch-backend  |     at async Promise.all (index 6)
hoppscotch-backend  |     at async InstanceLoader.createInstancesOfProviders (/usr/src/app/node_modules/.pnpm/@nestjs+core@9.2.1_@nestjs+common@9.2.1_@nestjs+platform-express@9.2.1_reflect-metadata@0.1.13_rxjs@7.6.0/node_modules/@nestjs/core/injector/instance-loader.js:47:9)
hoppscotch-backend  |     at async /usr/src/app/node_modules/.pnpm/@nestjs+core@9.2.1_@nestjs+common@9.2.1_@nestjs+platform-express@9.2.1_reflect-metadata@0.1.13_rxjs@7.6.0/node_modules/@nestjs/core/injector/instance-loader.js:32:13
hoppscotch-backend  |  ELIFECYCLE  Command failed with exit code 1.
hoppscotch-backend exited with code 1

So this is with my .env file the same as what I cited at the bug creation, it's failing to read a property that isn't there. So it seems that even if you have no intention of using Google or Microsoft Auth etc that you still need to leave the env var placeholders in the .env file otherwise it won't run.

So I made a copy of the example env file, and put in my own env vars without removing anything else and the container runs correctly:

labuser@hoppscotch ~/hoppscotch $ docker compose up hoppscotch-backend                                                          
[+] Running 2/0                                                                                                                      
 ✔ Container hoppscotch-hoppscotch-db-1  Running                                                                                0.0s 
 ✔ Container hoppscotch-backend          Recreated                                                                              0.0s 
Attaching to hoppscotch-backend
hoppscotch-backend  | 
hoppscotch-backend  | > hoppscotch-backend@2023.4.0 start:prod /usr/src/app
hoppscotch-backend  | > node dist/main
hoppscotch-backend  | 
hoppscotch-backend  | Running in production: true
hoppscotch-backend  | Port: 3000
hoppscotch-backend  | Database: postgresql://postgres:testpass@hoppscotch-db:5432/hoppscotch?connect_timeout=300
hoppscotch-backend  | [Nest] 19  - 04/19/2023, 1:39:10 PM     LOG [NestFactory] Starting Nest application...
hoppscotch-backend  | [Nest] 19  - 04/19/2023, 1:39:10 PM     LOG [InstanceLoader] PubSubModule dependencies initialized +78ms
hoppscotch-backend  | [Nest] 19  - 04/19/2023, 1:39:10 PM     LOG [InstanceLoader] PrismaModule dependencies initialized +1ms
hoppscotch-backend  | [Nest] 19  - 04/19/2023, 1:39:10 PM     LOG [InstanceLoader] MailerModule dependencies initialized +0ms
hoppscotch-backend  | [Nest] 19  - 04/19/2023, 1:39:10 PM     LOG [InstanceLoader] PassportModule dependencies initialized +1ms
hoppscotch-backend  | [Nest] 19  - 04/19/2023, 1:39:10 PM     LOG [InstanceLoader] ThrottlerModule dependencies initialized +1ms
hoppscotch-backend  | [Nest] 19  - 04/19/2023, 1:39:10 PM     LOG [InstanceLoader] JwtModule dependencies initialized +0ms
hoppscotch-backend  | [Nest] 19  - 04/19/2023, 1:39:10 PM     LOG [InstanceLoader] MailerCoreModule dependencies initialized +0ms
hoppscotch-backend  | [Nest] 19  - 04/19/2023, 1:39:10 PM     LOG [InstanceLoader] AppModule dependencies initialized +1ms
hoppscotch-backend  | [Nest] 19  - 04/19/2023, 1:39:10 PM     LOG [InstanceLoader] MailerModule dependencies initialized +3ms
hoppscotch-backend  | [Nest] 19  - 04/19/2023, 1:39:10 PM     LOG [InstanceLoader] UserModule dependencies initialized +5ms
hoppscotch-backend  | [Nest] 19  - 04/19/2023, 1:39:10 PM     LOG [InstanceLoader] UserSettingsModule dependencies initialized +1ms
hoppscotch-backend  | [Nest] 19  - 04/19/2023, 1:39:10 PM     LOG [InstanceLoader] UserEnvironmentsModule dependencies initialized +0ms
hoppscotch-backend  | [Nest] 19  - 04/19/2023, 1:39:10 PM     LOG [InstanceLoader] UserHistoryModule dependencies initialized +0ms
hoppscotch-backend  | [Nest] 19  - 04/19/2023, 1:39:10 PM     LOG [InstanceLoader] UserCollectionModule dependencies initialized +0ms
hoppscotch-backend  | [Nest] 19  - 04/19/2023, 1:39:10 PM     LOG [InstanceLoader] TeamEnvironmentsModule dependencies initialized +1ms
hoppscotch-backend  | [Nest] 19  - 04/19/2023, 1:39:10 PM     LOG [InstanceLoader] TeamCollectionModule dependencies initialized +0ms
hoppscotch-backend  | [Nest] 19  - 04/19/2023, 1:39:10 PM     LOG [InstanceLoader] GraphQLSchemaBuilderModule dependencies initialized +1ms
hoppscotch-backend  | [Nest] 19  - 04/19/2023, 1:39:10 PM     LOG [InstanceLoader] UserRequestModule dependencies initialized +1ms
hoppscotch-backend  | [Nest] 19  - 04/19/2023, 1:39:10 PM     LOG [InstanceLoader] TeamModule dependencies initialized +0ms
hoppscotch-backend  | [Nest] 19  - 04/19/2023, 1:39:10 PM     LOG [InstanceLoader] ShortcodeModule dependencies initialized +1ms
hoppscotch-backend  | [Nest] 19  - 04/19/2023, 1:39:10 PM     LOG [InstanceLoader] TeamInvitationModule dependencies initialized +1ms
hoppscotch-backend  | [Nest] 19  - 04/19/2023, 1:39:10 PM     LOG [InstanceLoader] TeamRequestModule dependencies initialized +0ms
hoppscotch-backend  | [Nest] 19  - 04/19/2023, 1:39:10 PM     LOG [InstanceLoader] AuthModule dependencies initialized +0ms
hoppscotch-backend  | [Nest] 19  - 04/19/2023, 1:39:10 PM     LOG [InstanceLoader] GraphQLModule dependencies initialized +1ms
hoppscotch-backend  | [Nest] 19  - 04/19/2023, 1:39:10 PM     LOG [InstanceLoader] AdminModule dependencies initialized +0ms
hoppscotch-backend  | Wed, 19 Apr 2023 13:39:10 GMT express-session deprecated undefined resave option; provide resave option at dist/main.js:15:13
hoppscotch-backend  | Wed, 19 Apr 2023 13:39:10 GMT express-session deprecated undefined saveUninitialized option; provide saveUninitialized option at dist/main.js:15:13
hoppscotch-backend  | Enabling CORS with production settings
hoppscotch-backend  | [Nest] 19  - 04/19/2023, 1:39:10 PM     LOG [RoutesResolver] AuthController {/auth} (version: 1): +8ms
hoppscotch-backend  | [Nest] 19  - 04/19/2023, 1:39:10 PM     LOG [RouterExplorer] Mapped {/auth/signin, POST} (version: 1) route +3ms
hoppscotch-backend  | [Nest] 19  - 04/19/2023, 1:39:10 PM     LOG [RouterExplorer] Mapped {/auth/verify, POST} (version: 1) route +1ms
hoppscotch-backend  | [Nest] 19  - 04/19/2023, 1:39:10 PM     LOG [RouterExplorer] Mapped {/auth/refresh, GET} (version: 1) route +1ms
hoppscotch-backend  | [Nest] 19  - 04/19/2023, 1:39:10 PM     LOG [RouterExplorer] Mapped {/auth/google, GET} (version: 1) route +1ms
hoppscotch-backend  | [Nest] 19  - 04/19/2023, 1:39:10 PM     LOG [RouterExplorer] Mapped {/auth/google/callback, GET} (version: 1) route +0ms
hoppscotch-backend  | [Nest] 19  - 04/19/2023, 1:39:10 PM     LOG [RouterExplorer] Mapped {/auth/github, GET} (version: 1) route +1ms
hoppscotch-backend  | [Nest] 19  - 04/19/2023, 1:39:10 PM     LOG [RouterExplorer] Mapped {/auth/github/callback, GET} (version: 1) route +1ms
hoppscotch-backend  | [Nest] 19  - 04/19/2023, 1:39:10 PM     LOG [RouterExplorer] Mapped {/auth/microsoft, GET} (version: 1) route +0ms
hoppscotch-backend  | [Nest] 19  - 04/19/2023, 1:39:10 PM     LOG [RouterExplorer] Mapped {/auth/microsoft/callback, GET} (version: 1) route +1ms
hoppscotch-backend  | [Nest] 19  - 04/19/2023, 1:39:10 PM     LOG [RouterExplorer] Mapped {/auth/logout, GET} (version: 1) route +0ms
hoppscotch-backend  | [Nest] 19  - 04/19/2023, 1:39:10 PM     LOG [RouterExplorer] Mapped {/auth/verify/admin, GET} (version: 1) route +1ms
hoppscotch-backend  | Initialize PubSub
hoppscotch-backend  | [Nest] 19  - 04/19/2023, 1:39:12 PM     LOG [GraphQLModule] Mapped {/graphql, POST} route +1636ms
hoppscotch-backend  | [Nest] 19  - 04/19/2023, 1:39:12 PM     LOG [NestApplication] Nest application successfully started +3ms

I still have 2 issues:

1: Now I still have can't login because I'm having issues with the login with email, I get "Network Error" red pop up alert at the bottom of the screen.

2: I've updated my .env file to use a local postgresql db but when I exec into the backend container and print the env vars, it's still using the default db from the container? Note: It's only the database_url that won't update, every other var updates correctly.

Container envs:

labuser@hoppscotch ~/hoppscotch $ docker exec -it bcb6ba8b5b63 bash
root@bcb6ba8b5b63:/usr/src/app# env
GOOGLE_SCOPE=email,profile
DATABASE_URL=postgresql://postgres:testpass@hoppscotch-db:5432/hoppscotch?connect_timeout=300
VITE_APP_PRIVACY_POLICY_LINK=https://docs.hoppscotch.io/privacy
HOSTNAME=bcb6ba8b5b63
REFRESH_TOKEN_VALIDITY=604800000
VITE_SHORTCODE_BASE_URL=http://localhost:3000
GITHUB_SCOPE=user:email
VITE_ADMIN_URL=http://localhost:3100
GOOGLE_CLIENT_ID=************************************************
YARN_VERSION=1.22.19
PWD=/usr/src/app
TOKEN_SALT_COMPLEXITY=10
MAGIC_LINK_TOKEN_VALIDITY=3
PORT=3000
VITE_BASE_URL=http://localhost:3000
GOOGLE_CLIENT_SECRET=************************************************
GOOGLE_CALLBACK_URL=http://localhost:3170/v1/auth/google/callback
VITE_BACKEND_API_URL=http://localhost:3170/v1
VITE_BACKEND_GQL_URL=http://localhost:3170/graphql
RATE_LIMIT_TTL=60
PRODUCTION=true
WHITELISTED_ORIGINS=http://localhost:3170,http://localhost:3000,http://localhost:3100
HOME=/root
MAILER_ADDRESS_FROM=labuser@email.com
VITE_BACKEND_WS_URL=wss://localhost:3170/graphql
ACCESS_TOKEN_VALIDITY=86400000
RATE_LIMIT_MAX=100
GITHUB_CALLBACK_URL=http://localhost:3170/v1/auth/github/callback
TERM=xterm
GITHUB_CLIENT_ID=redacted
VITE_APP_TOS_LINK=https://docs.hoppscotch.io/terms
SESSION_SECRET=add some secret here
GITHUB_CLIENT_SECRET=redacted
SHLVL=1
MAILER_SMTP_URL=smtp://host.docker.internal:1025
DB_URL=
MICROSOFT_CLIENT_ID=************************************************
MICROSOFT_SCOPE=user.read
APP_PORT=
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
MICROSOFT_CLIENT_SECRET=************************************************
JWT_SECRET=secret1233
REDIRECT_URL=http://localhost:3000
NODE_VERSION=18.8.0
MICROSOFT_CALLBACK_URL=http://localhost:3170/v1/auth/microsoft/callback

.env file contents:

labuser@hoppscotch ~/hoppscotch $ cat .env
#-----------------------Backend Config------------------------------#
# Prisma Config
DATABASE_URL=postgresql://labuser:pass@host.docker.internal:5433/hoppscotch

# Auth Tokens Config
JWT_SECRET="secret1233"
TOKEN_SALT_COMPLEXITY=10
MAGIC_LINK_TOKEN_VALIDITY= 3
REFRESH_TOKEN_VALIDITY="604800000" # Default validity is 7 days (604800000 ms) in ms
ACCESS_TOKEN_VALIDITY="86400000" # Default validity is 1 day (86400000 ms) in ms
SESSION_SECRET='add some secret here'

# Hoppscotch App Domain Config
REDIRECT_URL="http://localhost:3000"
WHITELISTED_ORIGINS = "http://localhost:3170,http://localhost:3000,http://localhost:3100"

# Google Auth Config
GOOGLE_CLIENT_ID="************************************************"
GOOGLE_CLIENT_SECRET="************************************************"
GOOGLE_CALLBACK_URL="http://localhost:3170/v1/auth/google/callback"
GOOGLE_SCOPE="email,profile"

# Github Auth Config
GITHUB_CLIENT_ID="redacted"
GITHUB_CLIENT_SECRET="redacted"
GITHUB_CALLBACK_URL="http://localhost:3170/v1/auth/github/callback"
GITHUB_SCOPE="user:email"

# Microsoft Auth Config
MICROSOFT_CLIENT_ID="************************************************"
MICROSOFT_CLIENT_SECRET="************************************************"
MICROSOFT_CALLBACK_URL="http://localhost:3170/v1/auth/microsoft/callback"
MICROSOFT_SCOPE="user.read"

# Mailer config
MAILER_SMTP_URL="smtp://host.docker.internal:1025"
MAILER_ADDRESS_FROM="labuser@email.com"

# Rate Limit Config
RATE_LIMIT_TTL=60 # In seconds
RATE_LIMIT_MAX=100 # Max requests per IP


#-----------------------Frontend Config------------------------------#


# Base URLs
VITE_BASE_URL=http://localhost:3000
VITE_SHORTCODE_BASE_URL=http://localhost:3000
VITE_ADMIN_URL=http://localhost:3100

# Backend URLs
VITE_BACKEND_GQL_URL=http://localhost:3170/graphql
VITE_BACKEND_WS_URL=wss://localhost:3170/graphql
VITE_BACKEND_API_URL=http://localhost:3170/v1

# Terms Of Service And Privacy Policy Links (Optional)
VITE_APP_TOS_LINK=https://docs.hoppscotch.io/terms
VITE_APP_PRIVACY_POLICY_LINK=https://docs.hoppscotch.io/privacy
<!-- gh-comment-id:1514810511 --> @hoppscotchScope commented on GitHub (Apr 19, 2023): UPDATE: docker-compose != docker compose lol I didn't realise there was such a difference between compose v1 and compose v2, so after I installed docker compose v2 this is my output: ``` labuser@hoppscotch ~/hoppscotch $ docker compose up hoppscotch-backend - [+] Running 1/0 ✔ Container hoppscotch-hoppscotch-db-1 Running 0.0s Attaching to hoppscotch-backend hoppscotch-backend exited with code 1 hoppscotch-backend | hoppscotch-backend | > hoppscotch-backend@2023.4.0 start:prod /usr/src/app hoppscotch-backend | > node dist/main hoppscotch-backend | hoppscotch-backend | Running in production: true hoppscotch-backend | Port: 3000 hoppscotch-backend | Database: postgresql://postgres:testpass@hoppscotch-db:5432/hoppscotch?connect_timeout=300 hoppscotch-backend | [Nest] 19 - 04/19/2023, 1:32:52 PM LOG [NestFactory] Starting Nest application... hoppscotch-backend | [Nest] 19 - 04/19/2023, 1:32:52 PM LOG [InstanceLoader] PubSubModule dependencies initialized +71ms hoppscotch-backend | [Nest] 19 - 04/19/2023, 1:32:52 PM LOG [InstanceLoader] PrismaModule dependencies initialized +1ms hoppscotch-backend | [Nest] 19 - 04/19/2023, 1:32:52 PM LOG [InstanceLoader] MailerModule dependencies initialized +0ms hoppscotch-backend | [Nest] 19 - 04/19/2023, 1:32:52 PM LOG [InstanceLoader] PassportModule dependencies initialized +0ms hoppscotch-backend | [Nest] 19 - 04/19/2023, 1:32:52 PM LOG [InstanceLoader] ThrottlerModule dependencies initialized +2ms hoppscotch-backend | [Nest] 19 - 04/19/2023, 1:32:52 PM LOG [InstanceLoader] JwtModule dependencies initialized +0ms hoppscotch-backend | [Nest] 19 - 04/19/2023, 1:32:52 PM LOG [InstanceLoader] MailerCoreModule dependencies initialized +0ms hoppscotch-backend | [Nest] 19 - 04/19/2023, 1:32:52 PM LOG [InstanceLoader] AppModule dependencies initialized +1ms hoppscotch-backend | [Nest] 19 - 04/19/2023, 1:32:52 PM LOG [InstanceLoader] MailerModule dependencies initialized +3ms hoppscotch-backend | [Nest] 19 - 04/19/2023, 1:32:52 PM ERROR [ExceptionHandler] Cannot read properties of undefined (reading 'split') hoppscotch-backend | TypeError: Cannot read properties of undefined (reading 'split') hoppscotch-backend | at new GoogleStrategy (/usr/src/app/dist/auth/strategies/google.strategy.js:26:45) hoppscotch-backend | at Injector.instantiateClass (/usr/src/app/node_modules/.pnpm/@nestjs+core@9.2.1_@nestjs+common@9.2.1_@nestjs+platform-express@9.2.1_reflect-metadata@0.1.13_rxjs@7.6.0/node_modules/@nestjs/core/injector/injector.js:340:19) hoppscotch-backend | at callback (/usr/src/app/node_modules/.pnpm/@nestjs+core@9.2.1_@nestjs+common@9.2.1_@nestjs+platform-express@9.2.1_reflect-metadata@0.1.13_rxjs@7.6.0/node_modules/@nestjs/core/injector/injector.js:53:45) hoppscotch-backend | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) hoppscotch-backend | at async Injector.resolveConstructorParams (/usr/src/app/node_modules/.pnpm/@nestjs+core@9.2.1_@nestjs+common@9.2.1_@nestjs+platform-express@9.2.1_reflect-metadata@0.1.13_rxjs@7.6.0/node_modules/@nestjs/core/injector/injector.js:132:24) hoppscotch-backend | at async Injector.loadInstance (/usr/src/app/node_modules/.pnpm/@nestjs+core@9.2.1_@nestjs+common@9.2.1_@nestjs+platform-express@9.2.1_reflect-metadata@0.1.13_rxjs@7.6.0/node_modules/@nestjs/core/injector/injector.js:57:13) hoppscotch-backend | at async Injector.loadProvider (/usr/src/app/node_modules/.pnpm/@nestjs+core@9.2.1_@nestjs+common@9.2.1_@nestjs+platform-express@9.2.1_reflect-metadata@0.1.13_rxjs@7.6.0/node_modules/@nestjs/core/injector/injector.js:84:9) hoppscotch-backend | at async Promise.all (index 6) hoppscotch-backend | at async InstanceLoader.createInstancesOfProviders (/usr/src/app/node_modules/.pnpm/@nestjs+core@9.2.1_@nestjs+common@9.2.1_@nestjs+platform-express@9.2.1_reflect-metadata@0.1.13_rxjs@7.6.0/node_modules/@nestjs/core/injector/instance-loader.js:47:9) hoppscotch-backend | at async /usr/src/app/node_modules/.pnpm/@nestjs+core@9.2.1_@nestjs+common@9.2.1_@nestjs+platform-express@9.2.1_reflect-metadata@0.1.13_rxjs@7.6.0/node_modules/@nestjs/core/injector/instance-loader.js:32:13 hoppscotch-backend |  ELIFECYCLE  Command failed with exit code 1. hoppscotch-backend exited with code 1 ``` So this is with my .env file the same as what I cited at the bug creation, it's failing to read a property that isn't there. So it seems that even if you have no intention of using Google or Microsoft Auth etc that you still need to leave the env var placeholders in the .env file otherwise it won't run. So I made a copy of the example env file, and put in my own env vars without removing anything else and the container runs correctly: ``` labuser@hoppscotch ~/hoppscotch $ docker compose up hoppscotch-backend [+] Running 2/0 ✔ Container hoppscotch-hoppscotch-db-1 Running 0.0s ✔ Container hoppscotch-backend Recreated 0.0s Attaching to hoppscotch-backend hoppscotch-backend | hoppscotch-backend | > hoppscotch-backend@2023.4.0 start:prod /usr/src/app hoppscotch-backend | > node dist/main hoppscotch-backend | hoppscotch-backend | Running in production: true hoppscotch-backend | Port: 3000 hoppscotch-backend | Database: postgresql://postgres:testpass@hoppscotch-db:5432/hoppscotch?connect_timeout=300 hoppscotch-backend | [Nest] 19 - 04/19/2023, 1:39:10 PM LOG [NestFactory] Starting Nest application... hoppscotch-backend | [Nest] 19 - 04/19/2023, 1:39:10 PM LOG [InstanceLoader] PubSubModule dependencies initialized +78ms hoppscotch-backend | [Nest] 19 - 04/19/2023, 1:39:10 PM LOG [InstanceLoader] PrismaModule dependencies initialized +1ms hoppscotch-backend | [Nest] 19 - 04/19/2023, 1:39:10 PM LOG [InstanceLoader] MailerModule dependencies initialized +0ms hoppscotch-backend | [Nest] 19 - 04/19/2023, 1:39:10 PM LOG [InstanceLoader] PassportModule dependencies initialized +1ms hoppscotch-backend | [Nest] 19 - 04/19/2023, 1:39:10 PM LOG [InstanceLoader] ThrottlerModule dependencies initialized +1ms hoppscotch-backend | [Nest] 19 - 04/19/2023, 1:39:10 PM LOG [InstanceLoader] JwtModule dependencies initialized +0ms hoppscotch-backend | [Nest] 19 - 04/19/2023, 1:39:10 PM LOG [InstanceLoader] MailerCoreModule dependencies initialized +0ms hoppscotch-backend | [Nest] 19 - 04/19/2023, 1:39:10 PM LOG [InstanceLoader] AppModule dependencies initialized +1ms hoppscotch-backend | [Nest] 19 - 04/19/2023, 1:39:10 PM LOG [InstanceLoader] MailerModule dependencies initialized +3ms hoppscotch-backend | [Nest] 19 - 04/19/2023, 1:39:10 PM LOG [InstanceLoader] UserModule dependencies initialized +5ms hoppscotch-backend | [Nest] 19 - 04/19/2023, 1:39:10 PM LOG [InstanceLoader] UserSettingsModule dependencies initialized +1ms hoppscotch-backend | [Nest] 19 - 04/19/2023, 1:39:10 PM LOG [InstanceLoader] UserEnvironmentsModule dependencies initialized +0ms hoppscotch-backend | [Nest] 19 - 04/19/2023, 1:39:10 PM LOG [InstanceLoader] UserHistoryModule dependencies initialized +0ms hoppscotch-backend | [Nest] 19 - 04/19/2023, 1:39:10 PM LOG [InstanceLoader] UserCollectionModule dependencies initialized +0ms hoppscotch-backend | [Nest] 19 - 04/19/2023, 1:39:10 PM LOG [InstanceLoader] TeamEnvironmentsModule dependencies initialized +1ms hoppscotch-backend | [Nest] 19 - 04/19/2023, 1:39:10 PM LOG [InstanceLoader] TeamCollectionModule dependencies initialized +0ms hoppscotch-backend | [Nest] 19 - 04/19/2023, 1:39:10 PM LOG [InstanceLoader] GraphQLSchemaBuilderModule dependencies initialized +1ms hoppscotch-backend | [Nest] 19 - 04/19/2023, 1:39:10 PM LOG [InstanceLoader] UserRequestModule dependencies initialized +1ms hoppscotch-backend | [Nest] 19 - 04/19/2023, 1:39:10 PM LOG [InstanceLoader] TeamModule dependencies initialized +0ms hoppscotch-backend | [Nest] 19 - 04/19/2023, 1:39:10 PM LOG [InstanceLoader] ShortcodeModule dependencies initialized +1ms hoppscotch-backend | [Nest] 19 - 04/19/2023, 1:39:10 PM LOG [InstanceLoader] TeamInvitationModule dependencies initialized +1ms hoppscotch-backend | [Nest] 19 - 04/19/2023, 1:39:10 PM LOG [InstanceLoader] TeamRequestModule dependencies initialized +0ms hoppscotch-backend | [Nest] 19 - 04/19/2023, 1:39:10 PM LOG [InstanceLoader] AuthModule dependencies initialized +0ms hoppscotch-backend | [Nest] 19 - 04/19/2023, 1:39:10 PM LOG [InstanceLoader] GraphQLModule dependencies initialized +1ms hoppscotch-backend | [Nest] 19 - 04/19/2023, 1:39:10 PM LOG [InstanceLoader] AdminModule dependencies initialized +0ms hoppscotch-backend | Wed, 19 Apr 2023 13:39:10 GMT express-session deprecated undefined resave option; provide resave option at dist/main.js:15:13 hoppscotch-backend | Wed, 19 Apr 2023 13:39:10 GMT express-session deprecated undefined saveUninitialized option; provide saveUninitialized option at dist/main.js:15:13 hoppscotch-backend | Enabling CORS with production settings hoppscotch-backend | [Nest] 19 - 04/19/2023, 1:39:10 PM LOG [RoutesResolver] AuthController {/auth} (version: 1): +8ms hoppscotch-backend | [Nest] 19 - 04/19/2023, 1:39:10 PM LOG [RouterExplorer] Mapped {/auth/signin, POST} (version: 1) route +3ms hoppscotch-backend | [Nest] 19 - 04/19/2023, 1:39:10 PM LOG [RouterExplorer] Mapped {/auth/verify, POST} (version: 1) route +1ms hoppscotch-backend | [Nest] 19 - 04/19/2023, 1:39:10 PM LOG [RouterExplorer] Mapped {/auth/refresh, GET} (version: 1) route +1ms hoppscotch-backend | [Nest] 19 - 04/19/2023, 1:39:10 PM LOG [RouterExplorer] Mapped {/auth/google, GET} (version: 1) route +1ms hoppscotch-backend | [Nest] 19 - 04/19/2023, 1:39:10 PM LOG [RouterExplorer] Mapped {/auth/google/callback, GET} (version: 1) route +0ms hoppscotch-backend | [Nest] 19 - 04/19/2023, 1:39:10 PM LOG [RouterExplorer] Mapped {/auth/github, GET} (version: 1) route +1ms hoppscotch-backend | [Nest] 19 - 04/19/2023, 1:39:10 PM LOG [RouterExplorer] Mapped {/auth/github/callback, GET} (version: 1) route +1ms hoppscotch-backend | [Nest] 19 - 04/19/2023, 1:39:10 PM LOG [RouterExplorer] Mapped {/auth/microsoft, GET} (version: 1) route +0ms hoppscotch-backend | [Nest] 19 - 04/19/2023, 1:39:10 PM LOG [RouterExplorer] Mapped {/auth/microsoft/callback, GET} (version: 1) route +1ms hoppscotch-backend | [Nest] 19 - 04/19/2023, 1:39:10 PM LOG [RouterExplorer] Mapped {/auth/logout, GET} (version: 1) route +0ms hoppscotch-backend | [Nest] 19 - 04/19/2023, 1:39:10 PM LOG [RouterExplorer] Mapped {/auth/verify/admin, GET} (version: 1) route +1ms hoppscotch-backend | Initialize PubSub hoppscotch-backend | [Nest] 19 - 04/19/2023, 1:39:12 PM LOG [GraphQLModule] Mapped {/graphql, POST} route +1636ms hoppscotch-backend | [Nest] 19 - 04/19/2023, 1:39:12 PM LOG [NestApplication] Nest application successfully started +3ms ``` I still have 2 issues: 1: Now I still have can't login because I'm having issues with the login with email, I get "Network Error" red pop up alert at the bottom of the screen. 2: I've updated my .env file to use a local postgresql db but when I exec into the backend container and print the env vars, it's still using the default db from the container? Note: It's only the database_url that won't update, every other var updates correctly. Container envs: ``` labuser@hoppscotch ~/hoppscotch $ docker exec -it bcb6ba8b5b63 bash root@bcb6ba8b5b63:/usr/src/app# env GOOGLE_SCOPE=email,profile DATABASE_URL=postgresql://postgres:testpass@hoppscotch-db:5432/hoppscotch?connect_timeout=300 VITE_APP_PRIVACY_POLICY_LINK=https://docs.hoppscotch.io/privacy HOSTNAME=bcb6ba8b5b63 REFRESH_TOKEN_VALIDITY=604800000 VITE_SHORTCODE_BASE_URL=http://localhost:3000 GITHUB_SCOPE=user:email VITE_ADMIN_URL=http://localhost:3100 GOOGLE_CLIENT_ID=************************************************ YARN_VERSION=1.22.19 PWD=/usr/src/app TOKEN_SALT_COMPLEXITY=10 MAGIC_LINK_TOKEN_VALIDITY=3 PORT=3000 VITE_BASE_URL=http://localhost:3000 GOOGLE_CLIENT_SECRET=************************************************ GOOGLE_CALLBACK_URL=http://localhost:3170/v1/auth/google/callback VITE_BACKEND_API_URL=http://localhost:3170/v1 VITE_BACKEND_GQL_URL=http://localhost:3170/graphql RATE_LIMIT_TTL=60 PRODUCTION=true WHITELISTED_ORIGINS=http://localhost:3170,http://localhost:3000,http://localhost:3100 HOME=/root MAILER_ADDRESS_FROM=labuser@email.com VITE_BACKEND_WS_URL=wss://localhost:3170/graphql ACCESS_TOKEN_VALIDITY=86400000 RATE_LIMIT_MAX=100 GITHUB_CALLBACK_URL=http://localhost:3170/v1/auth/github/callback TERM=xterm GITHUB_CLIENT_ID=redacted VITE_APP_TOS_LINK=https://docs.hoppscotch.io/terms SESSION_SECRET=add some secret here GITHUB_CLIENT_SECRET=redacted SHLVL=1 MAILER_SMTP_URL=smtp://host.docker.internal:1025 DB_URL= MICROSOFT_CLIENT_ID=************************************************ MICROSOFT_SCOPE=user.read APP_PORT= PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin MICROSOFT_CLIENT_SECRET=************************************************ JWT_SECRET=secret1233 REDIRECT_URL=http://localhost:3000 NODE_VERSION=18.8.0 MICROSOFT_CALLBACK_URL=http://localhost:3170/v1/auth/microsoft/callback ``` .env file contents: ``` labuser@hoppscotch ~/hoppscotch $ cat .env #-----------------------Backend Config------------------------------# # Prisma Config DATABASE_URL=postgresql://labuser:pass@host.docker.internal:5433/hoppscotch # Auth Tokens Config JWT_SECRET="secret1233" TOKEN_SALT_COMPLEXITY=10 MAGIC_LINK_TOKEN_VALIDITY= 3 REFRESH_TOKEN_VALIDITY="604800000" # Default validity is 7 days (604800000 ms) in ms ACCESS_TOKEN_VALIDITY="86400000" # Default validity is 1 day (86400000 ms) in ms SESSION_SECRET='add some secret here' # Hoppscotch App Domain Config REDIRECT_URL="http://localhost:3000" WHITELISTED_ORIGINS = "http://localhost:3170,http://localhost:3000,http://localhost:3100" # Google Auth Config GOOGLE_CLIENT_ID="************************************************" GOOGLE_CLIENT_SECRET="************************************************" GOOGLE_CALLBACK_URL="http://localhost:3170/v1/auth/google/callback" GOOGLE_SCOPE="email,profile" # Github Auth Config GITHUB_CLIENT_ID="redacted" GITHUB_CLIENT_SECRET="redacted" GITHUB_CALLBACK_URL="http://localhost:3170/v1/auth/github/callback" GITHUB_SCOPE="user:email" # Microsoft Auth Config MICROSOFT_CLIENT_ID="************************************************" MICROSOFT_CLIENT_SECRET="************************************************" MICROSOFT_CALLBACK_URL="http://localhost:3170/v1/auth/microsoft/callback" MICROSOFT_SCOPE="user.read" # Mailer config MAILER_SMTP_URL="smtp://host.docker.internal:1025" MAILER_ADDRESS_FROM="labuser@email.com" # Rate Limit Config RATE_LIMIT_TTL=60 # In seconds RATE_LIMIT_MAX=100 # Max requests per IP #-----------------------Frontend Config------------------------------# # Base URLs VITE_BASE_URL=http://localhost:3000 VITE_SHORTCODE_BASE_URL=http://localhost:3000 VITE_ADMIN_URL=http://localhost:3100 # Backend URLs VITE_BACKEND_GQL_URL=http://localhost:3170/graphql VITE_BACKEND_WS_URL=wss://localhost:3170/graphql VITE_BACKEND_API_URL=http://localhost:3170/v1 # Terms Of Service And Privacy Policy Links (Optional) VITE_APP_TOS_LINK=https://docs.hoppscotch.io/terms VITE_APP_PRIVACY_POLICY_LINK=https://docs.hoppscotch.io/privacy ```
Author
Owner

@balub commented on GitHub (Apr 19, 2023):

@hoppscotchScope glad to hear issues with a mailer has been solved, regarding the 2nd issue have you tried rebuilding the containers from scratch using the --no-cache flag (command will be docker compose build --no-cache ) and trying again?

<!-- gh-comment-id:1514970054 --> @balub commented on GitHub (Apr 19, 2023): @hoppscotchScope glad to hear issues with a mailer has been solved, regarding the 2nd issue have you tried rebuilding the containers from scratch using the `--no-cache` flag (command will be `docker compose build --no-cache` ) and trying again?
Author
Owner

@torrswanson commented on GitHub (Apr 19, 2023):

I highly suggest creating a new thread for new issues.

1: Now I still have can't login because I'm having issues with the login with email, I get "Network Error" red pop up alert at the bottom of the screen.

What's the output of your browser console and network tracing when clicking "Login"?

I'm having a similar issue with CORS rejecting http://localhost:3170/v1/auth/signin and initially on load im getting http://localhost:3170/graphql being rejected

Created a new issue here: https://github.com/hoppscotch/hoppscotch/issues/3009

<!-- gh-comment-id:1515305271 --> @torrswanson commented on GitHub (Apr 19, 2023): I highly suggest creating a new thread for new issues. > 1: Now I still have can't login because I'm having issues with the login with email, I get "Network Error" red pop up alert at the bottom of the screen. What's the output of your browser console and network tracing when clicking "Login"? I'm having a similar issue with CORS rejecting http://localhost:3170/v1/auth/signin and initially on load im getting http://localhost:3170/graphql being rejected Created a new issue here: https://github.com/hoppscotch/hoppscotch/issues/3009
Author
Owner

@balub commented on GitHub (Apr 20, 2023):

@hoppscotchScope regarding your database url not changing can you change the database url env explicitly stated in the docker compose file and try rebuilding again.

<!-- gh-comment-id:1515993146 --> @balub commented on GitHub (Apr 20, 2023): @hoppscotchScope regarding your database url not changing can you change the database url env explicitly stated in the docker compose file and try rebuilding again.
Author
Owner

@AndrewBastin commented on GitHub (Sep 6, 2023):

Closing issue due to inactivity.

Please do reopen if the issue still persists in 2023.8.0

<!-- gh-comment-id:1708636208 --> @AndrewBastin commented on GitHub (Sep 6, 2023): Closing issue due to inactivity. Please do reopen if the issue still persists in 2023.8.0
Author
Owner

@restmad commented on GitHub (Dec 2, 2023):

how to resolve this dependency

<!-- gh-comment-id:1837061617 --> @restmad commented on GitHub (Dec 2, 2023): how to resolve this dependency
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#970
No description provided.