The next.js page can not shown is Webview tab

Question:
I created a Next.js project and executed the “npm run dev” command. A Webview tab popped up automatically, but the Next.js page was not shown on the Webview tab. Instead, the following message was displayed:
" caab6dff-1ee9-437a-aa4a-e5211b29527e.id.repl.co により途中で接続が切断されました。 "
Could you please check and let me know how I can resolve this issue?

Replit Profile: https://replit.com/@zhaoyuying

Hey @zhaoyuying!

Is this issue happening for lowcode-engine or real-estate-cms?

Hi @ShaneAtReplit!
Thanks for your reply.
This issue is happening for real-estate-cms2. Please check it.

Thanks, we will take a look!

Can you please try forking the Repl to see if that resolves the issue?

Hi @ShaneAtReplit
I tried it, but the issue is not resolved. Please check it more.

1 Like

Understood, we are continuing to look into this!

Hey all!

We have found that the issue was due to NextJS opening multiple ports, which was confusing our port detection system and prevented the server from being hosted to the internet.

If you’re still seeing issues, you can add a ports option to the .replit file (docs) with the port that your NextJS server is running on, which will force our networking infrastructure to use that port.

If that doesn’t work, please send me the link to the Repl and I would be happy to take a look!

2 Likes