Causes of ERR_NGROK_8012
| Cause | How to spot it | Fix |
|---|---|---|
| The app is not running | curl to the port fails with “Connection refused” | Start the app, then reload the page |
| The ngrok command names the wrong port | The dev server prints a different port from the one in ngrok http | Restart ngrok with the port the app prints |
| The app listens on another address, such as IPv6 only or a container’s own network | lsof shows the app on [::1] or a container address, not 127.0.0.1 | Point the tunnel at the exact address the app listens on, or bind the app to 127.0.0.1 |
Steps
Confirm the app answers on its own
ngrok’s first check for ERR_NGROK_8012 is to reach the service directly, without ngrok. If curl fails here, the problem is the app, not the tunnel: start it, or wait for the dev server to finish compiling.
curl -I http://localhost:3000Check: curl prints an HTTP status line, such as HTTP/1.1 200 OK.
Find the port and address the app really uses
Dev servers move to the next port when theirs is taken, and some listen only on IPv6. On macOS or Linux, lsof lists every listening socket with its address. Match the tunnel to what it prints.
lsof -iTCP -sTCP:LISTEN -nPRestart ngrok on the right port
ngrok’s fix for a port mismatch is to restart the agent with the port your service uses. Update to the latest ngrok release if the error persists.
ngrok http 3000Publish the app and make a link
qurl publishconnects to the app on 127.0.0.1, waits until the route is serving, prints the CRID and exits. A failure before that, such as an app that isn’t running, creates nothing.qurl sharethen makes a link that opens once and expires within 24 hours, and the app never gets a public URL.qurl publish http://127.0.0.1:3000 --name "App preview" qurl share <CRID>
What the recipient sees
A one-time qURL link grants access to the first person who opens it, with no LayerV account or client install.
More
qURL may show a preview before connection. Named invitees verify their email and save a passkey. Your app’s own login still applies, and your machine must stay awake with the app running.
Troubleshooting
| If you see | Do this |
|---|---|
| curl works but ERR_NGROK_8012 still appears | The tunnel and curl are reaching different addresses. If the app listens on [::1] only, localhost and 127.0.0.1 can resolve differently; point the tunnel at the address lsof shows, or start the dev server with --host 127.0.0.1. |
| The error appears only while the dev server restarts | Requests that arrive while the app is down have nowhere to go. Reload once the server is back. A qURL share survives the restart: the CRID belongs to the address, not the process, so recipients reload once the app is back on the same port. |
Show 7 more fixes
| If you see | Do this |
|---|---|
| qurl publish says the local app is not accepting TCP connections | Start the app first and check that curl works on the same address. qurl publish connects to localhost as 127.0.0.1, so if your app listens only on IPv6 (on macOS or Linux, lsof -iTCP -sTCP:LISTEN -nP shows [::1]), publish 'http://[::1]:PORT' instead, or start the dev server with --host 127.0.0.1 and publish that address. Neither requires listening on your LAN. Keep the quotes: zsh treats the brackets as a pattern. |
| The recipient sees “Access link invalid” | The link was already used or has expired. Run qurl share again and send the new link. |
| The recipient sees “Resource not found” | The resource was deleted after the link was made. Publish the app again, then run qurl share and send the new link. |
| publish rejects http://127.0.0.1 with “only HTTPS URLs are allowed”, asks you to log in, prints no Access: line, or says “unknown flag: --name” | Your qURL CLI is out of date. On macOS run brew update, then brew upgrade qurl; elsewhere install the latest release. After updating, qurl --version prints 4.0.0 or later, and every publish is private by default. |
| publish says “a public name is required” in a script or agent run | Add --name "App preview" to the publish command, replacing App preview with a short public name for your app. Recipients can see this name; keep secrets and client details out of it. |
| publish says this Linux session “can’t reach a systemd user manager” | You are in a container or sandbox without a user service manager. Run qurl publish with --foreground; sharing lasts as long as that process runs. Container and CI setup → |
| publish says “Quota Exceeded” with “protected resource limit reached”, or “Your qURL account has reached a plan limit” | You can see this without an account: a device with no account can keep up to 3 active resources, with links that last up to 24 hours. Run qurl list --status active, then qurl delete <CRID> for any you no longer need (it asks you to confirm; --yes skips that). qurl stop keeps the resource, so it does not free a slot. |
Frequently Asked Questions
What does “upstream” mean in ERR_NGROK_8012?
The upstream is your own app: the local service the ngrok agent forwards traffic to. ngrok’s page explains that the tunnel was created and traffic reached the agent, but the agent could not open a connection to that service.
Can I show a nicer page when my app is down?
ngrok suggests a Cloud Endpoint with a Traffic Policy that serves a maintenance page instead of the error. While your app is down, recipients cannot load it through qURL. Restart the app on the same port and have them reload in their existing session. The share keeps its CRID.
Who else can reach my app while the link is open?
Opening the link gives that browser access for 1 hour by default. Other browsers on the same public IP cannot use that session. Whoever opens the link first can use it. Scripts without a browser use IP-based access, which devices on the same public IP can share. Keep your app’s sign-in for sensitive data.