Giter Club home page Giter Club logo

Comments (8)

mirarifhasan avatar mirarifhasan commented on May 23, 2024 1

Hi @mtariqsajid
Thanks for reaching out! I took a look at your docker-compose.yaml file, specifically the hoppscotch-backend service.

I noticed that the command: pnpx prisma migrate deploy causes the backend application to run database migrations instead of starting the application itself.

So, I suggest you not to add command in the service. Let's hoppscotch-backend run its way. In terms of database migration, you can follow the following way,

docker compose run --entrypoint sh hoppscotch-backend
pnpx prisma migrate deploy

Ref: https://docs.hoppscotch.io/documentation/self-host/community-edition/install-and-build#running-migrations

from hoppscotch.

liyasthomas avatar liyasthomas commented on May 23, 2024

cc: @balub

from hoppscotch.

mtariqsajid avatar mtariqsajid commented on May 23, 2024

Hi @mtariqsajid Thanks for reaching out! I took a look at your docker-compose.yaml file, specifically the hoppscotch-backend service.

I noticed that the command: pnpx prisma migrate deploy causes the backend application to run database migrations instead of starting the application itself.

So, I suggest you not to add command in the service. Let's hoppscotch-backend run its way. In terms of database migration, you can follow the following way,

docker compose run --entrypoint sh hoppscotch-backend
pnpx prisma migrate deploy

Ref: https://docs.hoppscotch.io/documentation/self-host/community-edition/install-and-build#running-migrations

still not working also i don't what is the issue how to enable verbose logs

