-
Notifications
You must be signed in to change notification settings - Fork 8
Description
Description
After cloning and running npm run dev, both the Vite client (port 5173) and Express server (port 3001) start successfully. However, when opening http://localhost:5173/ in the browser, the UI gets stuck on "Reconnecting..." and never connects.
Environment
- OS: macOS 14.6.1 (Sonoma), Apple Silicon
- Node: v25.2.1
- npm: 11.6.2
- Branch:
fix/default-font-cross-platform(commit0d0229a) - freshell version: 0.1.0
Steps to Reproduce
git clone https://github.com/danshapiro/freshell.gitcd freshell && npm installnpm run dev- Open
http://localhost:5173/in browser - UI shows "Reconnecting..." spinner indefinitely
Server Logs
Server starts cleanly with no errors:
[server] INFO: Security: AUTH_TOKEN configured (48 chars)
[server] DEBUG: Loaded config
[server] configPath: "~/.freshell/config.json"
[server] INFO: Starting Claude sessions watcher
[server] INFO: Server listening
[server] port: 3001
No WebSocket connection attempts appear in the server log.
Likely Cause
The .env file is auto-generated with an AUTH_TOKEN, and the WebSocket handshake requires it via ?token=... in the URL. However, the npm run dev startup output only shows http://localhost:5173/ (from Vite) — it never prints the token-authenticated URL. So visiting the plain URL means:
- No token in
sessionStorage - Client sends
{ type: 'hello', token: undefined }over WebSocket - Server rejects with
NOT_AUTHENTICATED(close code 4001) - UI shows "Reconnecting..."
Suggestion
The server startup log should print the full authenticated URL, e.g.:
Server listening on http://localhost:5173/?token=<AUTH_TOKEN>
This would match the README description: "The startup console displays a URL for browser access."