Skip to content

java.lang.IllegalStateException: Two different ViewHolders have the same stable ID. Stable IDs in your adapter MUST BE unique and SHOULD NOT change. #14739

@rugk

Description

@rugk

⚠️ Before posting ⚠️

  • This is a bug, not a question or an enhancement.
  • I've searched for similar issues and didn't find a duplicate.
  • I've written a clear and descriptive title for this issue, not just "Bug" or "Crash".
  • I agree to follow Nextcloud's Code of Conduct.

Steps to reproduce

When deleting files from local system because of #14738 I guess I accidentally (due to that laggy ui) have clicked on "favorite" directory and then choose to delete it?

Then this happened?

Expected behaviour

No crash

Actual behaviour

Cause of error

Exception in thread "main" java.lang.IllegalStateException: Two different ViewHolders have the same stable ID. Stable IDs in your adapter MUST BE unique and SHOULD NOT change.
 ViewHolder 1:OCFileListItemViewHolder{c2af077 position=1 id=20, oldPos=-1, pLpos:-1 not recyclable(1)} 
 View Holder 2:OCFileListItemViewHolder{de723fd position=0 id=20, oldPos=-1, pLpos:-1} com.owncloud.android.ui.EmptyRecyclerView{8526eaa VFED..... ......ID 0,0-1080,2193 #7f0a02c0 app:id/list_root}, adapter:com.owncloud.android.ui.adapter.OCFileListAdapter@611ac87, layout:androidx.recyclerview.widget.LinearLayoutManager@c9e1802, context:com.owncloud.android.ui.activity.FileDisplayActivity@fa15ef0
    at androidx.recyclerview.widget.RecyclerView.handleMissingPreInfoForChangeError(RecyclerView.java:4778)
    at androidx.recyclerview.widget.RecyclerView.dispatchLayoutStep3(RecyclerView.java:4702)
    at androidx.recyclerview.widget.RecyclerView.dispatchLayout(RecyclerView.java:4367)
    at androidx.recyclerview.widget.RecyclerView.consumePendingUpdateOperations(RecyclerView.java:2095)
    at androidx.recyclerview.widget.RecyclerView$1.run(RecyclerView.java:468)
    at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1415)
    at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1424)
    at android.view.Choreographer.doCallbacks(Choreographer.java:1024)
    at android.view.Choreographer.doFrame(Choreographer.java:949)
    at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1398)
    at android.os.Handler.handleCallback(Handler.java:991)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loopOnce(Looper.java:232)
    at android.os.Looper.loop(Looper.java:317)
    at android.app.ActivityThread.main(ActivityThread.java:8787)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:591)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:871)

App information

  • ID: com.nextcloud.client
  • Version: 30310090
  • Build flavor: generic

Device information

  • Brand: Fairphone
  • Device: FP4
  • Model: FP4
  • Id: AP4A.250205.002
  • Product: FP4eea

Firmware

  • SDK: 35
  • Release: 15
  • Incremental: 25605100

Android version

Android 15

Device brand and model

FP4

Stock or custom OS?

Custom (explain in "additional information")

Nextcloud android app version

3.31.0

Nextcloud server version

31.0.0.18

Using a reverse proxy?

Yes

Android logs

No response

Server error logs

Additional information

CalyxOS 6.5.10

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions