typebot.io icon indicating copy to clipboard operation
typebot.io copied to clipboard

problem with typebot: check server logs to see relevant error message.

Open miscIick opened this issue 1 year ago • 6 comments

I've tried reinstalling several times to fix the code but it doesn't work, I even managed to get to the part to send an email but the email isn't sent, could you help me with this? Error: check server logs to see relevant error message. I will leave the error images and the code I am using docker-compose.txt Captura de tela 2024-08-04 170942 Captura de tela 2024-08-04 172337 Captura de tela 2024-08-05 225214

miscIick avatar Aug 06 '24 07:08 miscIick

Can you provide the server logs? There should be a clear error there.

If you are self-hosting it with docker. Type this command in your terminal:

docker-compose logs

Paste all the logs here so that we can help you properly!

baptisteArno avatar Aug 12 '24 13:08 baptisteArno

Você pode fornecer os logs do servidor? Deve haver um erro claro aí.

Se você estiver hospedando-o com o docker. Digite este comando no seu terminal:

docker-compose logs

Cole todos os logs aqui para que possamos ajudá-lo adequadamente!

estou com mesmo problema, onde rodo esse comando tenho o type instalado no portainer

paulozzy9 avatar Aug 12 '24 17:08 paulozzy9

Eu verifiquei os logs, pelo que vi a conexão foi rejeitada pelo servidor de e-mail e não foi possivel o envio do email de confirmação de conta. Troque seu servidor smtp. No caso abaixo utilizei o servidor do google.

typebot-builder-1 | name: 'Error' typebot-builder-1 | }, typebot-builder-1 | providerId: 'email', typebot-builder-1 | message: 'Magic link email could not be sent. See error above.' typebot-builder-1 | } typebot-builder-1 | Error: connect ECONNREFUSED 172.217.192.108:25
typebot-builder-1 | at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1606:16) { typebot-builder-1 | errno: -111, typebot-builder-1 | code: 'ESOCKET', typebot-builder-1 | syscall: 'connect', typebot-builder-1 | address: '172.217.192.108', typebot-builder-1 | port: 25, typebot-builder-1 | command: 'CONN' typebot-builder-1 | } typebot-builder-1 | [next-auth][error][SIGNIN_EMAIL_ERROR] typebot-builder-1 | https://next-auth.js.org/errors#signin_email_error Magic link email could not be sent. See error above. { typebot-builder-1 | error: { typebot-builder-1 | message: 'Magic link email could not be sent. See error above.',

Eu resolvi utilizando o smtp gmail, gerando um password de app no google e colocando no .env do typebot SMTP_PASSWORD

dionepereira avatar Aug 28 '24 00:08 dionepereira

Hello Batista, I'm hosting it on the Docker App, follow the image image image

PS C:\Users\walla\Desktop\docker-compose (1)> docker-compose logs time="2024-08-28T19:05:18-03:00" level=warning msg="C:\Users\walla\Desktop\docker-compose (1)\docker-compose.yml: version is obsolete" typebot-viewer-1 | - event [next-runtime-env] read environment variables prefixed with 'NEXT_PUBLIC_' from process.env. typebot-viewer-1 | - ready [next-runtime-env] wrote browser runtime environment variables to '/app/apps/viewer/public/_ENV.js'. typebot-viewer-1 | â–² Next.js 14.1.0 typebot-viewer-1 | - Local: http://localhost:3000 typebot-viewer-1 | - Network: http://0.0.0.0:3000 typebot-viewer-1 | typebot-viewer-1 | ✓ Ready in 77ms typebot-builder-1 | - event [next-runtime-env] read environment variables prefixed with 'NEXT_PUBLIC' from process.env. typebot-builder-1 | - ready [next-runtime-env] wrote browser runtime environment variables to '/app/apps/builder/public/ENV.js'. typebot-db-1 | typebot-builder-1 | Waiting for 15s for database to be ready... typebot-builder-1 | Prisma schema loaded from packages/prisma/postgresql/schema.prisma typebot-builder-1 | Datasource "db": PostgreSQL database "typebot", schema "public" at "typebot-db:5432" typebot-builder-1 | typebot-builder-1 | 68 migrations found in prisma/migrations typebot-builder-1 | typebot-builder-1 | typebot-builder-1 | No pending migrations to apply. typebot-builder-1 | â–² Next.js 14.1.0 typebot-builder-1 | - Local: http://localhost:3000 typebot-builder-1 | - Network: http://0.0.0.0:3000 typebot-builder-1 | typebot-builder-1 | ✓ Ready in 867ms typebot-builder-1 | prisma:info Starting a postgresql pool with 17 connections. typebot-builder-1 | Error: self-signed certificate in certificate chain typebot-builder-1 | at TLSSocket.onConnectSecure (node:tls_wrap:1674:34) typebot-builder-1 | at TLSSocket.emit (node:events:519:28) typebot-builder-1 | at TLSSocket.emit (node:domain:488:12) typebot-builder-1 | at TLSSocket.finishInit (node:tls_wrap:1085:8) typebot-builder-1 | at ssl.onhandshakedone (node:tls_wrap:871:12) { typebot-builder-1 | code: 'ESOCKET', minio-1 | MinIO Object Storage Server minio-1 | Copyright: 2015-2024 MinIO, Inc. minio-1 | License: GNU AGPLv3 - https://www.gnu.org/licenses/agpl-3.0.html minio-1 | Version: RELEASE.2024-08-03T04-33-23Z (go1.22.5 linux/amd64) minio-1 | minio-1 | API: http://172.19.0.2:9000 http://127.0.0.1:9000 minio-1 | WebUI: http://172.19.0.2:39219 http://127.0.0.1:39219 minio-1 | minio-1 | Docs: https://min.io/docs/minio/linux/index.html minio-1 | INFO: minio-1 | You are running an older version of MinIO released 3 weeks before the latest release minio-1 | Update: Run mc admin update ALIAS minio-1 | minio-1 | typebot-db-1 | PostgreSQL Database directory appears to contain a database; Skipping initialization typebot-db-1 | typebot-db-1 | 2024-08-28 22:03:31.174 UTC [1] LOG: starting PostgreSQL 13.15 (Debian 13.15-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit typebot-builder-1 | command: 'CONN' typebot-builder-1 | } typebot-builder-1 | [next-auth][error][SIGNIN_EMAIL_ERROR] typebot-builder-1 | https://next-auth.js.org/errors#signin_email_error Magic link email could not be sent. See error above. { typebot-builder-1 | error: { typebot-builder-1 | message: 'Magic link email could not be sent. See error above.', typebot-builder-1 | stack: 'Error: Magic link email could not be sent. See error above.\n' + typebot-builder-1 | ' at Object.s [as sendVerificationRequest] (/app/apps/builder/.next/server/chunks/5043.js:1:4002)\n' + typebot-builder-1 | ' at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n' + mail-1 | 1 LOG: MAIN mail-1 | 1 exim 4.89 daemon started: pid=1, -q30m, listening for SMTP on port 25 (IPv6 and IPv4) typebot-builder-1 | ' at async Promise.all (index 0)\n' + typebot-builder-1 | ' at async email (/app/node_modules/.pnpm/[email protected][email protected]@[email protected][email protected][email protected][email protected]___am5p4555usmjvg5xfootnx4hbe/node_modules/next-auth/core/lib/email/signin.js:31:3)\n' + typebot-builder-1 | ' at async Object.signin (/app/node_modules/.pnpm/[email protected][email protected]@[email protected][email protected][email protected][email protected]___am5p4555usmjvg5xfootnx4hbe/node_modules/next-auth/core/routes/signin.js:115:24)\n' + typebot-builder-1 | ' at async AuthHandler (/app/node_modules/.pnpm/[email protected][email protected]@[email protected][email protected][email protected][email protected]___am5p4555usmjvg5xfootnx4hbe/node_modules/next-auth/core/index.js:260:26)\n' + typebot-builder-1 | ' at async NextAuthApiHandler (/app/node_modules/.pnpm/[email protected][email protected]@[email protected][email protected][email protected][email protected]___am5p4555usmjvg5xfootnx4hbe/node_modules/next-auth/next/index.js:22:19)\n' + typebot-builder-1 | ' at async z (/app/apps/builder/.next/server/chunks/5043.js:1:8413)\n' + typebot-db-1 | 2024-08-28 22:03:31.191 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432 typebot-db-1 | 2024-08-28 22:03:31.191 UTC [1] LOG: listening on IPv6 address "::", port 5432 typebot-db-1 | 2024-08-28 22:03:31.196 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" typebot-db-1 | 2024-08-28 22:03:31.288 UTC [27] LOG: database system was shut down at 2024-08-28 21:53:21 UTC typebot-db-1 | 2024-08-28 22:03:31.317 UTC [1] LOG: database system is ready to accept connections typebot-db-1 | 2024-08-28 22:03:46.933 UTC [34] LOG: could not receive data from client: Connection reset by peer typebot-builder-1 | ' at async K (/app/node_modules/.pnpm/[email protected]@[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js:20:16545)\n' + typebot-builder-1 | ' at async U.render (/app/node_modules/.pnpm/[email protected]@[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js:20:16981)', typebot-builder-1 | name: 'Error' typebot-builder-1 | }, typebot-builder-1 | providerId: 'email', typebot-builder-1 | message: 'Magic link email could not be sent. See error above.' typebot-builder-1 | } createbuckets-1 | Added minio successfully. createbuckets-1 | mc: <ERROR> Unable to make bucket minio/typebot. Your previous request to create the named bucket succeeded and you already own it. createbuckets-1 | Access permission for minio/typebot/public is set to public PS C:\Users\walla\Desktop\docker-compose (1)>