hoppscotch-backend-1   | Backend Server | [Nest] 41  - 04/22/2024, 8:15:45 AM     LOG [InstanceLoader] ConfigModule dependencies initialized +46ms
hoppscotch-backend-1   | Backend Server | [Nest] 41  - 04/22/2024, 8:15:45 AM     LOG [InstanceLoader] PosthogModule dependencies initialized +1ms
hoppscotch-backend-1   | Backend Server | [Nest] 41  - 04/22/2024, 8:15:45 AM     LOG [InstanceLoader] InfraConfigModule dependencies initialized +3ms
hoppscotch-backend-1   | Backend Server | [Nest] 41  - 04/22/2024, 8:15:45 AM     LOG [InstanceLoader] TeamInvitationModule dependencies initialized +0ms
hoppscotch-backend-1   | Backend Server | [Nest] 41  - 04/22/2024, 8:15:45 AM     LOG [InstanceLoader] AdminModule dependencies initialized +0ms
hoppscotch-backend-1   | Backend Server | [Nest] 41  - 04/22/2024, 8:15:45 AM     LOG [InstanceLoader] AuthModule dependencies initialized +0ms
hoppscotch-backend-1   | Backend Server | Running in production:  true
hoppscotch-backend-1   | Backend Server | Port: 8080
hoppscotch-backend-1   | Backend Server | Mon, 22 Apr 2024 08:15:45 GMT express-session deprecated undefined resave option; provide resave option at dist/main.js:19:13
hoppscotch-backend-1   | Backend Server | Mon, 22 Apr 2024 08:15:45 GMT express-session deprecated undefined saveUninitialized option; provide saveUninitialized option at dist/main.js:19:13
hoppscotch-backend-1   | Backend Server | Enabling CORS with production settings
hoppscotch-backend-1   | Backend Server | [Nest] 41  - 04/22/2024, 8:15:45 AM     LOG [RoutesResolver] AppController {/ping}: +73ms
hoppscotch-backend-1   | Backend Server | [Nest] 41  - 04/22/2024, 8:15:45 AM     LOG [RouterExplorer] Mapped {/ping, GET} route +2ms
hoppscotch-backend-1   | Backend Server | [Nest] 41  - 04/22/2024, 8:15:45 AM     LOG [RoutesResolver] AuthController {/auth} (version: 1): +0ms
hoppscotch-backend-1   | Backend Server | [Nest] 41  - 04/22/2024, 8:15:45 AM     LOG [RouterExplorer] Mapped {/auth/providers, GET} (version: 1) route +1ms
hoppscotch-backend-1   | Backend Server | [Nest] 41  - 04/22/2024, 8:15:45 AM     LOG [RouterExplorer] Mapped {/auth/signin, POST} (version: 1) route +1ms
hoppscotch-backend-1   | Backend Server | [Nest] 41  - 04/22/2024, 8:15:45 AM     LOG [RouterExplorer] Mapped {/auth/verify, POST} (version: 1) route +1ms
hoppscotch-backend-1   | Backend Server | [Nest] 41  - 04/22/2024, 8:15:45 AM     LOG [RouterExplorer] Mapped {/auth/refresh, GET} (version: 1) route +0ms
hoppscotch-backend-1   | Backend Server | [Nest] 41  - 04/22/2024, 8:15:45 AM     LOG [RouterExplorer] Mapped {/auth/google, GET} (version: 1) route +1ms
hoppscotch-backend-1   | Backend Server | [Nest] 41  - 04/22/2024, 8:15:45 AM     LOG [RouterExplorer] Mapped {/auth/google/callback, GET} (version: 1) route +1ms
hoppscotch-backend-1   | Backend Server | [Nest] 41  - 04/22/2024, 8:15:45 AM     LOG [RouterExplorer] Mapped {/auth/github, GET} (version: 1) route +0ms
hoppscotch-backend-1   | Backend Server | [Nest] 41  - 04/22/2024, 8:15:45 AM     LOG [RouterExplorer] Mapped {/auth/github/callback, GET} (version: 1) route +1ms
hoppscotch-backend-1   | Backend Server | [Nest] 41  - 04/22/2024, 8:15:45 AM     LOG [RouterExplorer] Mapped {/auth/microsoft, GET} (version: 1) route +0ms
hoppscotch-backend-1   | Backend Server | [Nest] 41  - 04/22/2024, 8:15:45 AM     LOG [RouterExplorer] Mapped {/auth/microsoft/callback, GET} (version: 1) route +1ms
hoppscotch-backend-1   | Backend Server | [Nest] 41  - 04/22/2024, 8:15:45 AM     LOG [RouterExplorer] Mapped {/auth/logout, GET} (version: 1) route +0ms
hoppscotch-backend-1   | Backend Server | [Nest] 41  - 04/22/2024, 8:15:45 AM     LOG [RouterExplorer] Mapped {/auth/verify/admin, GET} (version: 1) route +1ms
hoppscotch-backend-1   | Backend Server | [Nest] 41  - 04/22/2024, 8:15:45 AM     LOG [RoutesResolver] SiteController {/site} (version: 1): +0ms
hoppscotch-backend-1   | Backend Server | [Nest] 41  - 04/22/2024, 8:15:45 AM     LOG [RouterExplorer] Mapped {/site/setup, GET} (version: 1) route +1ms
hoppscotch-backend-1   | Backend Server | [Nest] 41  - 04/22/2024, 8:15:45 AM     LOG [RouterExplorer] Mapped {/site/setup, PUT} (version: 1) route +0ms
hoppscotch-backend-1   | Backend Server | [Nest] 41  - 04/22/2024, 8:15:45 AM     LOG [RoutesResolver] TeamCollectionController {/team-collection} (version: 1): +0ms
hoppscotch-backend-1   | Backend Server | [Nest] 41  - 04/22/2024, 8:15:45 AM     LOG [RouterExplorer] Mapped {/team-collection/search/:teamID, GET} (version: 1) route +1ms
hoppscotch-backend-1   | Backend Server | Initialize PubSub
hoppscotch-backend-1   | Backend Server | Stopping app in 5 seconds...
hoppscotch-backend-1   | Backend Server | [Nest] 41  - 04/22/2024, 8:15:45 AM     LOG [GraphQLModule] Mapped {/graphql, POST} route +451ms
hoppscotch-backend-1   | Backend Server | [Nest] 41  - 04/22/2024, 8:15:45 AM     LOG [NestApplication] Nest application successfully started +9ms
hoppscotch-backend-1   | Backend Server | Stopping app now...
hoppscotch-backend-1   | Backend Server | SIGTERM signal received
hoppscotch-backend-1   | Exiting process because Backend Server exited with code 0
hoppscotch-backend-1 exited with code 0

from hoppscotch.

mirarifhasan avatar mirarifhasan commented on May 23, 2024

@mtariqsajid, Add restart: always in your hoppscotch-backend service. It will resolve the issue.

from hoppscotch.

mtariqsajid avatar mtariqsajid commented on May 23, 2024

@mtariqsajid, Add restart: always in your hoppscotch-backend service. It will resolve the issue.

i am not able to login in admin i try mailtrap its not working
can you help me ?
also google login not working
VITE_ALLOWED_AUTH_PROVIDERS=GOOGLE,EMAIL
even though google is specify but on login screen it still show email

email env

MAILER_SMTP_URL="smtp://b00bdd74:[email protected]"
image

hoppscotch-backend-1   | Backend Server | [Nest] 40  - 04/22/2024, 3:12:38 PM     LOG [RouterExplorer] Mapped {/site/setup, PUT} (version: 1) route +0ms
hoppscotch-backend-1   | Backend Server | [Nest] 40  - 04/22/2024, 3:12:38 PM     LOG [RoutesResolver] TeamCollectionController {/team-collection} (version: 1): +0ms
hoppscotch-backend-1   | Backend Server | [Nest] 40  - 04/22/2024, 3:12:38 PM     LOG [RouterExplorer] Mapped {/team-collection/search/:teamID, GET} (version: 1) route +1ms
hoppscotch-backend-1   | Backend Server | Initialize PubSub
hoppscotch-backend-1   | Backend Server | [Nest] 40  - 04/22/2024, 3:12:38 PM     LOG [GraphQLModule] Mapped {/graphql, POST} route +389ms
hoppscotch-backend-1   | Backend Server | [Nest] 40  - 04/22/2024, 3:12:38 PM     LOG [NestApplication] Nest application successfully started +7ms
hoppscotch-backend-1   | Backend Server | Query Complexity: 7
hoppscotch-backend-1   | Backend Server | Query Complexity: 7
hoppscotch-backend-1   | Backend Server | [Nest] 40  - 04/22/2024, 3:12:57 PM   ERROR [ExceptionsHandler] email/failed
hoppscotch-backend-1   | Backend Server | Error: email/failed
hoppscotch-backend-1   | Backend Server |     at throwErr (/usr/src/app/packages/hoppscotch-backend/dist/utils.js:15:11)
hoppscotch-backend-1   | Backend Server |     at MailerService.sendEmail (/usr/src/app/packages/hoppscotch-backend/dist/mailer/mailer.service.js:39:41)
hoppscotch-backend-1   | Backend Server |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
hoppscotch-backend-1   | Backend Server |     at async AuthService.signInMagicLink (/usr/src/app/packages/hoppscotch-backend/dist/auth/auth.service.js:159:9)
hoppscotch-backend-1   | Backend Server |     at async AuthController.signInMagicLink (/usr/src/app/packages/hoppscotch-backend/dist/auth/auth.controller.js:47:31)
hoppscotch-backend-1   | Backend Server |     at async /usr/src/app/node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/@nestjs/core/router/router-execution-context.js:46:28
hoppscotch-backend-1   | Backend Server |     at async /usr/src/app/node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/@nestjs/core/router/router-proxy.js:9:17

from hoppscotch.

mtariqsajid avatar mtariqsajid commented on May 23, 2024

@mirarifhasan can you help please ?

from hoppscotch.

mirarifhasan avatar mirarifhasan commented on May 23, 2024

Sure @mtariqsajid

Regarding Email Error
There is a known issue (#3949) with the email-module. We are trying to resolve that as soon as possible. Until it gets resolved, you may continue logging in by enabling other SSO.

Regarding Google SSO
You have to hard reset the configuration. Execute the following cmd inside your Database container:

docker exec -it <db_container_id> psql -d hoppscotch -c "TRUNCATE \"InfraConfig\";"
# Ref: https://docs.hoppscotch.io/documentation/self-host/community-edition/admin-dashboard#hard-reset-configurations

After that run the hoppscotch-backend with .env (containing Google SSO configs).

After successfully login to the Admin dashboard, you can enable more SSO providers and change other configs.

from hoppscotch.

mtariqsajid avatar mtariqsajid commented on May 23, 2024

Sure @mtariqsajid

Regarding Email Error There is a known issue (#3949) with the email-module. We are trying to resolve that as soon as possible. Until it gets resolved, you may continue logging in by enabling other SSO.

Regarding Google SSO You have to hard reset the configuration. Execute the following cmd inside your Database container:

docker exec -it <db_container_id> psql -d hoppscotch -c "TRUNCATE \"InfraConfig\";"
# Ref: https://docs.hoppscotch.io/documentation/self-host/community-edition/admin-dashboard#hard-reset-configurations

After that run the hoppscotch-backend with .env (containing Google SSO configs).

After successfully login to the Admin dashboard, you can enable more SSO providers and change other configs.

Google SSO work thank you
I just remove the db and re-run the migration

from hoppscotch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.