ihp icon indicating copy to clipboard operation
ihp copied to clipboard

Failed to start the development server

Open kumkee opened this issue 3 months ago • 11 comments

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.

kumkee avatar Sep 22 '25 21:09 kumkee

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.

unhammer avatar Sep 23 '25 08:09 unhammer

Can you run with export DEBUG=1 (e.g. DEBUG=1 devenv up)? This will print more output logs

mpscholten avatar Sep 23 '25 14:09 mpscholten

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-compose and then devenv up again.)

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.

kumkee avatar Sep 23 '25 20:09 kumkee

DEBUG=1 devenv up

That doesn't give me more output.

kumkee avatar Sep 23 '25 20:09 kumkee

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

kumkee avatar Oct 20 '25 18:10 kumkee

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.

janat08 avatar Nov 15 '25 16:11 janat08

https://github.com/digitallyinduced/ihp/issues/2152

janat08 avatar Nov 15 '25 16:11 janat08

Could be a devenv bug as well. Does it go away on lastest IHP master? (because there we use a more recent devenv version)

mpscholten avatar Nov 15 '25 20:11 mpscholten

https://ihp.digitallyinduced.com/Guide/updating.html no instructions for flakes

janat08 avatar Nov 15 '25 20:11 janat08

Updated via https://github.com/digitallyinduced/ihp/pull/2154

mpscholten avatar Nov 15 '25 21:11 mpscholten

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

janat08 avatar Nov 17 '25 05:11 janat08