nextcloud / android

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

App hanging while trying to share multiple folders #11825

Open ackindermann opened 1 year ago

ackindermann commented 1 year ago

⚠️ Before posting ⚠️

Steps to reproduce

  1. Select multiple folders
  2. Click on share buttom of one of the folders
  3. Select another user
  4. Confirm the sharing
  5. Get error and dump msg saying app crashed.

Expected behaviour

Msg saying that share is configured.

Actual behaviour

Error, and only one folder get actually shared.

Android version

13

Device brand and model

Samsung S20 stock

Stock or custom OS?

Stock

Nextcloud android app version

3.25.0

Nextcloud server version

27.1

Using a reverse proxy?

No

Android logs

Cause of error

Exception in thread "main" java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
    at androidx.fragment.app.FragmentManager.checkStateLoss(FragmentManager.java:1612)
    at androidx.fragment.app.FragmentManager.enqueueAction(FragmentManager.java:1652)
    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:262)
    at com.owncloud.android.ui.fragment.OCFileListFragment.lambda$openActionsMenu$6$com-owncloud-android-ui-fragment-OCFileListFragment(OCFileListFragment.java:613)
    at com.owncloud.android.ui.fragment.OCFileListFragment$$ExternalSyntheticLambda6.run(Unknown Source:8)
    at com.nextcloud.client.utils.Throttler.run(Throttler.kt:44)
    at com.owncloud.android.ui.fragment.OCFileListFragment.openActionsMenu(OCFileListFragment.java:607)
    at com.owncloud.android.ui.fragment.OCFileListFragment$MultiChoiceModeListener.onActionItemClicked(OCFileListFragment.java:781)
    at com.android.internal.policy.DecorView$ActionModeCallback2Wrapper.onActionItemClicked(DecorView.java:5695)
    at androidx.appcompat.view.SupportActionModeWrapper$CallbackWrapper.onActionItemClicked(SupportActionModeWrapper.java:172)
    at androidx.appcompat.app.AppCompatDelegateImpl$ActionModeCallbackWrapperV9.onActionItemClicked(AppCompatDelegateImpl.java:3022)
    at androidx.appcompat.view.StandaloneActionMode.onMenuItemSelected(StandaloneActionMode.java:140)
    at androidx.appcompat.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:836)
    at androidx.appcompat.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:159)
    at androidx.appcompat.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:987)
    at androidx.appcompat.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:977)
    at androidx.appcompat.widget.ActionMenuView.invokeItem(ActionMenuView.java:625)
    at androidx.appcompat.view.menu.ActionMenuItemView.onClick(ActionMenuItemView.java:156)
    at android.view.View.performClick(View.java:7892)
    at android.widget.TextView.performClick(TextView.java:16219)
    at android.view.View.performClickInternal(View.java:7869)
    at android.view.View.-$$Nest$mperformClickInternal(Unknown Source:0)
    at android.view.View$PerformClick.run(View.java:30880)
    at android.os.Handler.handleCallback(Handler.java:942)
    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:8757)
    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:1067)

App information

Device information

Firmware

Server error logs

No response

Additional information

No response

joshtrichards commented 12 months ago

Hi @ackindermann - Thanks for the report. Unfortunately (or fortunately - depending) I can't reproduce this in v3.26. Can you reproduce it readily in your v3.25 (to confirm those are the full reproduction steps)? And, if an option, can you upgrade to v3.26 and attempt to reproduce again then report back your results here?

P.S. I used "Allow upload and editing" for the share options. Did you have any particular combination of options?

joshtrichards commented 12 months ago

Follow-up: While I can't reproduce the hang, I can confirm that only one of the two folders is shared. So multi-select appears to have a sharing bug.