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.

Version 2.0.0 is crashing

See original GitHub issue

We’ve had a lot of crashes coming from this library on Android 11 and vivo devices:

Caused by: java.lang.NoSuchFieldException: No field mKeyedTags in class Landroid/view/View; (declaration of 'android.view.View' appears in /system/framework/framework.jar!classes3.dex)
	at java.lang.Class.getDeclaredField(Class.java)
	at radiography.internal.ComposeViewsKt.<clinit>(ComposeViewsKt.java:14)
	at radiography.internal.ComposeViewsKt.isComposeAvailable(ComposeViewsKt.java:0)
	at radiography.ViewStateRenderers.<clinit>(ViewStateRenderers.java:58)

The offending usage is:

ImmutableList<ViewStateRenderer> renderers =
    ImmutableList.of(
        ViewStateRenderers.ViewRenderer,
        ViewStateRenderers.textViewRenderer(true, 128),
        ViewStateRenderers.CheckableRenderer);

Can you please advise how to handle this?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
zach-klippensteincommented, Jan 26, 2021

Planning to release today.

1reaction
pyricaucommented, Jan 19, 2021

Checking if compose is available by calling ComposeViews.isComposeAvailable causes the loading of the ComposeViews which causes the init of the VIEW_KEYED_TAGS_FIELD field:

private val VIEW_KEYED_TAGS_FIELD = View::class.java.getDeclaredField("mKeyedTags")

https://github.com/square/radiography/blob/main/radiography/src/main/java/radiography/internal/ComposeViews.kt#L15

This private field was added in 2011 https://cs.android.com/android/_/android/platform/frameworks/base/+/7db82acd8151684a886d4725ddf2790ef3a2f80e:core/java/android/view/View.java;dlc=e94d950d122005bb10e11dd18b6029d0108f2fbe

cc @zach-klippenstein we should probably do two things:

  1. maybe don’t init the rest of the class helpers when compose isn’t in the classpath
  2. Degrade gracefully if we can’t find this field?
Read more comments on GitHub >

github_iconTop Results From Across the Web

Crash with version 2.0.0 on iOS app reload (Expo, custom dev ...
Hi Marc, as already reported at twitter, the update was working pretty smooth and installation was easy without config-plugin on Expo Custom ...
Read more >
UNVR-Pro 2.4.10 Post Protect 2.0.0 update crashes
@UI-Glenn My UNRV-Pro updated to Protect 2.0.0 from Protect 2.0.0 beta-9 this morning and now is crashing nearly every 10 minutes. I have...
Read more >
Dislyte on Twitter: "New Version Crashing Issue ...
New Version Crashing Issue Recommended Solutions Hello Espers, ... that may cause the game to crash when you update the game to the...
Read more >
ETG Switch Version 2.0.0 Crashing Repeatedly
The game will refuse to take any input on startup (sometimes even in the middle of runs,) crash on launch, crash when using...
Read more >
User Messaging Platform 2.0.0 release crashes - Stack Overflow
This proguard rule, fix crash for my app: -keep class com.google.android.gms.internal.consent_sdk.** { <fields>; }.
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