miscIick avatar Aug 28 '24 22:08 miscIick

version: '3.3' services: typebot-db: image: postgres:13 restart: always volumes: - db_data:/var/lib/postgresql/data environment: - POSTGRES_DB=typebot - POSTGRES_PASSWORD=typebot

typebot-builder: ports: - 3001:3000 image: baptistearno/typebot-builder:latest restart: always depends_on: - typebot-db environment: - DATABASE_URL=postgresql://postgres:typebot@typebot-db:5432/typebot - NEXTAUTH_URL=http://192.168.18.2:3001 - NEXT_PUBLIC_VIEWER_URL=http://192.168.18.2:3002 - ENCRYPTION_SECRET=ayOGPLh6HcfBKg1dhRpNkJuVRD8v7kmm - [email protected] - SMTP_HOST=smtp.gmail.com - [email protected] - SMTP_PASSWORD=zzvqkakfrawhmawg - SMTP_AUTH_DISABLED=false - SMTP_PORT=465 - SMTP_SECURE=true - [email protected] - S3_ACCESS_KEY=minio - S3_SECRET_KEY=minio123 - S3_BUCKET=typebot - S3_ENDPOINT=storage.192.168.18.2

typebot-viewer: ports: - 3002:3000 image: baptistearno/typebot-viewer:latest restart: always environment: - DATABASE_URL=postgresql://postgres:typebot@typebot-db:5432/typebot - NEXT_PUBLIC_VIEWER_URL=http://192.168.18.2:3002 - NEXTAUTH_URL=http://192.168.18.2:3001 - ENCRYPTION_SECRET=ayOGPLh6HcfBKg1dhRpNkJuVRD8v7kmm - S3_ACCESS_KEY=minio - S3_SECRET_KEY=minio123 - S3_BUCKET=typebot - S3_ENDPOINT=192.168.18.2

mail: image: bytemark/smtp restart: always

minio: labels: virtual.host: '192.168.18.2' virtual.port: '9000' virtual.tls-email: [email protected] image: minio/minio command: server /data ports: - '9000:9000' environment: MINIO_ROOT_USER: minio MINIO_ROOT_PASSWORD: minio123 volumes: - s3_data:/data

createbuckets: image: minio/mc depends_on: - minio entrypoint: > /bin/sh -c " sleep 10; /usr/bin/mc config host add minio http://minio:9000 minio minio123; /usr/bin/mc mb minio/typebot; /usr/bin/mc anonymous set public minio/typebot/public; exit 0; "

volumes: db_data: s3_data:

miscIick avatar Aug 29 '24 00:08 miscIick

Worked for me:

  - SMTP_HOST=smtp.gmail.com
  - SMTP_PORT=587
  - SMTP_SECURE=true
  - [email protected]
  - SMTP_PASSWORD= (Sign in with app passwords,not account password, see at google)
  - NEXT_PUBLIC_SMTP_FROM='Suporte Typebot' <[email protected]>

dionepereira avatar Aug 29 '24 12:08 dionepereira

Olá, estou tendo a mesma dificuldade. Tentei tanto com smtp.hostinger.com e email [email protected], quanto com o recomendado pelo Dione smtp.gmail.com e [email protected]. Ainda sem MagicLink...

Hi, I'm having the same difficulty. I tried both with smtp.hostinger.com and email [email protected], as well as the one recommended by Dione smtp.gmail.com and [email protected]. Still no MagicLink...

I installed it with ORION , when i type docker-compose logs at root it says i have no docker in my vps.

nickfromit avatar Sep 02 '24 05:09 nickfromit

Closing this as it seems the issue is not due to Typebot but more due invalid config. Feel free to reopen an issue if you have a clear reproduction to provide.

baptisteArno avatar Sep 02 '24 08:09 baptisteArno

the logs is talking than the problem is in send of magic link how i can repair this. I was set this using the gmail SMTP and this is correct email i am using e-mail of gmail and i am hosting typebot in my pc what i am should do if you don't can help us. who can ?

miscIick avatar Sep 02 '24 08:09 miscIick

estou com o mesmo problema!

Braido350 avatar Sep 02 '24 17:09 Braido350

estou com o mesmo problema!

Eu estava com esse problema:

message: 'Magic link email could not be sent. See error above.'

Isso é configuração de SMTP. Você precisa ter uma conta no google com autenticação de dois fatores, procura a opção "Senhas de APP no google", gera uma senha de app e coloca na variavel SMTP_PASSWORD removendo os espaços em branco da senha.

  • SMTP_HOST=smtp.gmail.com
  • SMTP_PORT=587
  • SMTP_SECURE=true
  • [email protected]
  • SMTP_PASSWORD= (Sign in with app passwords,not account password, see at google)
  • NEXT_PUBLIC_SMTP_FROM='Suporte Typebot' [email protected]

dionepereira avatar Sep 02 '24 19:09 dionepereira

olá pessoal, estou como mesmo problema.... não consigo achar a solução.... alguém ja resolveu?

Erick381 avatar Sep 02 '24 22:09 Erick381

consegui resolver.... peguei esse video (https://www.youtube.com/watch?v=nFbZLX2U-5k) e gerei a senha do meu email pra colocar no typebot e deu certo!!!

Erick381 avatar Sep 02 '24 22:09 Erick381

consegui resolver.... peguei esse video (https://www.youtube.com/watch?v=nFbZLX2U-5k) e gerei a senha do meu email pra colocar no typebot e deu certo!!!

Infelizmente para mim nao funcionou. Pode mandar aqui a config do stack? secure true ou false? qual porta? usou email pessoal mesmo?

nickfromit avatar Sep 02 '24 22:09 nickfromit

Eu já tentei de tudo trocar o servidor de email por outro por exemplo estou utilizando gmail tentei Yahoo mas mesmo assim não funciona sei lá e os 2 email estão com verificação de 2 fatores alem de estar utilizando a senha de app

miscIick avatar Sep 03 '24 12:09 miscIick

Eu já tentei de tudo trocar o servidor de email por outro por exemplo estou utilizando gmail tentei Yahoo mas mesmo assim não funciona sei lá e os 2 email estão com verificação de 2 fatores alem de estar utilizando a senha de app

Abaixo o docker-compose.yml que funciona pra mim, troque por suar informações e veja se funciona.

version: '3.3' services: typebot-db: image: postgres:13 restart: always volumes:

  • db_data:/var/lib/postgresql/data environment:
  • POSTGRES_DB=typebot
  • POSTGRES_PASSWORD=typebot

typebot-builder: ports:

  • 3001:3000 image: baptistearno/typebot-builder:latest restart: always depends_on:
  • typebot-db environment:
  • DATABASE_URL=postgresql://postgres:typebot@typebot-db:5432/typebot
  • NEXTAUTH_URL=http://192.168.0.0:3001/
  • NEXT_PUBLIC_VIEWER_URL=http://192.168.0.0:3002/
  • ENCRYPTION_SECRET=Ta0De1oCkgu7/zflbEPr4kRIofdKNlFj
  • ADMIN_EMAIL=[email protected]
  • SMTP_HOST=smtp.gmail.com
  • SMTP_USERNAME=[email protected]
  • SMTP_PASSWORD=senhaAppSemEspaco
  • SMTP_AUTH_DISABLED=false
  • SMTP_PORT=587
  • SMTP_SECURE=true
  • DEFAULT_WORKSPACE_PLAN=UNLIMITED
  • NEXT_PUBLIC_SMTP_FROM=[email protected]
  • S3_ACCESS_KEY=minio
  • S3_SECRET_KEY=minio123
  • S3_BUCKET=typebot
  • S3_ENDPOINT=storage.testedocker.com.br

typebot-viewer: ports:

  • 3002:3000 image: baptistearno/typebot-viewer:latest restart: always environment:
  • DATABASE_URL=postgresql://postgres:typebot@typebot-db:5432/typebot
  • NEXT_PUBLIC_VIEWER_URL=http://192.168.0.0:3002/
  • NEXTAUTH_URL=http://192.168.0.0:3001/
  • ENCRYPTION_SECRET=Ta0De1oCkgu7/zflbEPr4kRIofdKNlFj
  • S3_ACCESS_KEY=minio
  • S3_SECRET_KEY=minio123
  • S3_BUCKET=typebot
  • S3_ENDPOINT=storage.testedocker.com.br

mail: image: bytemark/smtp restart: always

minio: labels: virtual.host: 'storage.testedocker.com.br' virtual.port: '9000' virtual.tls-email: '[email protected]' image: minio/minio command: server /data ports:

  • '9000:9000' environment: MINIO_ROOT_USER: minio MINIO_ROOT_PASSWORD: minio123 volumes:
  • s3_data:/data

createbuckets: image: minio/mc depends_on:

  • minio entrypoint: > /bin/sh -c " sleep 10; /usr/bin/mc config host add minio http://minio:9000/ minio minio123; /usr/bin/mc mb minio/typebot; /usr/bin/mc anonymous set public minio/typebot/public; exit 0; "

volumes: db_data: s3_data:

dionepereira avatar Sep 03 '24 16:09 dionepereira

dionepereiracCara tu é foda dms meu mano deu certinho muito obrigado!!!

miscIick avatar Sep 03 '24 21:09 miscIick

dionepereiracCara tu é foda dms meu mano deu certinho muito obrigado!!!

Tmj, é nóis!!!

dionepereira avatar Sep 04 '24 17:09 dionepereira

Passando aqui para ajudar proximas pessoas com esse problema. Verifiquem com a empresa da sua vps se as portas 465/587/25 estao liberadas. A minha empresa AKAMAI bloqueia por padrão essas portas e não há como libera-las sem enviar ticket. Outras empresas também fazem isso, entao antes de quebrar a cabeça, pesquisem o nome da sua empresa no google + portas 465/587/25 ou mandem ticket.

Just stopping by to help others who might face this issue. Check with your VPS provider to see if ports 465/587/25 are open. My provider, AKAMAI, blocks these ports by default, and they can't be unlocked without submitting a ticket. Other providers may do the same, so before you spend too much time troubleshooting, try Googling your provider's name along with ports 465/587/25, or send in a support ticket.

nickfromit avatar Sep 04 '24 18:09 nickfromit

Eu simplesmente resolvi trocando o email smtp para um antigo. Não sei porque o e-mail que tinha acabado de criar não estava funcionando.

Celks avatar Feb 21 '25 16:02 Celks