Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clockwork Chrome Plugin Does Not Work with Docker (Lando) #634

Open
lukastom opened this issue May 27, 2023 · 4 comments
Open

Clockwork Chrome Plugin Does Not Work with Docker (Lando) #634

lukastom opened this issue May 27, 2023 · 4 comments

Comments

@lukastom
Copy link

lukastom commented May 27, 2023

I am using Lando for development (it is just an abstraction layer for Docker with docker-compose) on Linux Mint 21.1. In Lando/Docker containers, I have my Laravel project. I installed Clockwork via composer into my project, installed the Clockwork plugin in my Edge browser.

But it does not work in DevTools on the page of my Laravel project (e.g. https://laravel-blog.lndo.site/ in my case). So, I went to the Edge plugin settings and try to map the "Code path" like this:

  1. /app/blog/
  2. /home/lukas/Sites/Laravel-Blog/blog/

where 1. is the path in the container (in Docker that would typically be /var/www/html/, in Lando the apps sits in /app/ and 2. is the local path. Both paths are the folder, where is my Laravel app installed.
Please, would someone know how to set it? Or how can I get any error or debugging information so I can find what the error is?

EDIT: I just did some other work for like 15 minutes, than went back and simply refreshed the page and the Edge plugin started to work. The problem is that I have no idea why, I did not do anything. Is there any lag or some cache got flushed or what?

@lukastom lukastom changed the title Clockwork Does Not Work on Docker (Lando) Clockwork Chrome Plugin Does Not Work with Docker (Lando) May 27, 2023
@itsgoingd
Copy link
Owner

Hey, it should just work, with no additional Docker-specific setup required.

The "Code path" setting is only used for generating correct links for your text-editor in backtraces, it's entirely optional.

@Braunson
Copy link

Braunson commented Aug 8, 2023

I had this issue as well using Docker. The frontend is served on localhost:3000 and the Chrome plugin seems to see the calls to the backend but it forever shows "waiting" even though the call has been successfully returned (confirmed in the Network tab). Though if I go to the /clockwork endpoint it shows the calls (sometimes). Very weird.

@JacquesvanWyk
Copy link

I have same issue with DDEV. I also initially though the path in settings is issue but reading the comments seems now its just for code editor.
Now sure how to debug

@webmasterjedi
Copy link

I was having this issue on DDEV and while troubleshooting I found this thread. I went back and decided to try a few things when I noticed this in a comment when publishing the clockwork.php config file via artisan: "Clockwork only runs on localhost, *.local, *.test and *.wip domains."
I also noticed here: https://underground.works/clockwork/#docs-collected-data "Clockwork is only active when your app is in debug mode and running on a local domain - localhost, .local, .test, .wip and 127.0.0.1 - by default. "
Also in the 5.2 changelog: "Running Clockwork is now restricted to local domains - localhost, local, test, wip and 127.0.0.1 - unless explicitly enabled. If you want to use Clockwork on a different domain, please explicitly enable it by setting CLOCKWORK_ENABLE to true."

Since DDEV and Lando use a different URL when developing I decided to explicitly set CLOCKWORK_ENABLE=true in my .env and it fixed the issue for me.
I believe the fix here is adjust lando/ddev to use a .local/test/wip TLD or just set the environment flag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants