Error loading request metadata while using Docker with Alpine Linux, PHP, and NGINX and Chrome Extension
I have created a docker container with alpine linux and installed PHP and Nginx. The clockwork package is installed and enabled. I am sure it's working as it is creating JSON files in the storage/clockwork.
I am trying to view the profiler in the browser but that seems to be giving this error: Error loading request metadata. Server returned an invalid JSON.. The frontend is built on vue and served separately.
Please let me know how to get this to work. It works fine when I don't use a docker container as my server. Am I missing some dependencies?

It works perfectly fine when I open the route for clockwork. Just doesn't work while using the chrome extension
Hey, please try following - with Clockwork extension open go to chrome://extensions in a new tab. Select the Clockwork extension and you should see "background page" link under "inspect views".
Clicking on this link will open a dev tools window for the Clockwork extension itself and you should see the metadata requests in the network tab. Let me know what you find out.
Thank you for your reply. I understand the issue now! My frontend and backend servers are hosted on separate ports. I'm using VueJS in the frontend and devServer.proxy property to forward the requests to the backend.
The extension is making an XHR request to the port of the frontend server but appending the name of my application for some reason (obfuscated part in the screenshot). If it didn't do that the requests would be appropriately redirected to the backend. Alternatively, if it uses the port of the backend directly, that works fine too.

FYI, all my other requests use the correct path:

Oops, forgot to respond here. If your backend app is deployed in a subdirectory, that's where Clockwork will look for the data. If this is the case you should see an X-Clockwork-Path header on your api responses. You can unset this header to make Clockwork look for the metadata in the domain root.
Another way to use Clockwork with apis is to use the web UI. You can open http://your-api.dev/__clockwork and get access to requests from all client apps.
Got it. Thank you so much!