-
-
Notifications
You must be signed in to change notification settings - Fork 765
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
Timestamp for this request was 1000ms ahead of the server's time."} (4 failures in a row) #1883
Comments
Hi @nathanp83 |
Hi @valouvaliavlo |
Hi @nathanp83 ! |
Hi GuillaumeDSM I tried that method before installing NetTime and had no luck. Trying again and the results:: More help is available by typing NET HELPMSG 3521. PS C:\WINDOWS\system32> net start w32time PS C:\WINDOWS\system32> w32tm /resync PS C:\WINDOWS\system32> |
Have you test to do it from Windows GUI ? |
I am sorry, I don't understand your question. |
Can you test to manually set a date in the past then sync it ? |
From Binance.us troubleshooting this issue: Is this possible? |
There is no option fo recvWindow in OctoBot for now. |
Can you try this : if still don't work : |
Upgraded to Version 0.4.3 and observe the same issue. Tried both changes. |
Same issue in Docker on Mac OS( |
Synching your Mac clock should fix the issue |
Clock synchronization did not help. |
I created a Python script that updates the system time every 15 minutes. This should solve the delay problem. UpdateSysTime.pyimport ctypes
import os
import sys
import time
def run_as_admin(argv=None, debug=False):
shell32 = ctypes.windll.shell32
if argv is None and shell32.IsUserAnAdmin():
return True
if argv is None:
argv = sys.argv
if hasattr(sys, '_MEIPASS'):
arguments = argv[1:]
else:
arguments = argv
argument_line = ' '.join(arguments)
executable = sys.executable
if debug:
print('Command line: ', executable, argument_line)
ret = shell32.ShellExecuteW(None, "runas", executable, argument_line, None, 1)
if int(ret) <= 32:
return False
return None
if __name__ == '__main__':
ret = run_as_admin()
if ret is True:
print(f'Success(ret={ret}): admin.')
os.system('net stop w32time')
os.system('net start w32time')
try:
loop = True
while loop:
try:
os.system('w32tm /resync')
os.system('w32tm /query /status')
time.sleep(60 * 15)
except KeyboardInterrupt:
while True:
r = input('Exit program? [y/n]')
if r.lower() == 'y':
loop = False
break
elif r.lower() == 'n':
break
except:
pass
elif ret is None:
print(f'Error(ret={ret}): not admin.')
This script can be combined with the launch of Octobot. OctobotLaunch.pyimport ctypes
import os
import subprocess
import sys
import time
def run_as_admin(argv=None, debug=False):
shell32 = ctypes.windll.shell32
if argv is None and shell32.IsUserAnAdmin():
return True
if argv is None:
argv = sys.argv
if hasattr(sys, '_MEIPASS'):
arguments = argv[1:]
else:
arguments = argv
argument_line = ' '.join(arguments)
executable = sys.executable
if debug:
print('Command line: ', executable, argument_line)
ret = shell32.ShellExecuteW(None, "runas", executable, argument_line, None, 1)
if int(ret) <= 32:
return False
return None
if __name__ == '__main__':
ret = run_as_admin()
if ret is True:
print(f'Success(ret={ret}): admin.')
process = subprocess.Popen(["./OctoBot_windows_x64.exe"], stdin=subprocess.PIPE)
print(f"PID: {process.pid}")
os.system('net stop w32time')
os.system('net start w32time')
try:
loop = True
while loop:
try:
os.system('w32tm /resync')
os.system('w32tm /query /status')
time.sleep(60 * 15)
except KeyboardInterrupt:
while True:
r = input('Exit program? [y/n]')
if r.lower() == 'y':
loop = False
process.terminate()
break
elif r.lower() == 'n':
break
except:
process.terminate()
print('Process terminated')
elif ret is None:
print(f'Error(ret={ret}): not admin.')
</details>
Thus, Octobot will be launched, and the system time will be updated every 15 minutes. |
Step 1: Have you searched for this issue before posting it?
Yes
Step 2: Describe your environment
python -V
)git log --format="%H" -n 1
)Step 3: Describe the problem:
Describe the bug
Failed to run job action, exception: InvalidNonce: binanceus {"code":-1021,"msg":"Timestamp for this request was 1000ms ahead of the server's time."} (4 failures in a row) (InvalidNonce)
Expected behavior
Should be no timestamp issues with using the suggested "Network Time" application.
Steps to reproduce:
Observed Results:
Timestamp for this request was 1000ms ahead of servers time
In previous version of software, this never happened.
Relevant code exceptions or logs:
If applicable, add screenshots to help explain your problem.
The text was updated successfully, but these errors were encountered: