Android: [3.13.0RC1] NPE on setting expiration date of public share

Created on 28 Jul 2020  Â·  5Comments  Â·  Source: nextcloud/android

Steps to reproduce

  1. Create a public link share
  2. Change the expiration date

Note: it could be related to my server side sharing settings which disable some things.

Environment data

Android version: 10

Stock or customized system: Stock

Nextcloud server version: 18

Reverse proxy: None

Logs

*** CAUSE OF ERROR ***

java.lang.NullPointerException: Attempt to invoke virtual method 'long com.owncloud.android.lib.resources.shares.OCShare.getId()' on a null object reference
at com.owncloud.android.ui.helpers.FileOperationsHelper.setExpirationDateToPublicShare(FileOperationsHelper.java:648)
at com.owncloud.android.ui.dialog.ExpirationDatePickerDialogFragment.onDateSet(ExpirationDatePickerDialogFragment.java:181)
at android.app.DatePickerDialog.onClick(DatePickerDialog.java:173)
at com.android.internal.app.AlertController$ButtonHandler.handleMessage(AlertController.java:177)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7682)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:516)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)

*** APP INFORMATION ***
ID: com.nextcloud.client
Version: 30130051
Build flavor: gplay

*** DEVICE INFORMATION ***
Brand: OnePlus

*** FIRMWARE ***
SDK: 29
Release: 10
Incremental: 2005052051

approved bug pr exists release candidate

Most helpful comment

Needs to be fixed for RC4 (scheduled for Friday)

All 5 comments

@tobiasKaminsky I guess we don't properly refresh some objects leading to a share object without the Id :/

@splitt3r can you give this a try with a new file/folder?
Please only share it once via public share.

Same exception for me. Another problem is the + sign in the Sharing dialog. It's black on dark background. I will create another issue for that.

Thanks, tested again and indeed it crashes.
I must have done something wrong on my first test…

Needs to be fixed for RC4 (scheduled for Friday)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ThaDaVos picture ThaDaVos  Â·  3Comments

Bugsbane picture Bugsbane  Â·  3Comments

tobiasKaminsky picture tobiasKaminsky  Â·  3Comments

ezaquarii picture ezaquarii  Â·  3Comments

AndyScherzinger picture AndyScherzinger  Â·  3Comments