Failed to start the development server
I've been following the official guide on my nixos-wsl. I always failed after devenv up.
Here is what I got from the text UI:
Running tasks devenv:processes:ihp
Running devenv:processes:ihp
[devenv:processes:ihp] RunDevServer: Network.Socket.connect: <socket: 13>: timeout (Connection timed out)
Failed devenv:processes:ihp (134.97s)
1 Failed
--- devenv:processes:ihp failed with error: Task exited with status: exit status: 1
--- devenv:processes:ihp stdout:
--- devenv:processes:ihp stderr:
0000.00: RunDevServer: Network.Socket.connect: <socket: 13>: timeout (Connection timed out)
---
At the top of the TUI, it shows EXIT CODE 1.
What do I do to find out the cause of this error and how do I fix it?
Thank you.
This is on ihp 1.4? Does it happen all the time, or intermittently?
(I've also noticed some intermittent failures with 1.4, though typically sorted by a ctrl+r for restart, or killall ghc postgres process-compose and then devenv up again.)
Might be worth switching to 1.3 to see if it goes away.
Can you run with export DEBUG=1 (e.g. DEBUG=1 devenv up)? This will print more output logs
This is on ihp 1.4? Does it happen all the time, or intermittently?
It's ihp 1.3. All the time
(I've also noticed some intermittent failures with 1.4, though typically sorted by a ctrl+r for restart, or
killall ghc postgres process-composeand thendevenv upagain.)
ctrl+r doesn't fix it. My output from ps -A | grep postgres is blank.
Might be worth switching to 1.3 to see if it goes away.
My ihp-new is from the stable channel of nixpkgs, so it is 1.3.
DEBUG=1 devenv up
That doesn't give me more output.
I start a new NixOS, but it fails with the same error message. There is also a new one
Path not found for process compose config home
Doesn't work for me either. compose doesn't look configed on devenv. It works in codespace, but not docker if you're using container. There must be a way to just have a recipe for nixos, that avoids these issues.
https://github.com/digitallyinduced/ihp/issues/2152
Could be a devenv bug as well. Does it go away on lastest IHP master? (because there we use a more recent devenv version)
https://ihp.digitallyinduced.com/Guide/updating.html no instructions for flakes
Updated via https://github.com/digitallyinduced/ihp/pull/2154
Still dies for me on wsl. I tried devcontainer docker and it has the following error:
vscode ➜ /workspaces/ihp-dev-container $ direnv allow
direnv: loading /workspaces/ihp-dev-container/.envrc
direnv: loading https://raw.githubusercontent.com/nix-community/nix-direnv/3.1.0/direnvrc (sha256-yMJ2OVMzrFaDPn7q8nCBZFRYpL/f0RcHzhmw/i6btJM=)
direnv: using flake . --override-input devenv-root file+file:///workspaces/ihp-dev-container/.devenv/root --accept-flake-config
error:
… while fetching the input 'git+file:///workspaces/ihp-dev-container'
error: opening Git repository "/workspaces/ihp-dev-container": repository path '/workspaces/ihp-dev-container' is not owned by current user
direnv: nix-direnv: Evaluating current devShell failed. Falling back to previous environment!
direnv: export +DEVENV_IN_DIRENV_SHELL +NIX_DIRENV_DID_FALLBACK +SMTP_ENCRYPTION +SMTP_HOST +SMTP_PORT ~PATH