-
Notifications
You must be signed in to change notification settings - Fork 146
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
Fix: "Failed to retrieve real time from API, falling back to local time" #84
base: main
Are you sure you want to change the base?
Conversation
Replaced http with https inside of retrieveTimeFromApi function.
Fix: "Failed to retrieve real time from API, falling back to local time"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reasonable fix, as API isn't loading real time, and re-loading local time.
After more testing, I found that the error would still occur at random, just not after every restart, as in the results before the change above. I added to the failedCount and Wait because it seems the actual deeper issue stems from the API that is being used, as it sometimes randomly can have a longer than usual delay to load the location and time information, here is where I did further testing to get the error to go away entirely:
|
…time" Added a longer wait and higher fail count.
…time" Removed extra wait time and added more to failedCount instead.
…time" Raised failedCount.
…time" Added more to failedCount and Wait.
…ack to local time" Cleaned up notes from testing.
Did you change http to https and also copy paste the above changes? I haven't seen this message again after making these changes, on multiple servers. |
So is this good to go? @7D7-Development |
Good to go brother. @GhzGarage |
I have still the error "Failed to retrieve real time from API.....etc" Why cant this problem not be solved? |
You must download the latest release then put in ALL of the above changes manually for this fix to work. @ayvaniniyisi |
But the point is that then the clock is taken from the API so that all players have the API clock and not the local time is accessed. Is that the case now? |
@ayvaniniyisi The intention is to use the API to get the time of the machine that the FiveM server is running on, then sync all clients to that time instead of the usual sped up time when NOT using this option in the config. After this PR is approved and pushed it will be fixed OR you can do the above changes as mentioned. |
Replaced http with https inside of retrieveTimeFromApi function.
Describe Pull request
This is to fix the error: "Failed to retrieve real time from API, falling back to local time"
#83
Questions (please complete the following information):