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

Waited for the root of the view hierarchy to have window focus and not request layout for 10 seconds #1121

Closed
DenBond7 opened this issue Mar 24, 2021 · 8 comments
Assignees
Labels
android_testing This label means we need to add an Android test. emulator_bug
Milestone

Comments

@DenBond7
Copy link
Collaborator

DenBond7 commented Mar 24, 2021

ref https://flowcrypt.semaphoreci.com/jobs/c44c169a-f790-4c25-aac7-ae7e220203f0

java.lang.RuntimeException: Waited for the root of the view hierarchy to have window focus and not request layout for 10 seconds. If you specified a non default root matcher, it may be picking a root that never takes focus. Root:28:03
Root{application-window-token=android.view.ViewRootImpl$W@10705e7, window-token=android.view.ViewRootImpl$W@10705e7, has-window-focus=false, layout-params-type=1, layout-params-string={(0,0)(fillxfill) sim={forwardNavigation} ty=BASE_APPLICATION wanim=0x10302fe

During that issues, we can see the following

image

@DenBond7 DenBond7 added the android_testing This label means we need to add an Android test. label Mar 24, 2021
@DenBond7 DenBond7 added this to the 1.1.7 milestone Mar 24, 2021
@DenBond7 DenBond7 self-assigned this Mar 24, 2021
@DenBond7
Copy link
Collaborator Author

It seems an Android emulator bug :(

@tomholub
Copy link
Collaborator

It would theoretically be possible to use an actual Android device for testing. We'd just need to set up a physical testing rig, or better use a service that comes attached with a physical android phone.

@DenBond7
Copy link
Collaborator Author

Need to investigate this problem. It might crash on one emulator but works great on another one (for example with a different Android version).

@DenBond7
Copy link
Collaborator Author

DenBond7 commented Apr 6, 2021

It seems an Android emulator bug :(

It seems this one #1116 relates to the Android emulator bug too. After adding some debug code I've found that sometimes during tests the emulator turns off. I will try to switch to another one(maybe a different Android version).

@DenBond7
Copy link
Collaborator Author

I'm moving it to later. I haven't seen such a bug for a long time

@DenBond7 DenBond7 modified the milestones: 1.1.7, later Apr 14, 2021
@IvanPizhenko
Copy link
Contributor

IvanPizhenko commented Apr 14, 2021

Why can emulator turn off suddenly?

@DenBond7
Copy link
Collaborator Author

@IvanPizhenko

Why can emulator turn off suddenly?

It very depends. For now, most problems were described here #1105.
Due to using Node.js I have to increase the RAM of an emulator. But it seems it causes device offline issue. If I use an emulator as-is very often we receive OutOfMemoryException. To prevent that I could use Android Test Orchestrator. But in that case, every test will take 3-4 seconds additional time and sometimes a test fails due to Node.js.

I hope after dropping Node.js we will have more reliable tests.

@DenBond7
Copy link
Collaborator Author

DenBond7 commented Aug 5, 2022

deprecated

@DenBond7 DenBond7 closed this as completed Aug 5, 2022
@DenBond7 DenBond7 modified the milestones: later, Discussion Jan 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android_testing This label means we need to add an Android test. emulator_bug
Projects
None yet
Development

No branches or pull requests

3 participants