Authentication requires a port 3456 that's unavailable because it's running another process

Authentication requires a port 3456 that's unavailable because it's running another process

-ppaliwal
Shopify Partner
2 0 3

I am trying learn shopify development and creating a first app. Upon doing the initial `npm run dev`, I am thrown an error stating "Authentication requires a port 3456 that's unavailable because it's running another process. Terminate that process?"

 

If I choose to kill the process, it again throws the error stating "missing argument".

 

Unknown error                                                                                           │
│                                                                                                          │
│  To investigate the issue, examine this stack trace:                                                     │
│    at handler (@shopify/cli-kit/src/public/node/error.ts:127)                                            │
│      fatal = new BugError(maybeError?.message ?? 'Unknown error')                                        │
│    at (@shopify/cli-kit/src/public/node/error-handler.ts:37)                                             │
│      return handler(error)           

I checked several times to see which app/process is blocking the port but nothing comes up.

 

I am using openSUSE Linux for the development.

Any pointers would be greatly appreciated.

Replies 7 (7)

Weaverse
Shopify Partner
73 23 32

Your computer might have another node app running on port 3456. You can use the following command to kill it and then npm run dev again.

sudo killall node

 

Helping merchants build super unique, high-performance storefronts using Weaverse + Hydrogen.
Looking for Development & Agency partners.
If you find the answer helpful, give it a thumbs up!
Our App: Theme Customizer for Shopify Hydrogen
Join our Weaverse + Hydrogen community: Weaverse Community
-ppaliwal
Shopify Partner
2 0 3

yeah, I tried doing that but it didn't work. After a lot of tinkering I ran the command with sudo and surprisingly it started to work; didn't get any notification for port blocked, etc.

I have no clue why does it need elevated privileges.

sudo npm run dev

 

ebz
Shopify Partner
1 0 0

Confirming this is still an issue (in openSuse tumbleweed) and fix still works

round
Shopify Partner
113 18 10

How to solve this, i have same error

Was my reply helpful? Click Like to let me know! Was your question answered? Mark it as an Accepted Solution.

round
Shopify Partner
113 18 10

How to solve this, i have the same error.

Was my reply helpful? Click Like to let me know! Was your question answered? Mark it as an Accepted Solution.

wexa
Shopify Partner
1 0 0

I'm having the same issue, on openSUSE Linux, Shopify CLI 3.61.2

mwalercz
Shopify Partner
1 0 0

Instead of running "shopify app dev" prefix it with HOST eg.

HOST=127.0.0.1 shopify app dev

 

Why?

Because Shopify CLI uses https://www.npmjs.com/package/get-port-please, which by default checks port on HOST env variable. On my OpenSuse HOST env var is set to "linux...", and checking any port on "linux..." HOST fails.