Closed dbilgin closed 3 years ago
I have tried removing the following libraries altogether:
- Firebase performance
- Firebase analytics
- Firebase messaging
- Anything related to firebase
- Codepush
- Bootsplash
- Anything tracking related
And still no improvement.
@dbilgin Assuming you are able to collect build artifacts from CircleCI post-factum -- could you please set up logs, screenshots and video collection using our artifacts guide, and then post them back here? It is generally hard to help without those (cluttered bits of logs are not as informative).
Nevertheless, I'm speculating that maybe you are in fact running the app in debug mode, which - depending on the running machine, could be keeping the app from booting up fast enough. Could you revisit that and make certain that you are in fact in release mode, namely - JS code get prebundled into the app file, and there's no JS-bundler server (i.e. metro) running in the background?
Hi @d4vidi, thank you for your reply.
So as you suggested I've tried running the tests with --record-logs all --record-videos all --take-screenshots all
and then uploaded the artifacts to CircleCI.
I initially tried running this command locally to see the output and I got the images, videos and the logs without a problem. When I tried it on CircleCI there was no video, I assume because the tests can't even start and already fail before even running the beforeAll
.
Here's the list of artifacts I got:
Looking at these, I have two images and they were actually not the splash screen but the home screen, so the app is loading fine it seems, I also double checked whether it's running in debug mode, but unfortunately not.
The detox_pid file looks like this:
This goes on exactly like this until:
Here is the startup.log file as an attachment since it is way too big. startup.log
OK, trying to go over it. In any case, debug-sync every 500ms is very harsh. Could you please reconfigure to 10000 (10 sec) or so?
Something is keeping your app busy when run on CircleCI.
com.example.debug
. This is another indicator of that you're running in debug mode... please switch to release and let's reiterate.codepush
. Please try to switch to release and see if those go away:detox[11417] INFO: [actions.js] Sync App State: Waiting for network requests to finish
Waiting for network requests to finish: (
"https://codepush.appcenter.ms/v0.1/public/codepush/update_check?deployment_key=WX&app_version=1.0&package_hash=arewqrrsd48d172sagea315fe58022228d8bccaac&client_unique_id=98459D-D954D-2135-9887-5469854ASDQ"
)
so the com.example.debug
here was just a bundle id, I had also tried building with the release through xcodebuild
but the same thing was happening, but I took your advice on a completely production ready build, because I also had environment variables and was not using the production.
I have eventually managed to track the problem down to testfairy. If testfairy is enabled in the build and TestFairy.begin
is called, it simply failed and when I disabled this everything started working, including the video recordings. I guess this is another reason not to use testfairy.
Thanks a lot for your help with tracking down the issue @d4vidi, I really appreciate it.
No problem at all 👍🏻 Regarding testfairy, however, I really wonder what it is about it that might have caused this. I spotted at least a single network call going (in your logs), but it doesn't seem fatal. Do you have any clue at all?
@d4vidi I was trying to figure this out as well last couple of days but there doesn't seem to be any requests stuck with it nor should there be any animations whatsoever since it has nothing to do with the UI, so I am really not sure why this was happening. Inside the app I only had these lines regarding testfairy:
TestFairy.setServerEndpoint('example.testfairy-eu.com'); // which always runs so this cannot be it
and:
TestFairy.begin(testFairyToken);
This second one is only triggered if my environment is set accordingly which was causing the issue. This is all I know honestly, I also tried my best to read through the logs but couldn't find anything there. I just know that it's fixed when this line is not called.
Alright, thanks for explaining! I suppose they might be doing something too intrusive that could be not fail-safe in these environment.
Yeah that's what I thought, it's just somehow hard to track down, will make a switch to either app center or firebase
Environment (please complete the following information):
Logs
If you are experiencing a timeout in your test
[x] I have followed the instructions under Identifying which synchronization mechanism causes us to wait too much, I have read synchronization debug documentation and am providing the relevant synchronization debug output below:
[x] I have run my tests using the
--loglevel trace
argument and am providing the verbose log below:I am trying to run our Detox tests on CircleCI and I'm experiencing multiple issues.
First off, I was keeping the detox version at
17.14.9
, because when I upgrade detox to the latest version I start getting Signal 11 errors randomly and I have no idea why. Here's the error I get:I have tried running both the 17.14.9 version and the 18.20.3 version on CircleCI and locally. Locally both of them work, only the latest version randomly crashes like mentioned above. But on CircleCI, I couldn't get anything working.
With 17.14.9 I get this kind of an error:
As far as I understand the app is getting stuck at the splash screen. I use
react-native-bootsplash
library for displaying the splash screen and it was okay on Bitrise, this problem started only with CircleCI and with some other local devices that I tried running this on. I have now also tried running the tests by removing this library and the same exact thing is happening, so that was not the problem.Then I tried running the tests with the latest detox version on CircleCI and this was the result (apart from the existing signal 11 issue):
It just gets stuck like this even though there should be no animation at this point. I'm getting a bit lost in all the errors, I must be doing something awfully wrong here.
Additionally I have
--loglevel trace
,--debug-synchronization 500
and-DTXEnableVerboseSyncSystem YES -DTXEnableVerboseSyncResources YES
enabled logs here:this just goes on forever