herd-community icon indicating copy to clipboard operation
herd-community copied to clipboard

[Bug]: Not downloading php or node

Open PrimalMinister opened this issue 9 months ago • 23 comments

Platform

Windows

Operating system version

Windows 11

System architecture

Windows

Herd Version

1.18.0

PHP Version

No response

Bug description

Didnt download php or node. This was fixed by manually copying PHP distribution to herd folder and by removing the node path variables as per documentation.

Steps to reproduce

Standard install

Relevant log output


PrimalMinister avatar Mar 31 '25 10:03 PrimalMinister

This usually happens if Herd can not access the internet and download the binaries.

Manually downloading them might lead to problems because not all extensions are enabled by default.

If you open the PHP settings, is there just a spinner or are there buttons to install PHP?

sschlein avatar Mar 31 '25 11:03 sschlein

When php wasnt installed it showed a spinner in the settings page. I had access to the internet.

PrimalMinister avatar Mar 31 '25 11:03 PrimalMinister

If it shows the spinner and no buttons to install PHP, a firewall or anti virus software is blocking Herd from reaching our API and downloading the versions.

sschlein avatar Mar 31 '25 11:03 sschlein

Its working now but when i try to download a different version of PHP it says error, aborted. Ive disabled windows firewall and its still the same.

PrimalMinister avatar Mar 31 '25 11:03 PrimalMinister

Can you have a look if there are any debug logs?

https://herd.laravel.com/docs/windows/troubleshooting/common-issues#herd-debug-logs

sschlein avatar Mar 31 '25 12:03 sschlein

Do you want me to post the logs in here?

PrimalMinister avatar Mar 31 '25 14:03 PrimalMinister

There shouldn't be any sensitive details in them but you can also share it via [email protected]

sschlein avatar Mar 31 '25 14:03 sschlein

The main issues from your log are:

