baptisteArno / typebot.io

💬 Typebot is a powerful chatbot builder that you can self-host.

Home Page:https://typebot.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error! Could not reach server. Check your connection. {}

sekksan opened this issue · comments

How to fix error for HTTPS but config .env for HTTP not problem.

docker-compose logs

typebotio-typebot-builder-1 | error_description: 'The redirect_uri MUST match the registered callback URL for this application.',
typebotio-typebot-builder-1 | providerId: 'github',
typebotio-typebot-builder-1 | message: 'redirect_uri_mismatch'
typebotio-typebot-builder-1 | }
typebotio-typebot-builder-1 | [next-auth][error][OAUTH_CALLBACK_ERROR]
typebotio-typebot-builder-1 | https://next-auth.js.org/errors#oauth_callback_error redirect_uri_mismatch {
typebotio-typebot-builder-1 | message: 'redirect_uri_mismatch',
typebotio-typebot-builder-1 | stack: 'Error: redirect_uri_mismatch\n' +
typebotio-typebot-builder-1 | ' at oAuthCallback (/app/node_modules/.pnpm/next-auth@4.22.1_next@14.1.0_@babel+core@7.22.9_react-dom@18.2.0_react@18.2.0__react@18.2.0___b4tekvds5rzy7uu2avvxps5xay/node_modules/next-auth/core/lib/oauth/callback.js:39:19)\n' +
typebotio-typebot-builder-1 | ' at Object.callback (/app/node_modules/.pnpm/next-auth@4.22.1_next@14.1.0_@babel+core@7.22.9_react-dom@18.2.0_react@18.2.0__react@18.2.0___b4tekvds5rzy7uu2avvxps5xay/node_modules/next-auth/core/routes/callback.js:52:39)\n' +
typebotio-typebot-builder-1 | ' at AuthHandler (/app/node_modules/.pnpm/next-auth@4.22.1_next@14.1.0_@babel+core@7.22.9_react-dom@18.2.0_react@18.2.0__react@18.2.0___b4tekvds5rzy7uu2avvxps5xay/node_modules/next-auth/core/index.js:208:41)\n' +
typebotio-typebot-builder-1 | ' at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n' +
typebotio-typebot-builder-1 | ' at async NextAuthApiHandler (/app/node_modules/.pnpm/next-auth@4.22.1_next@14.1.0_@babel+core@7.22.9_react-dom@18.2.0_react@18.2.0__react@18.2.0___b4tekvds5rzy7uu2avvxps5xay/node_modules/next-auth/next/index.js:22:19)\n' +
typebotio-typebot-builder-1 | ' at async D (/app/apps/builder/.next/server/chunks/9901.js:1:7928)\n' +
typebotio-typebot-builder-1 | ' at async K (/app/node_modules/.pnpm/next@14.1.0_@babel+core@7.22.9_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js:20:16545)\n' +
typebotio-typebot-builder-1 | ' at async U.render (/app/node_modules/.pnpm/next@14.1.0_@babel+core@7.22.9_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js:20:16981)\n' +
typebotio-typebot-builder-1 | ' at async NextNodeServer.runApi (/app/node_modules/.pnpm/next@14.1.0_@babel+core@7.22.9_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/next/dist/server/next-server.js:556:9)\n' +
typebotio-typebot-builder-1 | ' at async NextNodeServer.handleCatchallRenderRequest (/app/node_modules/.pnpm/next@14.1.0_@babel+core@7.22.9_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/next/dist/server/next-server.js:268:37)',
typebotio-typebot-builder-1 | name: 'Error'
typebotio-typebot-builder-1 | }
typebotio-typebot-builder-1 | prisma:info Starting a postgresql pool with 5 connections.
typebotio-typebot-builder-1 | prisma:info Starting a postgresql pool with 5 connections.

Developer tools

Failed to load resource: net::ERR_SSL_PROTOCOL_ERROR

TypeError: Failed to fetch
at tS._fetch (2640.665c02822028f243.js:1:60618)
at o (2640.665c02822028f243.js:1:57906)
at async r. [as json] (2640.665c02822028f243.js:1:58757)
at async 2640.665c02822028f243.js:1:237301
at async u (2640.665c02822028f243.js:1:236750)

The error is clear: The redirect_uri MUST match the registered callback URL for this application

It means the redirect URL configured in your Github app, does not match your instance URL

Guide: https://docs.typebot.io/self-hosting/configuration#github-auth

My config below and message Error! Could not reach server. Check your connection. {}

Github OAuth setting
Homepage URL : https://bot.????.??.??/typebots
Authorization callback URL : https://bot.????.??.??/api/auth/callback/github

.env setting

NEXTAUTH_URL=https://bot.???.??.??
NEXT_PUBLIC_VIEWER_URL=https://bot.???.??.??:8081

This error just means that your builder can't reach out https://bot.???.??.??:8081