Address already in use:9002? Prototyper Error

Im not sure if there is an outage right now - i’ve checked and it doesn’t seem to be.
I have the following error. Ive tried restarting the server a couple of times but no change.
It has been working fine up to a short time ago.

2025-06-20T17:54:28Z [web]  GET / 200 in 61050ms
2025-06-20T17:54:28Z [web] Error:  ⨯ Failed to start server
2025-06-20T17:54:28Z [web] 
2025-06-20T17:54:28Z [web] Error: Error: listen EADDRINUSE: address already in use 0.0.0.0:9002
2025-06-20T17:54:28Z [web]     at <unknown> (Error: listen EADDRINUSE: address already in use 0.0.0.0:9002) {
2025-06-20T17:54:28Z [web]   code: 'EADDRINUSE',
2025-06-20T17:54:28Z [web]   errno: -98,
2025-06-20T17:54:28Z [web]   syscall: 'listen',
2025-06-20T17:54:28Z [web]   address: '0.0.0.0',
2025-06-20T17:54:28Z [web]   port: 9002
2025-06-20T17:54:28Z [web] }
2025-06-20T17:54:28Z [web] 
2025-06-20T17:54:28Z [web] e[?25h
2025-06-20T17:54:28Z [web] Error:  ⨯ Failed to start server
2025-06-20T17:54:28Z [web] 
2025-06-20T17:54:28Z [web] Error: Error: listen EADDRINUSE: address already in use 0.0.0.0:9002
2025-06-20T17:54:28Z [web]     at <unknown> (Error: listen EADDRINUSE: address already in use 0.0.0.0:9002) {
2025-06-20T17:54:28Z [web]   code: 'EADDRINUSE',
2025-06-20T17:54:28Z [web]   errno: -98,
2025-06-20T17:54:28Z [web]   syscall: 'listen',
2025-06-20T17:54:28Z [web]   address: '0.0.0.0',
2025-06-20T17:54:28Z [web]   port: 9002
2025-06-20T17:54:28Z [web] }
2025-06-20T17:54:28Z [web] 
2025-06-20T17:54:28Z [web] <IDX> ✘ Preview shutdown unexpectedly
2025-06-20T17:54:29Z [web]  GET / 200 in 61005ms
2025-06-20T17:54:29Z [web] e[?25h
2025-06-20T17:54:29Z [web] <IDX> ✘ Preview shutdown unexpectedly
2025-06-20T17:54:30Z [web]  GET / 200 in 60948ms
2025-06-20T17:54:30Z [web]  GET / 200 in 61138ms
2025-06-20T17:54:30Z [web]  GET / 200 in 61098ms
2 Likes

Now getting an adidtional error when restarting the server..

<IDX> ✘ Preview shutdown unexpectedly
Error:  ⚠ Found a change in next.config.ts. Restarting the server to apply the changes...

   ▲ Next.js 15.3.3 (Turbopack)
   - Local:        http://localhost:9002
   - Network:      http://0.0.0.0:9002
   - Environments: .env.local

 ✓ Starting...
 ✓ Ready in 13.9s
Error:  ⚠ Webpack is configured while Turbopack is not, which may cause problems.
3 Likes

I’m having simular problems. Prototyper crashing on this. No availability in coding because of simular problems. Already contacted support for this. I’m stuck because of this. Did also have 502 errors. Things went wrong as soon as I tried to implment multilangual support on my project. As soon as I decided to roll back to the previous situation things went from getting fails to finally not beeing able to do anything anymore. I hope support can fix it asap. Looks like it is a system bug, but I am not a real dev, so not sure about it.

2 Likes

ive managed to fix this now..
the dev script in package.json was using “–p” instead of "–port

it worked fine after that - must have been causing some issue with he server maybe. either that or total coincidence that it started working again on its own at the same time lol.

1 Like

I have the same error. I fixed the code with Claude Sonnet, it worked for a while, but it keep coming back.

1 Like

I had this same error. I also noticed these HTTP 403’s:

My app came back up in code view recently, but the prototyper is not loading.

1 Like

same issue here. it seems some backend issue from studio. i am not sure, should i wait till they resolve it or import the environment in some other ai prototyping tool. any suggestions?

1 Like

I’ve been facing a similar issue since last night. I made a change and my preview window and all other pages were 404. I. tried a git reset to a version I knew was stable but still got the errors showing up which didn’t make sense. Now when I try and launch from code view I get port 9002 in use

1 Like

Hi all,

I am happy to tell you that I managed to get things working again. My prototyper is back so I could fix the issue. The problem seems to be the Content Security Policy (CSP) which you will find in your next.config.ts. The Prototyper AI managed to get out the 'frame-ancestors ‘self’;. Not sure what brought back my prototyper (might be that a FB Dev already did some work to help, but I did no see a response yet). I managed to stop the draining/flushing in dev console (f12). May that kept the prototyper alive and so I could ask the AI to fix the issue. After the AI took out the ‘frame-ancestors ‘self’;’ (out of the CSP in next.config.ts) the problem was fixed and brought back the preview screen in prototyper and code mode. I hope this might bring others a solution. If you can manage to find the next.config.ts yourself and take out the ‘frame-ancestors ‘self’;’ you might have fixed the problem.
Anyway: I closed the ticket at the support desk. Good luck to you all!

1 Like

Getting a new issue today, as well as prototyper now crashing through tasks, also saying its completed tasks but actually hasn’t - constant problems.

1 Like

I do not have that in my next.config.ts file.

As of now the prototyper is working again as expected.

I believe it was a backend outage that was out of our control.

1 Like

As of now I am getting HTTP 403 errors again for the prototyper.

I can still access code view just fine.

1 Like

Getting this as well. On and off for a few days. Not sure if its code error in package.json or if it’s a server issue.

1 Like

noticed something else too: not running anymore..

1 Like

Anyone have any ideas? Ive rewrote the package.json 100s of times now with no luck.

1 Like

It’s a black box. Sometimes it works, sometimes it doesn’t.

Just have to be patient, restart your VM, reload and try again.

If it works it works, if not, come back later.

1 Like

I am getting this error and I have been trying to fix it for roughly 48 hours - I am able to get the prototype running sometimes, but deploying is out of the question. I have tried many port options in package.json and next config but no luck yet.

We are looking into this!

Sometimes the preview server might break and not restarter properly. For those instances restarting will help.

1 Like

Same here. Since 2 days only “adress already in use” messages. Also restarts not helping. Hoping for a quick fix :slight_smile:

Server not starting - #2 by Soham_Asodekar you can check my post i have given the solution