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

[3.13.0RC1] NPE on setting expiration date of public share #6568

Closed splitt3r closed 4 years ago

splitt3r commented 4 years ago

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

AndyScherzinger commented 4 years ago

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

tobiasKaminsky commented 4 years ago

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

splitt3r commented 4 years ago

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.

tobiasKaminsky commented 4 years ago

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

tobiasKaminsky commented 4 years ago

Needs to be fixed for RC4 (scheduled for Friday)