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

React Native 0.47.2 timeout issues #267

Closed
SMJ93 opened this issue Sep 7, 2017 · 6 comments
Closed

React Native 0.47.2 timeout issues #267

SMJ93 opened this issue Sep 7, 2017 · 6 comments

Comments

@SMJ93
Copy link
Contributor

SMJ93 commented Sep 7, 2017

Description

We spiked detox a couple of months ago on:

  • React Native: 0.45
  • Detox: 5.3.0
  • Jest: 20.0.4

Everything worked as expected.

We have now upgraded to React Native 0.47.2, but detox doesn't seem to be working. We have followed the getting started guide multiple times with different versions of detox with both mocha and jest:

5.6.0+ hangs on the white screen - this is a known issue

< 5.5.1 throws a timeout error - The app launches on the simulator as expected, but then hangs until the tests time out in both Release and Debug mode:

** BUILD SUCCEEDED **

 server listening on localhost:60174...
 : Listing devices...
 evice B6EEA117-5538-4EF0-8AB9-33B53FB4CD9D is already booted
 : Uninstalling com.app.ios.dev...
 : com.app.ios.dev uninstalled
4: Installing /Users/stuartjones/Documents/applications/apps/product-mobile/i s/build/Build/Products/Release-iphonesimulator/Devlyfe.app...
4: /Users/stuartjones/Documents/applications/apps/product-mobile/ios/build/Bu ld/Products/Release-iphonesimulator/Devlyfe.app installed
 : Terminating com.app.ios.dev...
 : com.app.ios.dev terminated
 : Launching com.app.ios.dev...
6: com.app.ios.dev launched. The stdout and stderr logs were recreated, you can watch them with:
        tail -F $HOME/Library/Developer/CoreSimulator/Devices/B6BEA117-5538-4EF0-8BB9-33B53FB4CD9D/data/tmp/detox.last_launch_app_log.{out,err}
 FAIL  __e2e__/index.spec.js (369.577s)
  ● App › Should show menu

    Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.

      at pTimeout (node_modules/jest-jasmine2/build/queueRunner.js:53:21)
      at ontimeout (timers.js:488:11)
      at tryOnTimeout (timers.js:323:5)
      at Timer.listOnTimeout (timers.js:283:5)

  ● App › Open menu

    Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.

      at pTimeout (node_modules/jest-jasmine2/build/queueRunner.js:53:21)
      at ontimeout (timers.js:488:11)
      at tryOnTimeout (timers.js:323:5)
      at Timer.listOnTimeout (timers.js:283:5)

  App
    ✕ Should show menu (120525ms)
    ✕ Open menu (120388ms)

Test Suites: 1 failed, 1 total
Tests:       2 failed, 2 total
Snapshots:   0 total
Time:        369.899s
Ran all test suites matching "__e2e__".

When running tail -F Library/Developer/CoreSimulator/Devices/B6BEA117-5538-4EF0-8BB9-33B53FB4CD9D/data/tmp/detox.last_launch_app_log.err the log shows:

2017-09-07 16:09:58.262 Devlyfe[2561:1216693] ☣️ Adding idling resource for queue: <OS_dispatch_queue: com.facebook.react.KeyboardObserverQueue[0x6100000f3400]>
2017-09-07 16:09:58.278 Devlyfe[2561:1216693] ☣️ DETOX:: Ignoring timer: 38 failure reason: "duration>1.5"
2017-09-07 16:09:58.285 Devlyfe[2561:1216693] ☣️ Adding idling resource for queue: <OS_dispatch_queue: com.facebook.react.NetworkingQueue[0x6180000f3f00]>
2017-09-07 16:09:58.286 Devlyfe[2561:1216693] ☣️ DETOX:: Removing observed timer 1
2017-09-07 16:09:58.286 Devlyfe[2561:1216668] ☣️ Adding idling resource for queue: <OS_dispatch_queue: com.facebook.react.ImageStoreManagerQueue[0x6080000f0d00]>
2017-09-07 16:09:58.286 Devlyfe[2561:1216668] ☣️ Adding idling resource for queue: <OS_dispatch_queue: com.facebook.react.FileRequestHandlerQueue[0x6080000f0180]>
2017-09-07 16:09:58.286 Devlyfe[2561:1216668] ☣️ Adding idling resource for queue: <OS_dispatch_queue: com.facebook.react.DataRequestHandlerQueue[0x6080000ef780]>
2017-09-07 16:09:58.287 Devlyfe[2561:1216668] ☣️ Adding idling resource for queue: <OS_dispatch_queue: com.facebook.react.HTTPRequestHandlerQueue[0x6000000f4580]>
2017-09-07 16:09:58.371 Devlyfe[2561:1201502] ☣️ DETOX:: Detox Action Sent: ready
2017-09-07 16:09:58.448 Devlyfe[2561:1201502] ☣️ DETOX:: Detox Action Received: invoke

Steps to Reproduce

  • Create a react native project version 0.47.2
  • Install and run detox using the getting started guide

Node, Device, Xcode and macOS Versions

  • Node: 8.1.0
  • Device: iPhone 6 iOS 10.3
  • Xcode: 8.3.3
  • macOS: 10.12.6

Any help would be greatly appreciated. We have spent days trying to debug this, but keep going round in circles.

@LeoNatan
Copy link
Contributor

LeoNatan commented Sep 8, 2017

React Native changed implementation to the C++ bridge in 0.45, and synchronization broke. We fixed that in 5.6.1. So using a modern (0.45.0+) RN with an old build is not supported. I will close this issue as it cannot be meaningfully debugged. Instead, we should focus on fixing #155.

@LeoNatan LeoNatan closed this as completed Sep 8, 2017
@LeoNatan LeoNatan added invalid and removed invalid labels Sep 8, 2017
@LeoNatan
Copy link
Contributor

LeoNatan commented Sep 8, 2017

Hm, I'm actually mistaken. The improvement was done in 5.2.0.
I have not tested yet Detox with 0.47.2, so there may have been introduced new issues. Let's keep the issue open.

@LeoNatan LeoNatan reopened this Sep 8, 2017
@LeoNatan LeoNatan changed the title Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL. React Native 0.47.2 timeout issues Sep 8, 2017
@heuism
Copy link

heuism commented Sep 26, 2017

I guess the app is terminated like what i have ran into and refers to #279 as well

@LeoNatan
Copy link
Contributor

@Kureev If you enable synchronization debug, what do you see?

@Kureev
Copy link
Contributor

Kureev commented Oct 11, 2017

@LeoNatan sure thing, I can take care if you elaborate what "synchronization debug" means :)

@SMJ93
Copy link
Contributor Author

SMJ93 commented Oct 11, 2017

I think this is related to issue #270 so I will close for the time being.

@SMJ93 SMJ93 closed this as completed Oct 11, 2017
@wix wix locked and limited conversation to collaborators Jul 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants