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

Paparazzi crashing on compileSdk 36 (Android 16 Baklava) #1877

Open
bardss opened this issue Mar 17, 2025 · 0 comments
Open

Paparazzi crashing on compileSdk 36 (Android 16 Baklava) #1877

bardss opened this issue Mar 17, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@bardss
Copy link

bardss commented Mar 17, 2025

Description
We are migrating our app to the newest compileSdk 36.
Android 16 got a Beta 3 release last week (13th March). The first release that reached platform stability and was not released as a preview.
https://developer.android.com/about/versions/16/release-notes
https://developer.android.com/about/versions/16

After setting compileSdk to 36 our screenshot tests are failing.

There are two different types of crashes/stacktraces that I can share:
1‍⃣ :

java.util.NoSuchElementException: Array contains no element matching the predicate.
	at app.cash.paparazzi.internal.Renderer.configureBuildProperties(Renderer.kt:213)
	at app.cash.paparazzi.internal.Renderer.prepare(Renderer.kt:108)
	at app.cash.paparazzi.PaparazziSdk.prepare(PaparazziSdk.kt:128)
	at app.cash.paparazzi.Paparazzi.prepare(Paparazzi.kt:89)
	at app.cash.paparazzi.Paparazzi$apply$1.evaluate(Paparazzi.kt:77)
	at com.google.testing.junit.testparameterinjector.PluggableTestRunner$ContextMethodRule$1.evaluate(PluggableTestRunner.java:414)

2‍⃣ :

kotlin.UninitializedPropertyAccessException: lateinit property sessionParamsBuilder has not been initialized
	at app.cash.paparazzi.PaparazziSdk$Companion.getSessionParamsBuilder$paparazzi(PaparazziSdk.kt:596)
	at app.cash.paparazzi.PaparazziSdk.prepare(PaparazziSdk.kt:132)
	at app.cash.paparazzi.Paparazzi.prepare(Paparazzi.kt:89)
	at app.cash.paparazzi.Paparazzi$apply$1.evaluate(Paparazzi.kt:77)
	at com.google.testing.junit.testparameterinjector.PluggableTestRunner$ContextMethodRule$1.evaluate(PluggableTestRunner.java:414)

The run always starts with the 1‍⃣ crash and all the next follow along with 2‍⃣.
Looks like Renderer.kt in configureBuildProperties is trying to get the code through reflection that is not available in Android 16.

Steps to Reproduce
Update the compileSdk to 36 and run the tests.

Expected behavior
Tests not crashing.

Additional information:

  • Paparazzi Version: 1.3.5
  • OS: Android 16
  • Compile SDK: 36
  • Gradle Version: 8.12.1
  • Android Gradle Plugin Version: 8.9.0
@bardss bardss added the bug Something isn't working label Mar 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant