Expecting View State but received class androidx.recyclerview.widget.RecyclerView$SavedState instead
Environment

Description
I think the app is crashing on start but its not easily replicable. I believe the problem is happening because ViewPager inflate views and assign dynamically-generated ids to them. (ref: https://android.googlesource.com/platform/frameworks/support/+/refs/heads/androidx-collection-release/viewpager2/src/main/java/androidx/viewpager2/widget/ViewPager2.java?source=post_page---------------------------#146)
Is there anything we can do to mitigate this crash?
@cojj90 do you know, how to reproduce it ?
Pager does not save the view state:
https://github.com/callstack/react-native-pager-view/blob/master/android/src/main/java/com/reactnativepagerview/PagerViewViewManager.kt#L53
@cojj90 could you check https://github.com/callstack/react-native-pager-view/releases/tag/v5.4.0, if this version fixes your issue ? I am closing it right now. In case of any problems, I will reopen this issue
Hi @troZee

We tried to update to v5.4.0 which release today, but problem still exist To reproduce this issue, we will use below steps
- Find some lower end android device (We can reproduce using Samsung C9)
- Open the app
- Put the app to background
- Open Android Developer mode
- Inactive apps
- Select the app and inactive it
- Reopen from background
- App crash
@troZee any updates on this please ? Got the same crash in 5.4.15, happens when backgrounding the app on a screen using the pager-view & relogging in after timeout