Skip to content

E2E Github Action is flaky #4058

Closed

Description

@mikehardy

This is a tracking issue for a work effort I intend to undertake personally

I will greatly appreciate any collaboration with anyone that has thoughts or help to offer, so feel free to chime in!

Observation: The E2E android test fails frequently, unknown root cause

Recent example:

detox[4758] INFO:  [DetoxServer.js] server listening on localhost:49713...
detox[4758] ERROR: [exec.js/EXEC_FAIL, #23] ""/Users/runner/Library/Android/sdk/platform-tools/adb" -s emulator-5554 shell "ps | grep \"com\.invertase\.testing$\""" failed with code = 1, stdout and stderr:

detox[4758] ERROR: [exec.js/EXEC_FAIL, #23] 
detox[4758] ERROR: [exec.js/EXEC_FAIL, #23] 
  1) "before all" hook in "{root}"
detox[4758] INFO:  at e2e/init.js:53:11 
  ✨ Tests Complete ✨ 
detox[4758] ERROR: at internal/process/warning.js:25:20 
 (node:4758) UnhandledPromiseRejectionWarning: DetoxRuntimeError: Failed to run application on the device

I have noticed that it fails sometimes locally as well, unknown cause.

I'd like to figure out exactly why.

Initial Thoughts:

  • reproduce locally, fix (ideally)
  • Removing the jet dependency (and possibly using cavy.app) is a stretch goal

Activity

  1. self-assigned this
    on Aug 6, 2020
  2. mikehardy commented on Aug 8, 2020

    @mikehardy
    Author
  3. mikehardy commented on Aug 11, 2020

    @mikehardy
    Author
  4. mikehardy commented on Aug 12, 2020

    @mikehardy
    Author
  5. mikehardy commented on Aug 12, 2020

    @mikehardy
    CollaboratorAuthor

    initial ADB logs containing extra info show something that seems racy in the app/detox-testee side react native context bringup + websocket init

    This could use some upstream attention, but we can at least hack out the synchronization now

    1. Detox has no way to turn off synchronization in Android, and it should (can hang on UIManager and Timers)
    2. React Native has UIManager issues where the queue never empties
  6. mikehardy commented on Aug 13, 2020

    @mikehardy
    Author
  7. mikehardy commented on Aug 13, 2020

    @mikehardy
    Author
  8. mikehardy commented on Aug 13, 2020

    @mikehardy
    Author
  9. mikehardy commented on Aug 13, 2020

    @mikehardy
    Author
  10. mikehardy commented on Aug 14, 2020

    @mikehardy
    Author
  11. mikehardy commented on Aug 14, 2020

    @mikehardy
    Author
  12. mikehardy commented on Aug 14, 2020

    @mikehardy
    Author
  13. mikehardy commented on Aug 15, 2020

    @mikehardy
    CollaboratorAuthor

    Not sure what step detox was on yet but it failed once on android with a device log of:

    08-14 19:32:49.164 1906 4879 W ActivityManager: Invalid packageName: com.invertase.testing

    As if the adb push / adb install failed? Not sure how often that happens, but those steps should be re-tryable - really everything should be retried via full emulator destruction up until the application logs in

    Solve with https://github.com/wix/Detox/blob/master/docs/APIRef.Configuration.md#behavior-configuration reinstallapp: false in detox config and do a retry-able install first

  14. 27 remaining items

  15. mikehardy commented on Mar 8, 2021

    @mikehardy
    CollaboratorAuthor
    
      1) auth()
           onAuthStateChanged()
             calls callback with the current user and when auth state changes:
         expected 'spy' to be called twice but was called thrice
    
  16. mikehardy commented on Mar 9, 2021

    @mikehardy
    CollaboratorAuthor
    
      1) auth()
           "before all" hook in "auth()":
         NativeFirebaseError: [auth/unknown] An internal error has occurred. [ unexpected end of stream on com.android.okhttp.Address@c2602640 ]
    
  17. mikehardy commented on Mar 13, 2021

    @mikehardy
    Author
  18. mikehardy commented on Mar 16, 2021

    @mikehardy
    Author
  19. mikehardy commented on Apr 9, 2021

    @mikehardy
    Author
  20. mikehardy commented on May 10, 2021

    @mikehardy
    Author
  21. mikehardy commented on Jun 16, 2021

    @mikehardy
    Author
  22. changed the title [-]Android E2E Github Action is flaky[/-] [+]E2E Github Action is flaky[/+] on Jul 7, 2021
  23. mikehardy commented on Sep 30, 2021

    @mikehardy
    CollaboratorAuthor

    It appears Detox v18 #5734 has added a new wrinkle on iOS with a native crash in DetoxSync

    
    The app has crashed, see the details below:
    
    Signal 11 was raised
    (
            0   Detox                               0x00000001104c5a15 +[NSThread(DetoxUtils) dtx_demangledCallStackSymbols] + 37
            1   Detox                               0x00000001104c8e10 __DTXHandleCrash + 464
            2   Detox                               0x00000001104c9555 __DTXHandleSignal + 59
            3   libsystem_platform.dylib            0x00007fff60335d7d _sigtramp + 29
            4   ???                                 0x00007f8fdf920050 0x0 + 140255907938384
            5   CoreFoundation                      0x0000000114170833 -[__NSDictionaryM dealloc] + 128
            6   libobjc.A.dylib                     0x0000000113f3b604 objc_object::sidetable_release(bool, bool) + 174
            7   libobjc.A.dylib                     0x0000000113f378ad _object_remove_assocations + 562
            8   libobjc.A.dylib                     0x0000000113f34c02 objc_destructInstance + 84
            9   libobjc.A.dylib                     0x0000000113f3ad88 -[NSObject dealloc] + 21
            10  libobjc.A.dylib                     0x0000000113f3b604 objc_object::sidetable_release(bool, bool) + 174
            11  CFNetwork                           0x0000000111038610 _CFNetworkHTTPConnectionCacheSetLimit + 162696
            12  CFNetwork                           0x0000000110e81183 CFNetwork + 24963
            13  DetoxSync                           0x0000000146cf0220 ____detox_sync_dispatch_wrapper_block_invoke + 23
            14  libdispatch.dylib                   0x00000001148c370d _dispatch_call_block_and_release + 12
            15  libdispatch.dylib                   0x00000001148c48df _dispatch_client_callout + 8
            16  libdispatch.dylib                   0x00000001148cae15 _dispatch_lane_serial_drain + 715
            17  libdispatch.dylib                   0x00000001148cb9c3 _dispatch_lane_invoke + 455
            18  libdispatch.dylib                   0x00000001148d5f81 _dispatch_workloop_worker_thread + 772
            19  libsystem_pthread.dylib             0x00007fff6034045d _pthread_wqthread + 314
            20  libsystem_pthread.dylib             0x00007fff6033f42f start_wqthread + 15
    )
    
  24. github-actions commented on Dec 5, 2022

    @github-actions
    Contributor

    Hello 👋, to help manage issues we automatically close stale issues.

    This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?

    This issue will be closed in 15 days if no further activity occurs.

    Thank you for your contributions.

  25. added
    Type: StaleIssue has become stale - automatically added by Stale bot
    on Dec 5, 2022
  26. mikehardy commented on Dec 5, 2022

    @mikehardy
    CollaboratorAuthor

    Hasn't been flaky for a while!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Keep Openavoids the stale botType: StaleIssue has become stale - automatically added by Stale botType: TestingIssues or PRs relating to testing (the library or user code testing)Workflow: Needs ReviewPending feedback or review from a maintainer.tools: citype: bugNew bug report

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions