android / android/android-test

UI tests failing with MAIN_LOOPER_HAS_IDLED after androidx:core update

Aperta
#1,003 0 commenti 11 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Java
Stelle
1.2k
Fork
342
Merge medio
11h 29m
PR unite (30g)
2

Descrizione

### Description

After upgrading to `androidx.core:core:1.5.0` some UI tests fail with the following exception on API level 26-29:
```
androidx.test.espresso.AppNotIdleException: Looped for 3663 iterations over 60 SECONDS. The following Idle Conditions failed MAIN_LOOPER_HAS_IDLED(last message: { when=-3ms callback=android.view.Choreographer$FrameDisplayEventReceiver target=android.view.Choreographer$FrameHandler }).
```

When I run the test what I see is that the button which the test should click is displayed on the screen, but some resource is not idle and Espresso is waiting for it, until it ultimately times out. Again, this happens only in some API layers (works fine on API level 23 and 30) after upgrading `androidx.core:core`.

I've noticed this issue while upgrading `androidx.core:core:1.5.0-alpha05` to `androidx.core:core:1.5.0-beta01`. I'm not sure what's causing this nor how I can provide more information, but let me know if you have any suggestions about how to debug this. It's worth pointing out that there's also a bug I've opened in the [Google issue tracker](https://issuetracker.google.com/issues/192570892).

### AndroidX Test and Android OS Versions

androidx.test: 1.3.0-1.4.0
Espresso 3.3.0-3.4.0

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Non sono indicati file del repository né test. Inizia riproducendo i fallimenti di Espresso su API 26–29 con androidx.core:core 1.5.0-beta01, confrontando API 23 e 30 e la versione precedente alpha05. Il lavoro è completato quando viene identificata la causa di MAIN_LOOPER_HAS_IDLED e viene stabilita una correzione o una risoluzione attuabile, usando Google issue 192570892 come contesto correlato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
java
Ambito
mobile-dev, testing
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.