Telegram-Mini-Apps/nextjs-template

TON Connection issue

mrbeandev opened this issue · 1 comments

OPTIONS /tonconnect-manifest.json 405 in 11ms

i think you didnt have this issue when you creaded this app, but righ now this is a thing we have to deal with in nextjs apps when you want to add tonconnect. unless this is fixed the tonconnect button will not work.

my complete server logs :

$# npm run dev:https

> nextjs-template@0.1.0 dev:https
> next dev --experimental-https

 ⚠ Self-signed certificates are currently an experimental feature, use with caution.
   Downloading mkcert package...
   Download response was successful, writing to disk
   Attempting to generate self signed certificate. This may prompt for your password
   CA Root certificate created in C:\Users\gtula\AppData\Local\mkcert
   Certificates created in E:\mrbeandev_server\minions\demo\nextjs-template\certificates
 ⚠ Port 3000 is in use, trying 3001 instead.
  ▲ Next.js 14.2.4
  - Local:        https://localhost:3001

 ✓ Starting...
'pnpm' is not recognized as an internal or external command,
operable program or batch file.
 ✓ Ready in 2.2s
 ○ Compiling / ...
 ✓ Compiled / in 5.2s (1221 modules)
 GET / 200 in 5593ms
 ○ Compiling /favicon.ico ...
 ✓ Compiled /favicon.ico in 2.1s (625 modules)
 GET /favicon.ico 200 in 2233ms
 ✓ Compiled /_not-found in 380ms (1156 modules)
 GET /_next/static/css/app/styles.css.map 404 in 613ms
 ✓ Compiled /init-data in 303ms (1199 modules)
 ✓ Compiled /launch-params in 249ms (1178 modules)
 ✓ Compiled /ton-connect in 381ms (1201 modules)
 ○ Compiling /_error ...
 ✓ Compiled /_error in 1240ms (1410 modules)
 GET /_next/static/css/app/styles.css.map 404 in 163ms
 OPTIONS /tonconnect-manifest.json 405 in 6ms
 OPTIONS /tonconnect-manifest.json 405 in 11ms

Can't reproduce the problem, it works fine for me.

It seems like you have some problems related to different domains of public files and Next.js server. That's why you have OPTIONS request mostly used in CORS