Skip to content
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

Timers are unreliable (firing too fast) when Dev Tools are open #22620

Closed
3 tasks done
dzek69 opened this issue Dec 12, 2018 · 5 comments
Closed
3 tasks done

Timers are unreliable (firing too fast) when Dev Tools are open #22620

dzek69 opened this issue Dec 12, 2018 · 5 comments
Labels
Bug Debugger Issues related to React Native DevTools or legacy JavaScript/Hermes debugging Issue: Author Provided Repro This issue can be reproduced in Snack or an attached project. JavaScript Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@dzek69
Copy link

dzek69 commented Dec 12, 2018

Environment

  React Native Environment Info:
    System:
      OS: Windows 10
      CPU: (8) ia32 Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
      Memory: 2.97 GB / 15.89 GB
    Binaries:
      Node: 11.2.0 - C:\nodejs\node.EXE
      Yarn: 1.12.3 - C:\Apps\Yarn\bin\yarn.CMD
      npm: 6.4.1 - C:\nodejs\npm.CMD
    IDEs:
      Android Studio: Version  3.2.0.0 AI-181.5540.7.32.5056338

Description

The same thing as here: #14639
Timers (both intervals and timeouts) are firing too fast, looks like they're dividing the time value by some factor.

Reproducible Demo

const start = Date.now();
console.log("start")
const fn = () => {
    console.log("end", Date.now() - start);
}

Simple setTimeout(fn, 5000) usually calls the function in around 1 second, but can be even faster.
Closing Dev Tools solves the issue.

#14639 seems to be wrongly closed by bot or there is an regression.

@hramos hramos added JavaScript Issue: Author Provided Repro This issue can be reproduced in Snack or an attached project. Debugger Issues related to React Native DevTools or legacy JavaScript/Hermes debugging labels Dec 12, 2018
@konradkierus
Copy link

I'm having exactly the same issue but on Ubuntu and RN in version 0.57.5 - just for the info because if's different version of RN and system than the author.

@dzek69
Copy link
Author

dzek69 commented Jan 27, 2019

This is probably what causes #4944 (which is incorrectly closed or if it really was fixed then it should be reopened or something)

@ninofiliu
Copy link

I've got a similar issue SO link. #14639 was definitely wrongly closed. This issue needs to be resolved. Apps can't be built if basic time management functions don't work 😒

@stale
Copy link

stale bot commented Aug 4, 2019

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Aug 4, 2019
@stale
Copy link

stale bot commented Aug 11, 2019

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

@stale stale bot closed this as completed Aug 11, 2019
@facebook facebook locked as resolved and limited conversation to collaborators Aug 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Debugger Issues related to React Native DevTools or legacy JavaScript/Hermes debugging Issue: Author Provided Repro This issue can be reproduced in Snack or an attached project. JavaScript Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

5 participants