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

App crashes when creating password for shared folder via link #6853

Closed mayonezo closed 4 years ago

mayonezo commented 4 years ago

Steps to reproduce

  1. Share a folder via link
  2. Add a password
  3. App crashes

Expected behaviour

Actual behaviour

Environment data

Logs



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.setPasswordToPublicShare(FileOperationsHelper.java:592)
    at com.owncloud.android.ui.dialog.SharePasswordDialogFragment.setPassword(SharePasswordDialogFragment.java:198)
    at com.owncloud.android.ui.dialog.SharePasswordDialogFragment.onClick(SharePasswordDialogFragment.java:175)
    at androidx.appcompat.app.AlertController$ButtonHandler.handleMessage(AlertController.java:167)
    at android.os.Handler.dispatchMessage(Unknown Source:19)
    at android.os.Looper.loop(Unknown Source:242)
    at android.app.ActivityThread.main(Unknown Source:98)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(Unknown Source:11)
    at com.android.internal.os.ZygoteInit.main(Unknown Source:275)

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

************ DEVICE INFORMATION ************
Brand: Xiaomi
Device: beryllium
Model: POCOPHONE F1
Id: QKQ1.190828.002
Product: beryllium

************ FIRMWARE ************
SDK: 29
Release: 10
Incremental: V12.0.0.3.QEJMIXM

**NOTE:** Be super sure to remove sensitive data like passwords, note that everybody can look here! You can use the Issue Template application to prefill some of the required information: https://apps.nextcloud.com/apps/issuetemplate
tobiasKaminsky commented 4 years ago

Duplicate of #6749