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

Exception at sdk.chat.ui.keyboard.KeyboardAwareFrameLayout.onLayout on release builds #754

Open
ronaldo-triibo opened this issue May 29, 2024 · 1 comment

Comments

@ronaldo-triibo
Copy link

  1. Is the bug present in the demo Chat SDK project?
    Yes.

  2. What modifications have you made to the Chat SDK?
    None.

  3. Android Version:
    Any.

  4. Steps taken to reproduce the problem:
    Just try to open any chat.

  5. Expected result:
    Chat opens.

  6. Actual result:
    Chat activity crashes, but only in release builds (debug builds works fine)

  7. Comments:
    2024-05-29 11:49:25.446 6157-6157 AndroidRuntime my.package E FATAL EXCEPTION: main Process: my.package, PID: 6157 java.lang.UnsupportedOperationException: Somehow we couldn't create the ViewHolder for message. Please, report this issue on GitHub with full stacktrace in description. at com.stfalcon.chatkit.messages.b.a(Unknown Source:89) at com.stfalcon.chatkit.messages.e.onCreateViewHolder(SourceFile:2) at androidx.recyclerview.widget.RecyclerView$e.createViewHolder(SourceFile:2) at androidx.recyclerview.widget.RecyclerView$t.k(SourceFile:37) at androidx.recyclerview.widget.RecyclerView$t.e(Unknown Source:5) at androidx.recyclerview.widget.LinearLayoutManager$c.c(SourceFile:2) at androidx.recyclerview.widget.LinearLayoutManager.p1(Unknown Source:0) at androidx.recyclerview.widget.LinearLayoutManager.c1(SourceFile:2) at androidx.recyclerview.widget.LinearLayoutManager.s0(SourceFile:15) at androidx.recyclerview.widget.RecyclerView.s(Unknown Source:66) at androidx.recyclerview.widget.RecyclerView.q(SourceFile:6) at androidx.recyclerview.widget.RecyclerView.onLayout(SourceFile:2) at android.view.View.layout(View.java:24421) at android.view.ViewGroup.layout(ViewGroup.java:6440) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1891) at android.widget.LinearLayout.layoutHorizontal(LinearLayout.java:1880) at android.widget.LinearLayout.onLayout(LinearLayout.java:1640) at android.view.View.layout(View.java:24421) at android.view.ViewGroup.layout(ViewGroup.java:6440) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1891) at android.widget.LinearLayout.layoutHorizontal(LinearLayout.java:1880) at android.widget.LinearLayout.onLayout(LinearLayout.java:1640) at android.view.View.layout(View.java:24421) at android.view.ViewGroup.layout(ViewGroup.java:6440) at androidx.coordinatorlayout.widget.CoordinatorLayout.n(SourceFile:13) at androidx.coordinatorlayout.widget.CoordinatorLayout.onLayout(SourceFile:4) at android.view.View.layout(View.java:24421) at android.view.ViewGroup.layout(ViewGroup.java:6440) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332) at android.widget.FrameLayout.onLayout(FrameLayout.java:270) at sdk.chat.ui.keyboard.KeyboardAwareFrameLayout.onLayout(Unknown Source:0) at android.view.View.layout(View.java:24421) at android.view.ViewGroup.layout(ViewGroup.java:6440) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1891) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1729) at android.widget.LinearLayout.onLayout(LinearLayout.java:1638) at android.view.View.layout(View.java:24421) at android.view.ViewGroup.layout(ViewGroup.java:6440) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332) at android.widget.FrameLayout.onLayout(FrameLayout.java:270) at android.view.View.layout(View.java:24421) at android.view.ViewGroup.layout(ViewGroup.java:6440) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1891) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1729) at android.widget.LinearLayout.onLayout(LinearLayout.java:1638) at android.view.View.layout(View.java:24421) at android.view.ViewGroup.layout(ViewGroup.java:6440) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332) at android.widget.FrameLayout.onLayout(FrameLayout.java:270) at android.view.View.layout(View.java:24421) at android.view.ViewGroup.layout(ViewGroup.java:6440) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1891) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1729) at android.widget.LinearLayout.onLayout(LinearLayout.java:1638) at android.view.View.layout(View.java:24421) at android.view.ViewGroup.layout(ViewGroup.java:6440) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332) at android.widget.FrameLayout.onLayout(FrameLayout.java:270) at com.android.internal.policy.DecorView.onLayout(DecorView.java:789) at android.view.View.layout(View.java:24421) 2024-05-29 11:49:25.447 6157-6157 AndroidRuntime my.package E at android.view.ViewGroup.layout(ViewGroup.java:6440) at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:4258) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3583) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2465) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:9305) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1339) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1348) at android.view.Choreographer.doCallbacks(Choreographer.java:952) at android.view.Choreographer.doFrame(Choreographer.java:882) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1322) at android.os.Handler.handleCallback(Handler.java:958) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:205) at android.os.Looper.loop(Looper.java:294) at android.app.ActivityThread.main(ActivityThread.java:8177) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971) Caused by: java.lang.NoSuchMethodException: com.stfalcon.chatkit.messages.b$f.<init> [class android.view.View] at java.lang.Class.getConstructor0(Class.java:3325) at java.lang.Class.getDeclaredConstructor(Class.java:3063) at com.stfalcon.chatkit.messages.b.a(Unknown Source:54) ... 77 more

@ronaldo-triibo
Copy link
Author

For anyone having this problem, it can be temporary fixed by changing the release build configuration to:

    buildTypes {
        release {
            shrinkResources false
            minifyEnabled false
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant