-
Notifications
You must be signed in to change notification settings - Fork 34
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
»Another user has updated this resource…« in production environment #601
Comments
Since we can't recreate this, it is probably a system / server clock issue. Do you have a way to reliably recreate it on our end? |
In case someone stumbles on this: Our AWS EC2 instance had an incorrect time setting (3 minutes in the future). We configured
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/set-time.html#configure_ntp |
I have the same issue on a shared hosting for one of our small projects, and this is not a possible solution for us. As Nova is targeting small to medium projects, there might be some other people like us who have the same issue and don't want to pay to buy a dedicated server, VPS, VM with root access or use public cloud providers due to the price. Does that mean even if either server or the client's clock is a few seconds incorrect they cannot update any resource? |
I had a similar issue and for me the error was on wrong timezone set in config/app.php. I had to change it form UTC to my own timezone. ` /*
|
Thanks @bernhardh for your feedback. I have the right timezone in the config file:
But as far as I check the value for A temporary solution would be to manually add the difference, like this:
The problem is that I have to update this value every now and then to make sure it works with the new time difference. |
We cannot seem to get rid of this. Could it be avoided when working with just one user, to omit the problem for our specific development? (We are using Digital Ocean / Forge) |
I had the same issue, and It looks like the _retrieved_at timestamp is based on the time on your computer. I reproduced this problem by adjusting the local time on my mac. The servertime was one minute off from my local time which caused the issue. It seems to me that this will cause problems everywhere. Shouldn't the _retrieved_at time not also be server-based? |
This is happening when I wait little bit then press update. If I quickly click update within 3-4 seconds, then it updates without any problem. This is a severe issue for us as it significantly slows down our daily business. Need a fix ASAP. |
We ended up having our office computers synced to a more reliable world clock. |
Why is this issue closed? Not being able to reproduce does not mean there's no issue. Checking the updated date seems pretty odd to me. Documentation on this is quite lacking ( https://nova.laravel.com/docs/2.0/resources/#preventing-conflicts ) Thanks. |
@pleone agree |
We had to bypass this (completely broken) functionality with a custom middleware in all our Nova installations: #1082 (comment) |
Yea, fix would be great.. |
@Jaspur this is fixed. |
@jbrooksuk which release? I'm on the latest version and it still occurred |
You need to disable Traffic Cop... |
Hmm, it is in the docs, but not visual? :') https://www.dropbox.com/s/bqnqhobmoxvmqzt/Schermafdruk%202019-12-05%2010.06.07.png?dl=0 |
@jbrooksuk @krns @pehbehbeh @Jaspur @pehbehbeh I think I have a workaround. It looks like this is related to bad time sync on the computer. I've forced some users to update the configuration, and it looks like the problem is solved on their side. What I think is that servers are synced by ntp, and have correct timestamps. When the browser uses a function to generate current timestamp, it differs from the server when sending the request, so Trafic Cop is warning us. |
@Rikless this is indeed usually the solution and something I'll add to the documentation now. |
public static $trafficCop=true; You may also override the trafficCop method on the resource |
I'm getting this with Laravel 6.9 and Nova 2.9.2. It can't be a clock sync issue because it also happens when running locally with |
You can disable this https://nova.laravel.com/docs/2.0/resources/#disabling-traffic-cop |
Sorry but we cannot disable this feature, and "Just disable it" does not sounds like a solution to me. |
I suggest for Nova developers to show confirmation dialog such as "Another user has updated this resource... Are you sure want to save your changes? Yes, No". When people follow the recommendation "Please refresh the page and try again" they may be discouraged because of losing their changes and valuable time. |
Possible solution to this that worked for me that involves fixing the timezone on MySQL to match what is in the Laravel app. |
In our production environment a normal interaction with nova looks like the following screenshot.
(German translation for
Another user has updated this resource since this page was loaded. Please refresh the page and try again.
)The
updated_at
timestamp is always one second ahead of the_retrieved_at
timestamp.Maybe related to #408 and #236
The text was updated successfully, but these errors were encountered: