It works finally after 5 hours of errors and it seems setInterval is changed and also you can run a function from there properly as you would :(