Share a file to the Nextcloud app from the share sheet
Go to a folder that has some locally synced files on Account1
Click on Switch account in the top-right menu
Switch to Account2
Account2 will not show up immediately, instead the current folder of Account1 is still shown. However, image previews are missing. The locally synced files in the folder are still on the file system.
Click on the back arrow in the top left.
The whole folder that was open including its files are deleted on the device.
Expected behaviour
Clear the UI before switching the account in the backend logic or show some loading screen (or at the very least, don't delete local folders)
Actual behaviour
Nextcloud app deletes the local folder of Account1 including its files (I assume that the backend logic of the app detects that the folder from Account1 does not exist in Account2 and therefore it deletes it locally). At some point it will either show the content of Account2 or crash before that with a NullPointerException if you click on a folder that exists only on Account1 (see below for NPE).
Android version
14
Device brand and model
Pixel 6 Pro
Stock or custom OS?
Custom (explain in "additional information")
Nextcloud android app version
3.29.1-fdroid
Nextcloud server version
29.0.4
Using a reverse proxy?
No
Android logs
No response
Server error logs
No response
Additional information
No response
Cause of error
Exception in thread "main" java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.owncloud.android.datamodel.OCFile.canWrite()' on a null object reference
at com.owncloud.android.ui.activity.ReceiveExternalFilesActivity.onCreateOptionsMenu(ReceiveExternalFilesActivity.java:1014)
at android.app.Activity.onCreatePanelMenu(Activity.java:4595)
at androidx.activity.ComponentActivity.onCreatePanelMenu(ComponentActivity.java:520)
at androidx.appcompat.view.WindowCallbackWrapper.onCreatePanelMenu(WindowCallbackWrapper.java:95)
at androidx.appcompat.app.AppCompatDelegateImpl$AppCompatWindowCallback.onCreatePanelMenu(AppCompatDelegateImpl.java:3429)
at androidx.appcompat.app.ToolbarActionBar.populateOptionsMenu(ToolbarActionBar.java:458)
at androidx.appcompat.app.ToolbarActionBar$1.run(ToolbarActionBar.java:58)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1406)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1415)
at android.view.Choreographer.doCallbacks(Choreographer.java:1015)
at android.view.Choreographer.doFrame(Choreographer.java:941)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1389)
at android.os.Handler.handleCallback(Handler.java:959)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loopOnce(Looper.java:232)
at android.os.Looper.loop(Looper.java:317)
at android.app.ActivityThread.main(ActivityThread.java:8592)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)
⚠️ Before posting ⚠️
Steps to reproduce
Expected behaviour
Clear the UI before switching the account in the backend logic or show some loading screen (or at the very least, don't delete local folders)
Actual behaviour
Nextcloud app deletes the local folder of Account1 including its files (I assume that the backend logic of the app detects that the folder from Account1 does not exist in Account2 and therefore it deletes it locally). At some point it will either show the content of Account2 or crash before that with a NullPointerException if you click on a folder that exists only on Account1 (see below for NPE).
Android version
14
Device brand and model
Pixel 6 Pro
Stock or custom OS?
Custom (explain in "additional information")
Nextcloud android app version
3.29.1-fdroid
Nextcloud server version
29.0.4
Using a reverse proxy?
No
Android logs
No response
Server error logs
No response
Additional information
No response
Cause of error