wp-local-docker-v2 icon indicating copy to clipboard operation
wp-local-docker-v2 copied to clipboard

Running 10updocker logs phpfpm results in "'trim' of undefined" error

Open tcmulder opened this issue 4 years ago • 2 comments

Describe the bug When I run 10updocker logs phpfpm I get an error, "Cannot read property 'trim' of undefined". I just recently switched from an old Intel mac to a new M1, not sure if that has anything to do with the bug (I doubt it) but it means I had to install 10updocker; I used to be able to see logs on my old Intel mac's install, but have always received this error on my new M1.

Steps to Reproduce

  1. Run 10updocker logs phpfpm in any running container.

Expected behavior On my Intel mac, the PHP error logs were output to the terminal. Also,

Environment information

  • Device: MacBook Pro M1
  • OS: MacOS 11.6
  • Docker Desktop version: 4.1.1
  • Browser and version: Chrome 94.0.4606.81
  • WordPress version: 5.8.1

Additional context Here's what appears in my console:

> 10updocker logs phpfpm
⠹ Checking available services...
Error : Cannot read property 'trim' of undefined

I don't know where logs would be stored, but when I check /var/log/php-fpm it's empty. I'm intentionally causing a 500 error, so something should be getting logged.

tcmulder avatar Oct 28 '21 22:10 tcmulder

Hey @tcmulder 👋

I did a bit of investigating and I believe this is related to https://github.com/PDMLab/docker-compose/issues/178

A work around for now could be to run docker-compose logs phpfpm to watch the logs the docker-compose native way.

Also you can use the docker desktop dashboard to look at the logs as well.

Let me know if you have any questions! Thanks!

tylercherpak avatar Nov 11 '21 17:11 tylercherpak

Thanks @tylercherpak , I'll just use the docker desktop dashboard for the time being.

tcmulder avatar Nov 13 '21 23:11 tcmulder