android icon indicating copy to clipboard operation
android copied to clipboard

NC on Android crashes when opening folder or file directly

Open wschmidhuber opened this issue 1 year ago • 2 comments

⚠️ Before posting ⚠️

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

Steps to reproduce

I have a couple of Nextcloud folders and files attached to my home screen to get there quickly without opening the app first. Worked fine for a long time.

Expected behaviour

Just opening files or folders from homescreen without crashing.

Actual behaviour

NC crashes when I try to open those files or folders without opening the app first.

Android version

13

Device brand and model

Samsung Galaxy S20+

Stock or custom OS?

Stock

Nextcloud android app version

3.33.0

Nextcloud server version

30.0.11

Using a reverse proxy?

No

Android logs

Cause of error

Exception in thread "main" java.lang.RuntimeException: Unable to start activity ComponentInfo{com.nextcloud.client/com.owncloud.android.ui.activity.FileDisplayActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.View.setVisibility(int)' on a null object reference
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4169)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4325)
    at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101)
    at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2574)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loopOnce(Looper.java:226)
    at android.os.Looper.loop(Looper.java:313)
    at android.app.ActivityThread.main(ActivityThread.java:8762)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:604)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)
Caused by: Exception in thread "main" java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.View.setVisibility(int)' on a null object reference
    at com.owncloud.android.ui.activity.ToolbarActivity.showSortListGroup(ToolbarActivity.java:263)
    at com.owncloud.android.ui.activity.FileDisplayActivity.prepareFragmentBeforeCommit(FileDisplayActivity.kt:681)
    at com.owncloud.android.ui.activity.FileDisplayActivity.setLeftFragment(FileDisplayActivity.kt:660)
    at com.owncloud.android.ui.activity.FileDisplayActivity.setLeftFragment(FileDisplayActivity.kt:755)
    at com.owncloud.android.ui.activity.FileDisplayActivity.onOpenFileIntent(FileDisplayActivity.kt:649)
    at com.owncloud.android.ui.activity.FileDisplayActivity.handleCommonIntents(FileDisplayActivity.kt:574)
    at com.owncloud.android.ui.activity.FileDisplayActivity.onCreate(FileDisplayActivity.kt:250)
    at android.app.Activity.performCreate(Activity.java:8591)
    at android.app.Activity.performCreate(Activity.java:8570)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1384)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4150)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4325)
    at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101)
    at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2574)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loopOnce(Looper.java:226)
    at android.os.Looper.loop(Looper.java:313)
    at android.app.ActivityThread.main(ActivityThread.java:8762)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:604)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)

App information

  • ID: com.nextcloud.client
  • Version: 30330090
  • Build flavor: gplay

Device information

  • Brand: samsung
  • Device: y2s
  • Model: SM-G986B
  • Id: TP1A.220624.014
  • Product: y2sxeea

Firmware

  • SDK: 33
  • Release: 13
  • Incremental: G986BXXSNHYB1

Server error logs


Additional information

Same behaviour on similar phone.

wschmidhuber avatar Sep 15 '25 07:09 wschmidhuber

I can confirm that

NC 30.0.15

Mich-es avatar Sep 16 '25 13:09 Mich-es

Duplicate #15609

joshtrichards avatar Sep 28 '25 16:09 joshtrichards