10up / wp-local-docker-v2

ARCHIVED: A simple Docker based development environment for WordPress.
MIT License
484 stars 81 forks source link

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

Open tcmulder opened 2 years ago

tcmulder commented 2 years ago

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

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.

tylercherpak commented 2 years ago

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!

tcmulder commented 2 years ago

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