qbcore-framework / qb-weathersync

Weather System Used With QB-Core :sun_behind_rain_cloud:
GNU General Public License v3.0
23 stars 144 forks source link

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

Open 7D7-Development opened 2 months ago

7D7-Development commented 2 months ago

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):

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.

ayvaniniyisi commented 6 days ago

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?

7D7-Development commented 6 days ago

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.

BadCodePT commented 5 days ago

Think the API is full on fail!

ayvaniniyisi commented 4 days ago

Think the API is full on fail!

Do you have any ideas for a alternative?