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

Layer animations pending on bitrise #3185

Closed
3 tasks done
dbilgin opened this issue Jan 21, 2022 · 8 comments
Closed
3 tasks done

Layer animations pending on bitrise #3185

dbilgin opened this issue Jan 21, 2022 · 8 comments

Comments

@dbilgin
Copy link
Contributor

dbilgin commented Jan 21, 2022

Description

A clear and concise description of what the bug is.

  • I have tested this issue on the latest Detox release and it still reproduces

Reproduction

I have firebase analytics and performance in the app, last I had was detox version 17.14.9 and I did not have this problem. Ever since I updated to version 19.4.2 at some point my tests start failing by getting stuck with the message below:

detox[18542] INFO:  [APP_STATUS] The app is busy with the following tasks:
• There are 1 work items pending on the dispatch queue: "Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)".
• Run loop "Main Run Loop" is awake.
• UI elements are busy:
  - Layer animations pending: 1.

I watched with remote connection, the weird thing is there is no animation or anything like that happening, it just hangs in there.
This happened for example when a new screen came into view and when I closed and reopened the screen by hand the tests actually resumed. There is a small loader when the screen first shows and then it disappears, but it does disappear after a very short time.

I haven't experienced this locally yet.
What could the reason be for this and can I work around it somehow? It's just blocking me from updating detox for a while now.

Expected behavior

Tests should not get stuck when there is no animation happening.

Screenshots / Video

image

Environment

  • Detox: 19.4.2
  • React Native: 0.66.3
  • Node: 14.18.1
  • Device: iPhone 11
  • Xcode: 13.2
  • iOS: 14.5
  • macOS: Monterey
  • Test-runner: jest-circus

Logs

If you are experiencing a timeout in your test

detox[17141] INFO:  Test: test
detox[17141] INFO:  [APP_STATUS] The app is busy with the following tasks:
• There are 1 work items pending on the dispatch queue: "Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)".
• Run loop "Main Run Loop" is awake.
• UI elements are busy:
  - Layer animations pending: 1.
detox[17141] INFO:  [APP_STATUS] The app is busy with the following tasks:
• There are 1 work items pending on the dispatch queue: "Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)".
• Run loop "Main Run Loop" is awake.
• UI elements are busy:
  - Layer animations pending: 1.
detox[17141] INFO:  [APP_STATUS] The app is busy with the following tasks:
• There are 1 work items pending on the dispatch queue: "Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)".
• Run loop "Main Run Loop" is awake.
• UI elements are busy:
  - Layer animations pending: 1.
detox[17141] INFO:  [APP_STATUS] The app is busy with the following tasks:
• There are 1 work items pending on the dispatch queue: "Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)".
• Run loop "Main Run Loop" is awake.

Device and verbose Detox logs

  • I have run my tests using the --loglevel trace argument and am providing the verbose log below:
Detox logs
           detox[20990] INFO:  [APP_STATUS] The app is busy with the following tasks:
          • There are 1 work items pending on the dispatch queue: "Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)".
          • UI elements are busy:
            - Layer animations pending: 1.
          • Run loop "Main Run Loop" is awake.
          detox[20990] TRACE: [WS_SEND] {"type":"currentStatus","params":{},"messageId":13}
          detox[20990] TRACE: [WSS_GET_FROM, #tester] {"type":"currentStatus","params":{},"messageId":13}
          detox[20990] TRACE: [WSS_SEND_TO, #app] {"type":"currentStatus","params":{},"messageId":13}
          detox[20990] TRACE: [WSS_GET_FROM, #app] {"messageId":13,"type":"currentStatusResult","params":{"status":{"busy_resources":[{"name":"dispatch_queue","description":{"queue":"Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)","works_count":1}},{"name":"ui","description":{"layer_animation_pending_count":1}},{"name":"run_loop","description":{"name":"Main Run Loop"}}],"app_status":"busy"},"messageId":13}}
          detox[20990] TRACE: [WSS_SEND_TO, #tester] {"messageId":13,"type":"currentStatusResult","params":{"status":{"busy_resources":[{"name":"dispatch_queue","description":{"queue":"Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)","works_count":1}},{"name":"ui","description":{"layer_animation_pending_count":1}},{"name":"run_loop","description":{"name":"Main Run Loop"}}],"app_status":"busy"},"messageId":13}}
          detox[20990] TRACE: [WS_MESSAGE] {"messageId":13,"type":"currentStatusResult","params":{"status":{"busy_resources":[{"name":"dispatch_queue","description":{"queue":"Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)","works_count":1}},{"name":"ui","description":{"layer_animation_pending_count":1}},{"name":"run_loop","description":{"name":"Main Run Loop"}}],"app_status":"busy"},"messageId":13}}
           
          detox[20990] INFO:  [APP_STATUS] The app is busy with the following tasks:
          • There are 1 work items pending on the dispatch queue: "Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)".
          • UI elements are busy:
            - Layer animations pending: 1.
          • Run loop "Main Run Loop" is awake.
@dbilgin
Copy link
Contributor Author

dbilgin commented Jan 22, 2022

I was able to track the problem down to the FlatLists refreshing prop. The prop changes to true when my screen first comes into view and then false, which supposedly stops the animation, but detox keeps thinking there is an animation.
If I keep this prop false at all times the tests pass just fine.
I saw this issue here and the problem seems to have been fixed there, but I have the same thing again.

@asafkorem
Copy link
Contributor

@dbilgin interesting issue. This sounds like a bug with some RN component, which causes an infinite animation..
However, I'm struggling with reproducing the issue you described with FlatList. I'd appreciate if you could help me by reproducing this in a minimal way (you can fork and use our template app).

@stale
Copy link

stale bot commented Feb 23, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you believe the issue is still relevant, please test on the latest Detox and report back.

Thank you for your contributions!

For more information on bots in this reporsitory, read this discussion.

@stale stale bot added the 🏚 stale label Feb 23, 2022
@d4vidi
Copy link
Collaborator

d4vidi commented Feb 24, 2022

@dbilgin will you be able to give it shot - reproducing this on the template app, as suggested? Thank you.

@stale stale bot removed the 🏚 stale label Feb 24, 2022
@dbilgin
Copy link
Contributor Author

dbilgin commented Mar 8, 2022

@d4vidi for the life of me, I couldn't reproduce this with a clean project, so I came to the conclusion that our main project has some weird config somewhere that's causing this, I just disabled the loading animation on FlatList during tests to avoid this as a workaround sadly.
I even created a new Bitrise account and everything and couldn't reproduce this. If somehow I manage to find this out, I will re-open this issue, but for now I think I can close this. The weirdest part is, I saw that this is happening even on a local test, not with Bitrise, but the clean project didn't have this. Something I must be missing, I will keep checking it out later.
Sorry for the very late reply, was just able to find time, crazy couple of months.

@xhirazi
Copy link

xhirazi commented Aug 22, 2022

I am getting this issue whenever i use BlurView from expo-blur

@maxckelly
Copy link

@xhirazi - Did you find a way around this or did you just uninstall expo-blur?

@dbilgin
Copy link
Contributor Author

dbilgin commented May 6, 2023

not sure about an actual solution, but would mocking BlurView help here?

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

No branches or pull requests

5 participants