Troubleshooting
This page lists problems by what you see: a message on the phone, in the Tondavo terminal tab or from your agent. Each entry gives the cause and the fix. Entries marked general advice describe how browsers and frameworks behave in general; Tondavo's code doesn't confirm them.
Pairing the phone
The phone says "This pairing link has expired"
Cause: pairing is open for 10 minutes after Tondavo starts (see Pricing). The QR code was scanned after that.
Fix: press c in the Tondavo tab on your computer. Pairing opens for another 10 minutes. Scan the QR code again. Restarting Tondavo also reopens pairing.
The phone says "This session already has its phone"
Cause: a free session pairs one phone, and one has already paired. What counts as a phone is explained in Security.
Fix: open the link in the browser that paired first. To pair this phone instead, stop Tondavo (q) and start a new session:
npx tondavo --new
The new session has a new QR code. The phone that was paired before loses access.
The phone says "tondavo is not running on your computer"
A phone that was already paired shows "Waiting for your computer" instead in the same situation. That page reloads by itself every 3 seconds until Tondavo is back.
Cause: the phone can't reach Tondavo on your computer. One of these:
- Tondavo isn't running, or was stopped.
- It is still connecting. Wait for
✓ HTTPS edge livein the terminal. - The computer is asleep or offline.
- The QR code is from an earlier session, for example a screenshot, or a code printed before you used
--new.
Fix: run npx tondavo in your project folder, wait for ✓ HTTPS edge live, and scan the QR code the terminal shows now. A phone that was already paired in this session reconnects without a new scan: its waiting page reloads by itself, or reload the page on the phone.
The phone says "This session has ended" or "Not paired with a computer"
Cause: a free session lasts up to 8 hours. When it ends, the terminal prints ! This session is over (free sessions last 8 hours). Restart tondavo for a new one. The phone shows "Not paired with a computer" when it opens a Tondavo page without having paired in the current session, for example a link from an old session. Opening https://dev.tondavo.com itself without having paired shows "Scan the QR code" with instructions.
Fix: restart Tondavo and scan the new QR code.
The terminal says "Another tondavo in this folder took over this session"
Cause: you started a second Tondavo in the same folder. The newest one takes over the phone, and the older one stops forwarding.
Fix: stop the older one with q. Since 0.1.3 that doesn't disturb the newer one. Run one Tondavo per project folder.
Connecting to dev.tondavo.com
The terminal says "can't reach https://dev.tondavo.com, retrying"
The full line is:
… can't reach https://dev.tondavo.com, retrying. (Offline? A wrong TONDAVO_KEY? Or more than 20 new sessions from this network in the last hour.)
Cause: Tondavo couldn't connect to dev.tondavo.com, which carries your app to the phone. It keeps retrying on its own, at most every 15 seconds. The causes Tondavo knows of:
- No internet connection on the computer.
- Too many new sessions from your network in the last hour (the limit is on Pricing). Each
--newand each start in a new folder counts. Restarting in the same folder within 8 hours reuses the session and doesn't count. Wait, and Tondavo connects when the hour has passed.
General advice: company networks, VPNs and some firewalls block long-lived WebSocket connections. If https://dev.tondavo.com opens in a browser on the computer but Tondavo still can't connect, try another network.
What the phone shows
The phone shows "Waiting for localhost:5173…"
Cause: Tondavo reached your computer but nothing answered on that port. Your dev server isn't running, has crashed, or uses another port. The terminal said (waiting for server…) at start for the same reason.
Fix: start your dev server, then press r in the Tondavo tab to reload the phone. If the port is wrong, see the next section.
The page is blank or doesn't finish loading
Look at the Tondavo tab on your computer first. It prints errors from the phone as they happen. Causes Tondavo's code confirms:
- A JavaScript error on the phone. The terminal shows a line with
✖ [JS_ERROR]. The script stopped, often on an API that exists in desktop Chrome but not in iPhone Safari, such asNotification. Ask your agent to read the phone's logs, or runnpx tondavo logs --type js_error. - A slow first compile. If your dev server takes longer than about 100 seconds to answer the first request, the phone gets
502 Tunnel error: Upstream timeout. Reload once the server has compiled. - Absolute
http://localhostURLs in the page. Tondavo doesn't rewrite URLs inside your pages. A script or stylesheet loaded fromhttp://localhost:3000/…points at the phone itself. Use relative paths such as/assets/app.js.
Tondavo opened the wrong app, or the wrong port
Cause: without a port, Tondavo tries 5173, 3000, 5174, 4321, 8080, 8000, 8888 and 4000, in that order, and uses the first that answers. Another app on one of those ports can win over yours; Tondavo then prints Also running: … with the others. If your app uses a port that isn't on the list, such as 4200 or 3001, nothing is found and Tondavo waits on 5173. The first line of the output shows which port it chose:
tondavo → proxying localhost:8000 (waiting for server…)
Fix: your dev server prints its address when it starts, for example Local: http://localhost:5173/. Stop Tondavo and pass that port:
npx tondavo 5173
The phone stays paired. Restarting in the same folder keeps the session.
Saving a file doesn't update the phone
Tondavo updates the phone in two ways. It forwards your dev server's own hot reload, and it reloads the phone itself when you save a file in the folder where you started it. Both work with default configs on Vite 8.4 and Next.js 16.5 (tested 2026-12-02).
Causes Tondavo's code confirms:
- Tondavo runs in another folder than the files you edit. It watches the folder you started it in and everything below it, except the folders and files listed in How it works.
- It was started with
--no-watch. - The phone was locked, or the tab was in the background, when you saved. The page reconnects when you come back to it but doesn't reload for saves it missed.
Fix: press r in the Tondavo tab, or ask the agent to use its reload tool. For future saves, start Tondavo in your project folder.
General advice: if your Vite config sets server.hmr or server.ws options (host, port, clientPort) for another setup, they can point the phone's hot-reload connection somewhere it can't reach. Try without them.
A login or redirect sends the phone to localhost
Cause: to get past the host checks in Vite and Next.js, Tondavo tells your app that each request came to localhost:<port>, in the Host header. It also presents the phone's same-site requests as coming from that address, in Origin and Referer. An app that builds absolute URLs from the Host header, or from a base URL configured as http://localhost:3000, sends the phone to localhost. On the phone, localhost is the phone itself, so the page fails to load. Tondavo doesn't rewrite Location headers or URLs in your pages.
The address the phone actually used is in two other headers: X-Forwarded-Host (dev.tondavo.com) and X-Forwarded-Proto (https).
Fix:
- Redirect to relative paths, such as
/dashboard, instead of full URLs. - Where your app needs a full URL, build it from
X-Forwarded-ProtoandX-Forwarded-Host. - General advice: auth libraries often take a base URL from an environment variable (Auth.js, for example, reads
AUTH_URL). Set it tohttps://dev.tondavo.comwhile you test on the phone. For OAuth sign-in (Google, GitHub), the provider must also allow the callback URL onhttps://dev.tondavo.com. - General advice: a cookie set with
Domain=localhostisn't stored by the phone. Leave theDomainattribute out.
Every project you open through Tondavo runs at the same address, https://dev.tondavo.com. Cookies and local storage from the previous project are still there when you switch. If a login behaves oddly after switching, clear the website data for dev.tondavo.com on the phone.
The phone shows an old version of the page (service worker)
General advice. Tondavo tells the phone not to cache your HTML, JavaScript and CSS. A service worker (a script some apps, such as PWAs, install to work offline) answers from its own cache before the request reaches Tondavo, so the phone can keep showing old files. This applies to --lan and to service workers installed before December 2026: dev.tondavo.com now refuses to install service workers, because all sessions share that address.
Fix: remove the service workers and their caches on the phone, then reload:
npx tondavo eval "Promise.all([navigator.serviceWorker.getRegistrations().then(rs => Promise.all(rs.map(r => r.unregister()))), caches.keys().then(ks => Promise.all(ks.map(k => caches.delete(k))))]).then(() => 'cleared')"
npx tondavo reload
Or ask your agent to do the same. To stop it happening, don't register the service worker in development. Most PWA plugins have an option to turn it off in dev.
Messages from your agent
The agent says "No phone is connected"
The full message is No phone is connected. Open the pairing link on the phone (scan the QR code tondavo printed) and keep the page open.
Cause: Tondavo is running, but no phone has the page open right now. Either the phone never paired, the page was closed, or the phone locked and dropped the connection.
Fix: unlock the phone and bring the page to the front. It reconnects by itself. If it was never paired, scan the QR code. If the page is open and the agent still says this, check the Tondavo tab for a ● Phone connected line. If there is none, your page may set a strict Content-Security-Policy in a <meta> tag that blocks Tondavo's script. Tondavo removes the CSP header but not a meta tag.
The agent says the tab is in the background or the phone is locked
The message looks like iPhone (Safari) didn't answer: the tondavo tab is in the background or the phone is locked (since 40s ago). Unlock it and bring the tab to the front.
Cause: iOS freezes background tabs and locked phones, so the page can't answer.
Fix: unlock the phone, open the browser, and bring your app's tab to the front. Then ask the agent to try again. A similar message, didn't answer within 5s (last heard …) (the number of seconds depends on the command), means the phone stopped answering without saying why. It may have just locked or switched apps. If the page is on screen, reload it.
The agent says "The phone runs an older tondavo script"
The full message is The phone runs an older tondavo script: reload it. It comes from tap, type, swipe and screenshot.
Cause: the page on the phone was loaded by an older Tondavo version.
Fix: reload the phone: press r in the Tondavo tab, or ask the agent to use its reload tool.
The agent says "No active tondavo session"
The full message is No active tondavo session in <folder> (run `npx tondavo` first).
Cause: the agent's tools look for a running Tondavo in the folder shown. Tondavo isn't running, or it runs in a different folder.
Fix: start npx tondavo in that folder. If it has to run elsewhere, set TONDAVO_DIR; see Connect your agent.
A message like connect ECONNREFUSED 127.0.0.1:8788 means Tondavo was stopped abruptly (for example, its terminal window was closed). Start it again in the same folder.
Platforms
Windows, Linux and Android
Tondavo is tested on macOS with an iPhone. Windows and Linux computers are untested, and so is Android Chrome on a real phone. No part of Tondavo's code differs by operating system.
General advice for WSL: run Tondavo in the same place as your dev server, both inside WSL or both in Windows, because Tondavo connects to localhost.
If something doesn't work, or works, tell us: Report a problem lists what to include.