[2025-03-28 07:36:29.386] [error] Failed to fetch the latest version: getaddrinfo ENOTFOUND [herdphp.com](http://herdphp.com/)
...
[2025-03-31 12:47:39.882] [info] Downloading https://download.herdphp.com/8.3/php83-win.zip to C:\Users\simon\AppData\Local\Temp\php-8.3.zip
[2025-03-31 12:47:39.882] [info] Total length: 32187025
[2025-03-31 12:47:45.074] [error] Error downloading file: Error: aborted
at connResetException (node:internal/errors:720:14)
at TLSSocket.socketCloseListener (node:_http_client:461:19)
at TLSSocket.emit (node:events:529:35)
at node:net:350:12
at TCP.done (node:_tls_wrap:614:7)

The call to the API seems to work fine, otherwise Herd wouldn't know about the downloads. Can you access https://download.herdphp.com/8.3/php83-win.zip from your browser? https://herdphp.com itself should just redirect you to https://herd.laravel.com.

Can you ping herdphp.com and download.herdphp.com?

sschlein avatar Mar 31 '25 14:03 sschlein

I can access the zip and herdphp.com redirects correctly.

PrimalMinister avatar Mar 31 '25 14:03 PrimalMinister

Do you use any proxy server on your computer? As the error message indicates, the download gets aborted for some reason.

mpociot avatar Apr 07 '25 20:04 mpociot

I updated to the latest version but its still not working, Im not using a proxy server, Im tethering my computer from my mobile. But I don't have a problem downloading other stuff. The node part seems to be working, I downloaded an older version today, its just the PHP downloads. Does me installing my own PHP have any consequence? To get it working, I copied a standard PHP download for windows to the herd bin folder.

PrimalMinister avatar Apr 07 '25 20:04 PrimalMinister

I removed the php install, now its just hanging with a couple of dots moving by.

PrimalMinister avatar Apr 07 '25 20:04 PrimalMinister

If you are on your tethering connection, is there a possiibility that you need to allow Herd to use this connection? That would explain why the downloads work in your browser.

My Mac runs an app where I have to allow connections when being connected through my mobile so that I can make sure it's not downloading 100gb worth of updates while I am on the go and consuming all my data.

sschlein avatar Apr 08 '25 07:04 sschlein

There is nothing im aware of that would restrict my downloading, as I say I can download node versions just not PHP so herd can download stuff.

PrimalMinister avatar Apr 08 '25 10:04 PrimalMinister

There's a technical difference: Node gets downloaded via nvm, so Herd is executing terminal commands to install NVM and Node but it uses the Herd app directly to download and extract PHP.

sschlein avatar Apr 08 '25 10:04 sschlein

At present, Ive removed the manually installed PHP. Now, the PHP tab is just hanging with a couple of circles passing by. I tried downloading the version of PHP from the herd website and installing it, no change, the PHP page is still hanging with a couple of circles passing by, it does show that PHP 8.3 is installed and PHP does work in the dashboard.

On a side not, since updating to the latest version my sites are no longer working, I just get a standard apache index page or 404 not found when viewing in the browser.

PrimalMinister avatar Apr 08 '25 11:04 PrimalMinister

If you are getting an Apache index page, that's not from Herd and there is a second development environment messing with Herd.

The moving dots as a loading indicator is definitely network related, the error in your log [2025-03-28 07:36:29.386] [error] Failed to fetch the latest version: getaddrinfo ENOTFOUND [herdphp.com](http://herdphp.com/) indicates that.

Is there a chance to try a different connection, not from your mobile?

sschlein avatar Apr 08 '25 11:04 sschlein

I dont have another connection im afraid.

PrimalMinister avatar Apr 08 '25 11:04 PrimalMinister

Can you confirm that you see an Apache and not nginx error page?

Are there any apps settings on your machine that could "manage" connections from apps? VPN, Proxy, Firewall, Anti Virus, etc

sschlein avatar Apr 08 '25 11:04 sschlein

The only thing I have is the standard windows firewall and Ive made sure that herd has access to the internet.

It gives an nginx 404 error if I try to go to a page.

PrimalMinister avatar Apr 08 '25 11:04 PrimalMinister

I'm also experiencing this issue - unable to download PHP via mobile tethering through Herd, but can download it using the URL in my browser.

hwalker928 avatar Apr 28 '25 09:04 hwalker928

I have no Windows device with tethering options available at the moment but have you checked these settings?

https://www.pcworld.com/article/436653/how-to-limit-your-pcs-data-use-while-tethering.html

That seems to be a common pattern and not directly Herd related.

sschlein avatar Apr 28 '25 09:04 sschlein

The network is set as an unmetered connection.

Here are the logs from Herd when attempting to download PHP 8.4:

[2025-04-28 10:36:45.729] [info]  Downloading PHP 8.4 (8.4.6) from https://download.herdphp.com/8.4/php84-win.zip to C:\Users\x\AppData\Local\Temp\php-8.4.zip
[2025-04-28 10:36:46.183] [info]  Downloading https://download.herdphp.com/8.4/php84-win.zip to C:\Users\x\AppData\Local\Temp\php-8.4.zip
[2025-04-28 10:36:46.186] [info]  Total length: 33776109
[2025-04-28 10:36:50.732] [error] Error downloading file: Error: aborted
    at connResetException (node:internal/errors:720:14)
    at TLSSocket.socketCloseListener (node:_http_client:461:19)
    at TLSSocket.emit (node:events:529:35)
    at node:net:350:12
    at TCP.done (node:_tls_wrap:614:7)
[2025-04-28 10:36:50.770] [info]  [
  {
    updating: false,
    installed: false,
    version: '8.4',
    versionNumber: 8.4,
    completeVersion: '',
    internalVersion: 0,
    latestVersionCacheDurationInMinutes: 5
  }
]
[2025-04-28 10:36:50.783] [info]  Service PHP-8.4 is running…restarting it
[2025-04-28 10:36:50.783] [info]  No process found for PHP-8.4

hwalker928 avatar Apr 28 '25 09:04 hwalker928

Can you try again with the latest version? We've changed the network library in Herd and so this may have an effect.

sschlein avatar May 30 '25 09:05 sschlein

Mine is now downloading php.

PrimalMinister avatar May 30 '25 12:05 PrimalMinister