beyondcode / herd-community

91 stars 1 forks source link

[Bug]: The Herd Desktop application is not running. Please start Herd and try again. #595

Closed Cegem-360 closed 7 months ago

Cegem-360 commented 8 months ago

Platform

Windows

Operating system version

Windows 11, version 23H2

System architecture

Intel (x86)

Herd Version

1.7.1

PHP Version

8.3

Bug description

In fresh install or reinstall, any time i want use GUI sites page infinite loading happening, but i see the application GUI is active and small icon also useable and active.

Steps to reproduce

Any version after install cant use sites page. And after i open GUI the sites page showing this image The Cmd promt say this. image image

Relevant log output

[2024-04-03 00:19:56.950] [info]  Stopping NGINX
[2024-04-03 00:19:56.950] [info]  Stopping NGINX with PID 9952
[2024-04-03 00:19:57.145] [info]  Stopped NGINX
[2024-04-03 00:19:57.146] [info]  Stopping Mail
[2024-04-03 00:19:57.146] [info]  Stopping Dumps
[2024-04-03 00:19:57.147] [info]  Notifying windows of service update: Dumps - inactive
[2024-04-03 00:19:57.157] [info]  Stopping PHP-8.3
[2024-04-03 00:19:57.158] [info]  Stopping PHP-8.3 with PID 8252
[2024-04-03 00:19:57.356] [info]  Stopped PHP-8.3
[2024-04-03 00:19:57.664] [info]  [Mails] stopped inactive
[2024-04-03 00:19:57.664] [info]  Notifying windows of service update: Mail - inactive
[2024-04-03 00:19:57.677] [info]  NGINX exited
[2024-04-03 00:19:57.677] [info]  Deleted PID file C:\Users\Tulajdonos\.config\herd\.pid\nginx.pid
[2024-04-03 00:19:57.678] [info]  Notifying windows of service update: NGINX - inactive
[2024-04-03 00:19:57.679] [info]  PHP-8.3 exited
[2024-04-03 00:19:57.680] [info]  Deleted PID file C:\Users\Tulajdonos\.config\herd\.pid\php-8_3.pid
[2024-04-03 00:19:57.680] [info]  Notifying windows of service update: PHP-8.3 - inactive
[2024-04-03 00:19:57.682] [info]  PHP-8.3 exited with code 1 - PID: 8252
[2024-04-03 00:19:57.682] [info]  Notifying windows of service update: PHP-8.3 - inactive
[2024-04-03 00:19:57.683] [info]  NGINX exited with code 1 - PID: 9952
[2024-04-03 00:19:57.684] [info]  Notifying windows of service update: NGINX - inactive
[2024-04-03 00:19:58.335] [info]  [nginx] Starting Nginx...
[2024-04-03 00:19:58.336] [info]  [nginx] Config: C:\Users\Tulajdonos\.config\herd\config\nginx\nginx.conf
[2024-04-03 00:19:58.343] [info]  log-pid.
[2024-04-03 00:19:58.344] [info]  Wrote PID (19572) to C:\Users\Tulajdonos\.config\herd\.pid\nginx.pid
[2024-04-03 00:19:58.372] [info]  Starting CGI
[2024-04-03 00:19:58.373] [info]  [PHP] Starting PHP 83 on port 9083
[2024-04-03 00:19:58.375] [info]  [PHP] Path: C:\Users\Tulajdonos\.config\herd\bin\php83\php-cgi.exe
[2024-04-03 00:19:58.381] [info]  log-pid.
[2024-04-03 00:19:58.382] [info]  Wrote PID (21628) to C:\Users\Tulajdonos\.config\herd\.pid\php-8_3.pid
[2024-04-03 00:19:58.398] [info]  Started NGINX with PID 19572
[2024-04-03 00:19:58.399] [info]  Notifying windows of service update: NGINX - active
[2024-04-03 00:19:58.400] [info]  Started PHP-8.3 with PID 21628
[2024-04-03 00:19:58.401] [info]  Notifying windows of service update: PHP-8.3 - active
[2024-04-03 00:19:58.403] [info]  Watching paths:  [ 'C:\\Users\\Tulajdonos\\Herd', 'D:\\herd' ]
[2024-04-03 00:19:58.414] [info]  Hosts watcher ready
[2024-04-03 00:19:58.417] [info]  Updating hosts file via HerdHelper Windows Service
sschlein commented 8 months ago

@Cegem-360 Can you please share screenshots from your App Dashboard and the genral settings where I can see the status of the HerdHelper?

Can you please also run php -v and which-php and send me the output?

Cegem-360 commented 8 months ago

Sue, image image image

Cegem-360 commented 8 months ago

I tried different port to see change anyting, but only that happend is the HerdHelper turned red. When i changed back then turned back to green.

Cegem-360 commented 8 months ago

I find this error to image

WillieHuizing commented 8 months ago

Hello,

I am facing the same problem altough I'm using Herd Pro. When I try to view Sites or try to use the log view I'm getting this error:

Error occurred in handler for 'log-viewer.fetch-sites': Error: Command failed: "C:\Users\whu\.config\herd\bin\php83\php.exe" "C:\Users\whu\.config\herd\bin\herd.phar" parked --json

  Command "parked" is not defined.

    at ChildProcess.exithandler (node:child_process:422:12)
    at ChildProcess.emit (node:events:517:28)
    at maybeClose (node:internal/child_process:1098:16)
    at ChildProcess._handle.onexit (node:internal/child_process:303:5) {
  code: 1,
  killed: false,
  signal: null,
  cmd: '"C:\\Users\\whu\\.config\\herd\\bin\\php83\\php.exe" "C:\\Users\\whu\\.config\\herd\\bin\\herd.phar" parked --json'
}
DCrepper commented 7 months ago

