question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Test Paparazzi with Android S

See original GitHub issue

Tests broke when I ran locally, setting the testConfig in paparazzi/build.gradle to point to API 31.

$ ./gradlew paparazzi:test --tests=app.cash.paparazzi.PaparazziTest

> Task :paparazzi:test

app.cash.paparazzi.PaparazziTest > throwsRenderingExceptions FAILED
    java.lang.ExceptionInInitializerError
        at android.view.autofill.AutofillManager.<clinit>(AutofillManager.java:239)
        at com.android.layoutlib.bridge.android.BridgeContext.<init>(BridgeContext.java:256)
        at com.android.layoutlib.bridge.impl.RenderAction.init(RenderAction.java:133)
        at com.android.layoutlib.bridge.impl.RenderSessionImpl.init(RenderSessionImpl.java:180)
        at app.cash.paparazzi.Paparazzi.prepare(Paparazzi.kt:139)
        ...

        Caused by:
        java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
            at android.os._Original_Build.<clinit>(Build.java:214)
            ... 42 more

app.cash.paparazzi.PaparazziTest > drawCalls FAILED
    java.lang.NullPointerException
        at com.android.layoutlib.bridge.impl.Layout$Builder.findAppCompatActionBar(Layout.java:455)
        at com.android.layoutlib.bridge.impl.Layout$Builder.<init>(Layout.java:422)
        at com.android.layoutlib.bridge.impl.RenderSessionImpl.init(RenderSessionImpl.java:193)
        at app.cash.paparazzi.Paparazzi.prepare(Paparazzi.kt:139)
        ...

app.cash.paparazzi.PaparazziTest > animationEvents FAILED
    java.lang.NullPointerException
        at com.android.layoutlib.bridge.impl.Layout$Builder.findAppCompatActionBar(Layout.java:455)
        at com.android.layoutlib.bridge.impl.Layout$Builder.<init>(Layout.java:422)
        at com.android.layoutlib.bridge.impl.RenderSessionImpl.init(RenderSessionImpl.java:193)
        at app.cash.paparazzi.Paparazzi.prepare(Paparazzi.kt:139)
        ...

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
jrodbxcommented, Feb 19, 2022

Has anyone experienced this issue before and know how to get around it?

This particular issue is related to a filename change of the icu data file:

https://github.com/cashapp/paparazzi/pull/375/files?file-filters[]=.kt&show-viewed-files=true#diff-387bfa20d3d3ea21a6701268b5ca1c777f7ef79f849f99277da62fffdc3b0d14

1reaction
int02hcommented, Feb 15, 2022

Any updates here?

Read more comments on GitHub >

github_iconTop Results From Across the Web

cashapp/paparazzi: Render your Android screens ... - GitHub
Runs tests and generates an HTML report at sample/build/reports/paparazzi/ showing all test runs and snapshots. $ ./gradlew sample:recordPaparazziDebug. Saves ...
Read more >
Sanely Test Your Android UI Libraries With Paparazzi
This is especially true on Android UI libraries where things like Unit testing or UI testing (using Espressο, UiAutomator) start to make less...
Read more >
Why go with Paparazzi? Our journey with Android Screenshot ...
Paparazzi is a Gradle plugin and library that enables writing UI tests for Android screens that run entirely on the JVM, without needing...
Read more >
Snapshot testing (and more!) with Paparazzi - Droidcon
Come find out how we're improving the UI testing loop on Cash App with Paparazzi -- an Android testing library to render your...
Read more >
Chris Banes on Twitter: "Here's the test if you're wondering ...
's Paparazzi to screenshot test our #JetpackCompose components on CI . No devices necessary. github.com. GitHub - cashapp/paparazzi: Render your Android ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found