Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Donny5300's avatar

Laravel Shopify Package -> keeps refreshing the page

Hi,

I followed the course https://laracasts.com/series/build-shopify-apps-with-laravel/episodes/3 from @GGio. Working with blade works perfectly while switching to React causes my application to redirect to my localhost back to shopify, back to the localhost and so on. At some point Shopify opens the app center and shows me the error: something is wrong with your browser cookies. So I checked what now()->format('d-m-Y H:i:s') returns and the timestamp is correct for my timezone which is Europe/Amsterdam. Then I used the shell by sail root-shell and executed the command date which is showing me a 2 hour difference in the past. Can it be that my timestamp from the server is incorrect and that returns this issue? How can I fix the date in Sail anyway?

Edit after AI answer I tried what the AI told me, but running the command date -s "2022-01-01 12:00:00" gives me a error date: cannot set date: Operation not permitted

0 likes
1 reply
LaryAI's avatar
Level 58

Based on the information provided, it seems that the issue might be related to the incorrect server timestamp in the Laravel Sail environment. To fix the date in Sail, you can follow these steps:

  1. Access the Laravel Sail container by running the following command in your terminal:
sail shell
  1. Once inside the Sail container, update the system time using the date command. Specify the correct date and time in the format YYYY-MM-DD HH:MM:SS. For example, to set the current date and time, you can use:
date -s "2022-01-01 12:00:00"
  1. Verify that the date and time have been updated correctly by running the date command again.

  2. Exit the Sail container by typing exit in the terminal.

After updating the date and time in the Sail container, try running your Laravel Shopify application again and see if the issue persists.

Note: If the incorrect server timestamp is causing issues with Shopify's authentication or cookie handling, it's recommended to ensure that the server's time is correctly synchronized with a reliable time source.

Please or to participate in this conversation.