nextcloud / android

📱 Nextcloud Android app
https://play.google.com/store/apps/details?id=com.nextcloud.client
GNU General Public License v2.0
4.3k stars 1.77k forks source link

Grid view in instant upload from phone crash #10864

Closed eztaban closed 2 years ago

eztaban commented 2 years ago

⚠️ Before posting ⚠️

Steps to reproduce

Enter folder instant upload, then the one uploading from the camera folder from android.

When activating grid view I get a crash, which I so far cannot get rid of, except by reinstalling app.

The option to go back to list view disappears.

Expected behaviour

Gris view should show pictures in grid.

Actual behaviour

There is no Gris view, just a long bug report. The entire interface disappears.

I haven't been able to get it back. Not when i clear cash or anything.

Android version

12

Device brand and model

Samsung a32

Stock or custom OS?

Stock

Nextcloud android app version

3.22

Nextcloud server version

23.0.2

Using a reverse proxy?

I don't know

Android logs

Cause of error

Exception in thread "main" java.lang.ClassCastException: com.owncloud.android.ui.adapter.OCFileListGridImageViewHolder cannot be cast to com.owncloud.android.ui.adapter.ListGridImageViewHolder
    at com.owncloud.android.ui.adapter.OCFileListAdapter.onBindViewHolder(OCFileListAdapter.java:362)
    at androidx.recyclerview.widget.RecyclerView$Adapter.onBindViewHolder(RecyclerView.java:7254)
    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.GridLayoutManager.layoutChunk(GridLayoutManager.java:572)
    at androidx.recyclerview.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1591)
    at androidx.recyclerview.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:668)
    at androidx.recyclerview.widget.GridLayoutManager.onLayoutChildren(GridLayoutManager.java:170)
    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:24461)
    at android.view.ViewGroup.layout(ViewGroup.java:7412)
    at androidx.swiperefreshlayout.widget.SwipeRefreshLayout.onLayout(SwipeRefreshLayout.java:689)
    at android.view.View.layout(View.java:24461)
    at android.view.ViewGroup.layout(ViewGroup.java:7412)
    at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1103)
    at android.view.View.layout(View.java:24461)
    at android.view.ViewGroup.layout(ViewGroup.java:7412)
    at android.widget.FrameLayout.layoutChildren(FrameLayout.java:374)
    at android.widget.FrameLayout.onLayout(FrameLayout.java:312)
    at android.view.View.layout(View.java:24461)
    at android.view.ViewGroup.layout(ViewGroup.java:7412)
    at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1829)
    at android.widget.LinearLayout.layoutHorizontal(LinearLayout.java:1818)
    at android.widget.LinearLayout.onLayout(LinearLayout.java:1584)
    at android.view.View.layout(View.java:24461)
    at android.view.ViewGroup.layout(ViewGroup.java:7412)
    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:2227)
    at androidx.coordinatorlayout.widget.CoordinatorLayout.onLayout(CoordinatorLayout.java:918)
    at android.view.View.layout(View.java:24461)
    at android.view.ViewGroup.layout(ViewGroup.java:7412)
    at androidx.drawerlayout.widget.DrawerLayout.onLayout(DrawerLayout.java:1263)
    at android.view.View.layout(View.java:24461)
    at android.view.ViewGroup.layout(ViewGroup.java:7412)
    at android.widget.FrameLayout.layoutChildren(FrameLayout.java:374)
    at android.widget.FrameLayout.onLayout(FrameLayout.java:312)
    at android.view.View.layout(View.java:24461)
    at android.view.ViewGroup.layout(ViewGroup.java:7412)
    at android.widget.FrameLayout.layoutChildren(FrameLayout.java:374)
    at android.widget.FrameLayout.onLayout(FrameLayout.java:312)
    at android.view.View.layout(View.java:24461)
    at android.view.ViewGroup.layout(ViewGroup.java:7412)
    at android.widget.FrameLayout.layoutChildren(FrameLayout.java:374)
    at android.widget.FrameLayout.onLayout(FrameLayout.java:312)
    at android.view.View.layout(View.java:24461)
    at android.view.ViewGroup.layout(ViewGroup.java:7412)
    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:24461)
    at android.view.ViewGroup.layout(ViewGroup.java:7412)
    at android.widget.FrameLayout.layoutChildren(FrameLayout.java:374)
    at android.widget.FrameLayout.onLayout(FrameLayout.java:312)
    at com.android.internal.policy.DecorView.onLayout(DecorView.java:1331)
    at android.view.View.layout(View.java:24461)
    at android.view.ViewGroup.layout(ViewGroup.java:7412)
    at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:4614)
    at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:4036)
    at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2924)
    at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:10513)
    at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1108)
    at android.view.Choreographer.doCallbacks(Choreographer.java:866)
    at android.view.Choreographer.doFrame(Choreographer.java:797)
    at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1092)
    at android.os.Handler.handleCallback(Handler.java:938)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loopOnce(Looper.java:226)
    at android.os.Looper.loop(Looper.java:313)
    at android.app.ActivityThread.main(ActivityThread.java:8751)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)

App information

Device information

Firmware

Server error logs

No response

Additional information

No response

AlvaroBrey commented 2 years ago

Duplicate of #10825