wordpress-mobile / WordPress-Android

WordPress for Android
http://android.wordpress.org
GNU General Public License v2.0
2.99k stars 1.33k forks source link

IllegalStateException: The application's PagerAdapter changed the adapter's contents without calling PagerAdapter#notify... #20146

Open sentry-io[bot] opened 9 months ago

sentry-io[bot] commented 9 months ago

Sentry Issue: JETPACK-ANDROID-J32

IllegalStateException: The application's PagerAdapter changed the adapter's contents without calling PagerAdapter#notifyDataSetChanged! Expected adapter item count: 2, found: -1 Pager id: com.jetpack.android:id/viewpager Pager class: class org.wordpress.android.widgets.WPViewPager Problematic adapter: class org.wordpress.android.ui.notifications.NotificationsDetailActivity$NotificationDetailFragmentAdapter
    at androidx.viewpager.widget.ViewPager.populate(ViewPager.java:1143)
    at androidx.viewpager.widget.ViewPager.populate(ViewPager.java:1092)
    at androidx.viewpager.widget.ViewPager.onMeasure(ViewPager.java:1622)
    at android.view.View.measure(View.java:26414)
    at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7845)
...
(40 additional frame(s) were not displayed)
SiobhyB commented 9 months ago

Setting a low priority, as this has only affected one user so far. It's a new crash in the 24.1 release, which has only been rolled out to ~30% of users at the time of writing. It'd be worth keeping an eye on this.

Error from Sentry:

IllegalStateException: The application's PagerAdapter changed the adapter's contents without calling PagerAdapter#notifyDataSetChanged! Expected adapter item count: 2, found: -1 Pager id: com.jetpack.android:id/viewpager Pager class: class org.wordpress.android.widgets.WPViewPager Problematic adapter: class org.wordpress.android.ui.notifications.NotificationsDetailActivity$NotificationDetailFragmentAdapter