chat-sdk / chat-sdk-android

Chat SDK Android - Open Source Mobile Messenger
https://chatsdk.co
Other
1.61k stars 611 forks source link

App Crash When Moving on to ThreadDetailsActivity #750

Closed Mari25041990 closed 11 months ago

Mari25041990 commented 1 year ago
  1. Is the bug present in the demo Chat SDK project? Not Sure

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

  3. Android Version: All Versions

  4. Steps taken to reproduce the problem: Open Chat Activity -> Click chatActionBar to View The Profile Details

  5. Expected result: Should show the ThreadDetailsActivity

  6. Actual result: App crashes with Exception

  7. Comments:

Used Version : 5.2.7 StackTrace :

**java.lang.IllegalStateException: user.avatarURL must not be null

                                                                                                    **at sdk.chat.ui.activities.thread.details.ThreadUserViewHolder.bind(ThreadUserViewHolder.kt:54)****
                                                                                                    at sdk.chat.ui.activities.thread.details.ThreadUserViewHolder.bind(ThreadUserViewHolder.kt:17)
                                                                                                    at smartadapter.SmartRecyclerAdapter.onBindViewHolder(SmartRecyclerAdapter.kt:96)
                                                                                                    at smartadapter.SmartRecyclerAdapter.onBindViewHolder(SmartRecyclerAdapter.kt:60)
                                                                                                    at androidx.recyclerview.widget.RecyclerView$Adapter.onBindViewHolder(RecyclerView.java:7254)
                                                                                                    at smartadapter.SmartRecyclerAdapter.onBindViewHolder(SmartRecyclerAdapter.kt:113)
                                                                                                    at smartadapter.SmartRecyclerAdapter.onBindViewHolder(SmartRecyclerAdapter.kt:60)
                                                                                                    at androidx.recyclerview.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:7337)
                                                                                                    at androidx.recyclerview.widget.RecyclerView$Recycler.tryBindViewHolderByDeadline(RecyclerView.java:6194)
                                                                                                    at androidx.recyclerview.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:6460)
                                                                                                    at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6300)
                                                                                                    at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6296)
                                                                                                    at androidx.recyclerview.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2330)
                                                                                                    at androidx.recyclerview.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1631)
                                                                                                    at androidx.recyclerview.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1591)
                                                                                                    at androidx.recyclerview.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:668)
                                                                                                    at androidx.recyclerview.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:4309)
                                                                                                    at androidx.recyclerview.widget.RecyclerView.dispatchLayout(RecyclerView.java:4012)
                                                                                                    at androidx.recyclerview.widget.RecyclerView.onLayout(RecyclerView.java:4578)
                                                                                                    at android.view.View.layout(View.java:21912)
                                                                                                    at android.view.ViewGroup.layout(ViewGroup.java:6260)
                                                                                                    at com.google.android.material.appbar.HeaderScrollingViewBehavior.layoutChild(HeaderScrollingViewBehavior.java:148)
                                                                                                    at com.google.android.material.appbar.ViewOffsetBehavior.onLayoutChild(ViewOffsetBehavior.java:43)
                                                                                                    at com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior.onLayoutChild(AppBarLayout.java:2003)
                                                                                                    at androidx.coordinatorlayout.widget.CoordinatorLayout.onLayout(CoordinatorLayout.java:918)
                                                                                                    at android.view.View.layout(View.java:21912)
                                                                                                    at android.view.ViewGroup.layout(ViewGroup.java:6260)
                                                                                                    at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1103)
                                                                                                    at android.view.View.layout(View.java:21912)
                                                                                                    at android.view.ViewGroup.layout(ViewGroup.java:6260)
                                                                                                    at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
                                                                                                    at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
                                                                                                    at android.view.View.layout(View.java:21912)
                                                                                                    at android.view.ViewGroup.layout(ViewGroup.java:6260)
                                                                                                    at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1829)
                                                                                                    at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1673)
                                                                                                    at android.widget.LinearLayout.onLayout(LinearLayout.java:1582)
                                                                                                    at android.view.View.layout(View.java:21912)
                                                                                                    at android.view.ViewGroup.layout(ViewGroup.java:6260)
                                                                                                    at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
                                                                                                    at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
                                                                                                    at android.view.View.layout(View.java:21912)
                                                                                                    at android.view.ViewGroup.layout(ViewGroup.java:6260)
                                                                                                    at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1829)
                                                                                                    at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1673)
                                                                                                    at android.widget.LinearLayout.onLayout(LinearLayout.java:1582)
                                                                                                    at android.view.View.layout(View.java:21912)
                                                                                                    at android.view.ViewGroup.layout(ViewGroup.java:6260)
                                                                                                    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:779)
Mari25041990 commented 1 year ago

@bensmiley Please help on this

bensmiley commented 1 year ago

@Mari25041990 can you please test this on the latest version of the project? Each new version contains bug fixes, so you may well find that it is already fixed. If not, I need step-by-step instructions how how this can be replicated with the demo version of the project.