nextcloud / android

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

App crash on notification click: `java.lang.IllegalStateException: FragmentManager has been destroyed` #11476

Closed tzerber closed 3 months ago

tzerber commented 1 year ago

⚠️ Before posting ⚠️

Steps to reproduce

I'm on phone, so i really hope this copied properly. Got notification that Nextcloud found new foler with images called Picures, clicked on the menu and got this. Never seen such issue before, and i'm using Nextcloud for quite a while. Will provide additional info if needed ;)

Cause of error

Exception in thread "main" java.lang.IllegalStateException: FragmentManager has been destroyed
    at androidx.fragment.app.FragmentManager.enqueueAction(FragmentManager.java:1644)
    at androidx.fragment.app.BackStackRecord.commitInternal(BackStackRecord.java:341)
    at androidx.fragment.app.BackStackRecord.commit(BackStackRecord.java:306)
    at androidx.fragment.app.DialogFragment.show(DialogFragment.java:279)
    at com.owncloud.android.ui.activity.SyncedFoldersActivity.onSyncFolderSettingsClick(SyncedFoldersActivity.kt:589)
    at com.owncloud.android.ui.activity.SyncedFoldersActivity$load$1$1.invokeSuspend(SyncedFoldersActivity.kt:331)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
    at android.os.Handler.handleCallback(Handler.java:938)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loopOnce(Looper.java:210)
    at android.os.Looper.loop(Looper.java:299)
    at android.app.ActivityThread.main(ActivityThread.java:8306)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:576)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1073)

App information

Device information

Firmware

Expected behaviour

It should open the sync folder settings, but got this.

Actual behaviour

App crashed and asked if i want to report the issue

Android version

12 SP1a

Device brand and model

Poco M3 pro 5g

Stock or custom OS?

Stock

Nextcloud android app version

3.24.1

Nextcloud server version

docker 25.0.4

Using a reverse proxy?

Yes

Android logs

No response

Server error logs

No response

Additional information

No response

abhinavs1920 commented 1 year ago

I want to work on this issue

tzerber commented 1 year ago

Sorry for the delayed reply, but here we go. Later that day i checked the server logs (i am hosting the NC server), but found nothing like error there. The instance is a bit busy one, but nothing thrown in the error logs for that moment for any of the NC related apps/services/containers. Phone is like two weeks old, so i doubt it's any issue there. The other strange thing is that i have no "Pictures" folder on the phone, i did added the other folders to synchronize when i installed the client/phone.

joshtrichards commented 3 months ago

Fixed in #13075