This can be solved by installing by https://github.com/cretueusebiu/valet-windows, on PHP 8.1, not have 8.2 or 8.3 support yet.

mpociot commented 7 months ago

By default, Laravel Herd starts a lightweight webserver to allow communication between the CLI and the App. This server is running on port 9001 by default. Maybe you have anything else running on this port/your user is not allowed to open it?

You can manually change this port by updating the apiPort value in your %USERPROFILE%\.config\herd\config\config.json file.

Can you see if this solves the issue for you?

DCrepper commented 7 months ago

I changed the port to different like 9010, 9110. Restart the servies and the application. but still i get this error. I restarted the computer nothig happend. When close the app in mini icon. Then i start the app from Administrator cli image i get this and still herd isn't working accordingly.

DCrepper commented 7 months ago

i get this from consol also image and the Sites page is frozen and closed my app

WillieHuizing commented 7 months ago

I had a program listening on port 9001, so thank you @mpociot for pointing this out.

For others. In your terminal / cmd type in the command netstat -ab and look for a process
that is listening on 9001. If you close the app the problem will be solved without needing to
change the port.

DCrepper commented 7 months ago

Only herd run on: image

WillieHuizing commented 7 months ago

Does netstat -ab | findstr 9001 show you any results?
I guess there could be more than 1 reason as to why this isn't working.

DCrepper commented 7 months ago

php-cgi.exe run on 9001 image

WillieHuizing commented 7 months ago

@DCrepper
Maybe change the port back to 9001?
I'm assuming it's being used now because the default port has changed and it uses the available ports to run services. But that would imply that changing the default port is whats causing this issue for you. At this point
I'm just guessing though.

I had a HP process running that used port 9001. Removing it solved my problem.

DCrepper commented 7 months ago

@WillieHuizing If i change back to 9001. Then this: image

WillieHuizing commented 7 months ago

What does netstat -ab | findstr 9001 show you now?

DCrepper commented 7 months ago

@WillieHuizing Now only herd exe runing but when i go to sites page then more liseners come online. image image

thatgardnerone commented 7 months ago

Have you previously installed Laravel Valet (for Windows)?

Removing the valet from my Windows directory at C:\Users\<username>\.config\valet and restarting my PC solved this issue.

Cegem-360 commented 7 months ago

@thatgardnerone No, it was not installed before :˙(

thatgardnerone commented 7 months ago

@Cegem-360 try checking the ports in use via the Resource Monitor (Windows - R, "resmon.exe") and head to the Network tab.

Listening Ports at the bottom of the window will show you all services, similar to the netstat commands mentioned above. Check that it's definitely Herd.exe using 9001.

Cegem-360 commented 7 months ago

@thatgardnerone im sue the 9001 is the only one image

Cegem-360 commented 7 months ago

@thatgardnerone And the valet is working like in the prtScr only the Sites screen is freezing then loading infinitly image

thatgardnerone commented 7 months ago

@thatgardnerone And the valet is working like in the prtScr only the Sites screen is freezing then loading infinitly

Just checking @Cegem-360, you've said "valet is working" in that screenshot. Do you have valet installed separately? Or did you mean Herd?

If you have valet installed, it'll be in the .config/valet folder I mentioned previously, and you'll need to remove it.

Cegem-360 commented 7 months ago

@thatgardnerone No, valet isn't installed separately.

Claudao01 commented 6 months ago

I think I’ve found a workaround for the empty Sites page on Windows 11:

After doing this, one of the folders appeared in the Sites menu. Then I clicked on the ‘+’ button and created a new project. The page that previously went straight to ‘open on browser’ started to bring creation logs, and a folder was created in my chosen path with all the standard files of the new project.

Maybe this will help

Cegem-360 commented 6 months ago

I think I’ve found a workaround for the empty Sites page on Windows 11:

  • I opened the terminal and used ‘cd S:\’ to navigate to the location where my projects will be, replace with your own path
  • I executed ‘herd link’
  • I finished Herd in the notification bar and opened it again

After doing this, one of the folders appeared in the Sites menu. Then I clicked on the ‘+’ button and created a new project. The page that previously went straight to ‘open on browser’ started to bring creation logs, and a folder was created in my chosen path with all the standard files of the new project.

Maybe this will help

image Sadly nothing changed :(

sschlein commented 6 months ago

I am pretty sure I've fixed that problem today. Can you all please verify if there is something (not Herd) on port 9001?

There was a situation where a changed setting in the app wasn't used and so the herd cli couldn't connect to the app with the error of this issue.

We try to release an update later this week.

Cegem-360 commented 6 months ago

im 100% sue nothing else runing on 9001 image

ivanmafl commented 6 months ago

I know this solution to the problem will probably only apply to me, but what worked for me was to remove the extension in php.ini. Specifically for ImageMagick, which I had previously installed.

mozex commented 5 months ago

I know this solution to the problem will probably only apply to me, but what worked for me was to remove the extension in php.ini. Specifically for ImageMagick, which I had previously installed.

This worked for me, too. Does anyone have a solution to fix it without removing the ImageMagick extension?