qb-weathersync icon indicating copy to clipboard operation
qb-weathersync copied to clipboard

"Failed to retrieve real time from API, falling back to local time"

Open 7D7-Development opened this issue 1 year ago • 7 comments

Describe the bug The script is failing to get the time from the API.

To Reproduce Steps to reproduce the behavior:

  1. Make RealTimeSync true in config.
  2. Start or Restart server.
  3. Check Server Console.

Expected behavior Real time should be synced from API and not have to fall back to local.

Screenshots image

Questions (please complete the following information):

  • When you last updated: Fresh install of latest release.
  • Are you using custom resource? All default from a fresh qb-core install.
  • Have you renamed qb- to something custom? No.

Additional context This issue is here: image Should be "https://".

EDIT: After more testing, and changing this to https I found that the error would still occur at random, just not after every restart, as in the results before the change.

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. The fix is in pull requests.

7D7-Development avatar Sep 07 '24 13:09 7D7-Development

I have still the same error in log "Failed to retrieve real time from API, falling back to local time".

How can we solve this issue?

fatihlimitless avatar Nov 03 '24 22:11 fatihlimitless

I have still the same error in log "Failed to retrieve real time from API, falling back to local time".

How can we solve this issue?

I put in a pull request, the fix is there.

7D7-Development avatar Nov 03 '24 22:11 7D7-Development

Think the API is full on fail!

BadCodePT avatar Nov 04 '24 22:11 BadCodePT

Think the API is full on fail!

Do you have any ideas for a alternative?

fatihlimitless avatar Nov 04 '24 23:11 fatihlimitless

I can confirm the same problem, the API doesn't seem very stable and doesn't work from time to time. I haven't checked yet what happens for the player if the API dies but an alternative API would be welcome.

MinischnuffiLP avatar Nov 25 '24 22:11 MinischnuffiLP

Will this ever be fixed or nah? Been up for a long time now.

EvoPlan-Dev avatar Jan 28 '25 23:01 EvoPlan-Dev

The fix is in the pull requests, just awaiting approval.

You can manually make the changes that are shown here: https://github.com/qbcore-framework/qb-weathersync/pull/84/files

7D7-Development avatar Jan 30 '25 00:01 7D7-Development