-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Android tests fail to start on Bitrise #3978
Comments
Bump? |
TRACE level log dump
It seems like the issue may relate to some kind of 45000 ms timeout in the code. I see this in node_modules/detox/src/devices/common/drivers/android/exec/ADB.js:
So it seems like there was some debate about whether this is right. I used patch-package to change this to 300000 and it still times out, claiming the 45000 timeout!! |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions! For more information on bots in this repository, read this discussion. |
The installation appears to be successful, so this timeout is irrelevant. You might be able to extend it via a native Detox config but I think 45seconds is way more than enough. Important question: Does this usuually work on your local computer? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions! For more information on bots in this repository, read this discussion. |
@d4vidi yes, it works locally. Since then I was able to configure it to run with iOS on an M1 machine. I will be returning to this issue shortly as we still have the need for Android tests. |
Here's what I tried to debug: sshing into the bitrise machine and running the command manually - same result I was able to dump the logcat logs but its so long and full of errors that may or may not be relevant. please advise how to proceed. |
Consider installing |
@d4vidi thanks for the advice. I was able to get the full device log, if you want to take a look. I see lots of errors so not sure which one might actually be making the app hang, perhaps this one?
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions! For more information on bots in this repository, read this discussion. |
The issue has been closed for inactivity. |
Still an issue. |
Still an issue. I revisited this and tried a couple suggestions from around the internet. I tried starting the Metro bundler in a separate command yarn start & (this seemed to solve other issues). I also stopped and started the adb server before initiating the tests. I'm now seeing this generic JS looper error being output.
Could a moderator please reopen this issue? |
@noomorph thanks! |
Thank you for your understanding. Due to ongoing wars in our countries, our current bandwidth is limited. Typically, investigations like yours require several dedicated days, and the timeframe can extend if complex issues arise. My tasks are scheduled based on the priorities set by my company, so I can't promise I can look at it in the near future. Overall, I understand the frustrations with issues like this. We're all looking forward to a resolution, but until we or someone else has time to get this done, such investigations will be held manually. So, were I to have more resources, I'd go all in on obtaining that profiler recording, be it through Flipper or some native Android profiling method. It seems to be the most direct approach to addressing this concern. 🤷♂️ Get to know which function is running in your flamechart, and you know the culprit. |
@noomorph understandable and I hope you and your colleagues are safe. I have tried the Android profiler method running my local dev env, however the issue only reproduces in CI on Linux machines. Our team only uses macos machines so we are limited in our ability to reproduce and debug it. I am open to creative solutions on how to debug this. I've considered spinning up a separate Ubuntu machine in AWS just to see if there are any fundamental issues with running our app on the AMD architecture. Any and all ideas welcome :) |
@owens-ben if you are really open to any suggestions, maybe you could try to spin up flipper-server - first locally, then on CI? https://www.npmjs.com/package/flipper-server I hate to admit that this seems to be a rarely used experimental package, but if I get their idea right, it can serve a full-fledged Flipper UI via a browser. If this works, and it has no easy way to start recording via http request, maybe you could click on some buttons via puppeter (sounds bananas but might be viable). Could you check that please? |
One of my more senior teammates was able to help with this and get it running on a concept level. We will be compiling our findings. If there are any suggestions for anyone that runs into this problem we will share them here. |
@owens-ben, if your teammates eventually will be okay with releasing the source code of that "concept level", we'd highly appreciate this input. 🙏 I plan to work very seriously around the artifacts subsystem in Detox in Q4'23-Q1'24, and any viable POC can accelerate the appearance of generic Flipper artifact recording in Detox. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions! For more information on bots in this repository, read this discussion. |
@noomorph I hope you are well. Do you have any news about this fix? |
What happened?
After going through much debugging with Bitrise support we believe there is some kind of issue with the launchApp() function. It's either timing out or just not running at all.
https://support.bitrise.io/hc/en-us/requests/36123
I ran a "dummy" test with no app launch and that seems to run fine.
Here is the stack dump from when this happens.
Detox v 20.5.0
What was the expected behaviour?
No response
Was it tested on latest Detox?
Did your test throw out a timeout?
Help us reproduce this issue!
No response
In what environment did this happen?
Detox version: 20.5.0
React Native version: 0.70.6
Has Fabric (React Native's new rendering system) enabled: (yes/no)
Node version:
Device model:
Android version: 31
Test-runner (select one): jest
Detox logs
Detox logs
Device logs
Device logs
More data, please!
No response
The text was updated successfully, but these errors were encountered: