stefan-niedermann / nextcloud-tables

📊 Android client for nextcloud tables app
https://play.google.com/store/apps/details?id=it.niedermann.nextcloud.tables.play
GNU General Public License v3.0
29 stars 5 forks source link

null Selection throws an error #36

Closed hamuchen closed 6 months ago

hamuchen commented 8 months ago

Steps to reproduce the behavior: If you create a selection column and don't select a default selection, the selection is not shown and the app throws an error.

Expected behavior Let me chose a selection

Screenshots Settings in Nextcloud: 2023-12-24_103204 Error in App: Screenshot_20231224-103219 Changing the Settings to this: 2023-12-24_103331 App works with a default selection Screenshot_20231224-103356

Versions

Smartphone (please complete the following information):

Stacktrace

App Version: 1.1.2
App Version Code: 1001002
App Flavor: play

Files App Version Code: 30260090 (PROD)

---

OS Version: 4.4.78-perf+(ACW142)
OS API Level: 27
Device: bbf100
Manufacturer: BlackBerry
Model (and Product): BBF100-6 (bbf100dsglobal)

---

java.lang.NumberFormatException: For input string: "null"
    at java.lang.Long.parseLong(Long.java:590)
    at java.lang.Long.parseLong(Long.java:632)
    at it.niedermann.nextcloud.tables.ui.row.type.selection.SelectionEditor.setValue(SelectionEditor.java:84)
    at it.niedermann.nextcloud.tables.ui.row.type.selection.SelectionEditor.onCreate(SelectionEditor.java:49)
    at it.niedermann.nextcloud.tables.ui.row.ColumnEditView.<init>(ColumnEditView.java:73)
    at it.niedermann.nextcloud.tables.ui.row.type.selection.SelectionEditor.<init>(SelectionEditor.java:40)
    at it.niedermann.nextcloud.tables.ui.row.ColumnEditView$Factory.create(ColumnEditView.java:175)
    at it.niedermann.nextcloud.tables.ui.row.EditRowActivity.lambda$onCreate$1$it-niedermann-nextcloud-tables-ui-row-EditRowActivity(EditRowActivity.java:75)
    at it.niedermann.nextcloud.tables.ui.row.EditRowActivity$$ExternalSyntheticLambda0.accept(Unknown Source:8)
    at java.util.concurrent.CompletableFuture.uniAccept(CompletableFuture.java:664)
    at java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:640)
    at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:450)
    at android.os.Handler.handleCallback(Handler.java:790)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:164)
    at android.app.ActivityThread.main(ActivityThread.java:6558)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:469)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:826)

Cheers hamu

stefan-niedermann commented 6 months ago

Thank you for the report. The fix will be published with 1.1.3.