Skip to content

setTimeout and setInterval don't fire on Android RN 0.31 when attached to Chrome Debugger #9436

Closed

Description

@tslearn

setTimeout(() => console.log("#############", 1000);
setInterval(() => console.log("#############", 1000);
NetInfo.fetch().done(v => console.log(v));

not fire on android RN 0.31 but fire on RN 0.30

Env: Mac os 11.6

Activity

  1. changed the title [-]setTimeout setInterval not fire on Android[/-] [+]setTimeout setInterval not fire on Android RN 0.31[/+] on Aug 16, 2016
  2. satya164 commented on Aug 16, 2016

    @satya164
    Contributor

    Facing the same issue when I connect to chrome debugger.

  3. rigdern commented on Aug 16, 2016

    @rigdern
    Contributor

    Is this related to #9319?

  4. nihgwu commented on Aug 16, 2016

    @nihgwu
    Contributor

    what about #4470 , seems it's not a regression, but a knowing bug for quite a long time

  5. satya164 commented on Aug 16, 2016

    @satya164
    Contributor

    @nihgwu in this case it doesn't fire at all. I can reproduce this issue when I upgrade from RN 0.30. Haven't gotten the time to make a reproducible sample.

    @rigdern might be

  6. c-h- commented on Aug 17, 2016

    @c-h-

    Having same issue RN 31 while debugging with Chrome only

  7. satya164 commented on Aug 18, 2016

    @satya164
    Contributor

    Ok, successfully reproduced this with a new project.

    Steps to reproduce,

    • Init the project
    react-native init TimerBug
    cd TimerBug
    react-native run-android
    • Add the following to index.android.js
    setTimeout(() => console.warn('fired'), 10); // duration can be anything

    See YellowBox coming up

    • Connect to chrome debugger

    It never fires

    cc @bestander

  8. changed the title [-]setTimeout setInterval not fire on Android RN 0.31[/-] [+]setTimeout and setInterval don't fire on Android RN 0.31 when attached to Chrome Debugger[/+] on Aug 18, 2016
  9. mkonicek commented on Aug 20, 2016

    @mkonicek
    Contributor

    This might be related to the new bridge on Android and #9319 (AsyncStorage.getAllKey callback doesn't get called when debugging).

    I'll ping @cjhopman and @mhorowitz on fb@work messenger.

  10. lexs commented on Aug 23, 2016

    @lexs
    Contributor

    I found the problem and a fix should make it to the next release. We we're accidentally dropping all native calls made during loading of the JS bundle which causes the thing that was driving the queue to not be called.

  11. self-assigned this
    on Aug 23, 2016
  12. satya164 commented on Aug 23, 2016

    @satya164
    Contributor

    @lexs We can probably cherry-pick this to current release?

  13. lexs commented on Aug 24, 2016

    @lexs
    Contributor

    @satya164 Sure, commit is here: b4999fc
    Closing this issue now.

  14. 21 remaining items

  15. mhdizade commented on Sep 20, 2017

    @mhdizade

    I set the device time exactly with the debugger time and it works ;)

  16. Fr33maan commented on Oct 27, 2017

    @Fr33maan

    For whom guess how to update device time, use adb from a terminal:
    adb shell su root date $(date +%m%d%H%M%Y.%S)
    It was the solution for me, now events fire correctly

  17. jordanmkoncz commented on Jan 24, 2018

    @jordanmkoncz

    I had to also fully restart my Android Emulator after running the adb shell command for updating device time in order to get things working again when remote JS debugging is enabled.

  18. hstarorg commented on Feb 1, 2018

    @hstarorg

    Same issue in rn 0.52.1

  19. willbattel commented on Mar 11, 2018

    @willbattel

    Still getting this in 0.53.3.

  20. dhirendrarathod2000 commented on Mar 19, 2018

    @dhirendrarathod2000

    RN 0.53 Same issue
    For me it does not work on either

  21. lodi-g commented on Mar 19, 2018

    @lodi-g

    RN 0.54 ; getting this issue as well.

  22. srikanthkyatham commented on Apr 5, 2018

    @srikanthkyatham

    RN 0.53 android - I was able to resolve following the trick here
    https://stackoverflow.com/a/39304401/1177995

  23. isaachinman commented on Apr 22, 2018

    @isaachinman

    Experiencing this issue on v0.54.2. Any fixes?

  24. dgurns commented on May 3, 2018

    @dgurns

    Same here, v0.54.0

  25. dogofpavlov commented on May 7, 2018

    @dogofpavlov

    Got the same issue as well, just starting into ReactNative and discovering things like makes me cautious moving forward, this seems pretty basic.

  26. Sharcoux commented on May 12, 2018

    @Sharcoux

    Need to sync debugging computer with device. Execute on your computer:

    adb shell su root "date `date +%m%d%H%M%Y.%S`"
    
  27. locked as resolved and limited conversation to collaborators on May 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions