Nextcloud-deck: Exception when cloning board

Created on 16 Jul 2020  ·  10Comments  ·  Source: stefan-niedermann/nextcloud-deck

Hello. When trying to clone a board, I get the following message. It's a quite simple deck setup currently as there is just one board there.

This happens only on one of my two nextcloud instances I manage. On the other instance the board is cloned empty. Thought it should copy the elements, too?

App Version: 1.8.1
App Version Code: 1008001
App Flavor: fdroid

Files App Version Code: 30120190

---

OS Version: 4.14.116(10.0.0.161C432)
OS API Level: 29
Device: HWCLT
Manufacturer: HUAWEI
Model (and Product): CLT-L29 (CLT-L29)

---

java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Long it.niedermann.nextcloud.deck.model.User.getLocalId()' on a null object reference
    at it.niedermann.nextcloud.deck.persistence.sync.SyncManager.lambda$cloneBoard$7$SyncManager(SyncManager.java:488)
    at it.niedermann.nextcloud.deck.persistence.sync.-$$Lambda$SyncManager$sLmkwEpwVqDVSyvuCo_u9RxYPUo.run(Unknown Source:12)
    at java.lang.Thread.run(Thread.java:929)

🐞 bug

Most helpful comment

@skeal Regarding "clone cards when cloning a board": would you mind to open a new issue? I don't see a reason to not implement it 🙂

All 10 comments

Hi @skeal , thanks for the report!
I'll have a look at this. To make it easier for me: do you have any groups or circles involved in the board? You could try to create a test board with a few stacks/lists and try to clone it without shares or assigned users in it. Does that work on the broken instance?

The cards are not cloned though, this is as designed. @stefan-niedermann can surely tell us why, but I guess there are some reasons.

On the other instance the board is cloned empty. Thought it should copy the elements, too?

This is indeed currently expected behavior and matches the way the server app does it.
The "Clone board" function is meant to use a board as a template.

In the future we might provide the possibility to also clone cards though (via a checkbox).

Ok then I'll help with debugging. Sadly deck then isn't usable for me. I wanted to use it for our checks of the cars at the volunteer fire-brigade. So the cards would be the same every month including checkboxes.

@desperateCoder : No there i no assigned user at any kind. It's just a clean, newly created board with only 2 cards. The only thing that may differ from the other setup is, that LDAP (active directory) is used for user sync.

Yep. LDAP will be the problem here. The owner is not a user object, but a weird string. We really should see how to handle this...

Thanks for the note! That helps a lot!

I think we need a mechanism for groups, circles and LDAP @stefan-niedermann, I think we need a huge ticket here...

@skeal Regarding "clone cards when cloning a board": would you mind to open a new issue? I don't see a reason to not implement it 🙂

@skeal would you mind giving us a test-account on your instance? I don't need much, maybe some kB space for a board with a few test-cards, the important part is: it has to be a LDAP / AD user. I honestly have no idea how to set this up or something, this way I can work with your exact configuration and see, how I can handle this problem.

If you are ok with this, please send the credentials to @stefan-niedermann ([email protected]). This would really help a lot

@skeal would you mind giving us a test-account on your instance? I don't need much, maybe some kB space for a board with a few test-cards, the important part is: it has to be a LDAP / AD user. I honestly have no idea how to set this up or something, this way I can work with your exact configuration and see, how I can handle this problem.

If you are ok with this, please send the credentials to @stefan-niedermann ([email protected]). This would really help a lot

I've sent an email with login data. Please handle with care. On any help needed, feel free to ask (logfiles etc)

So, we were able to resolve this issue by doing the following workaround:

  • Remove the account from Deck app
  • Remove the account from Nextcloud Files app
  • Reconnect the account in Nextcloud Files app
  • Reconnect the account in Deck app

By using an intentional broken version with some extra logging we found the root cause in mismatching user IDs. When using LDAP, there seemed to be a timespan, where the Files app imported the LDAP user id as the accounts userName. But deck is giving us the real login-UID of the user, which obviously didn't match. The current behaviour of the Files app seems to have changed, newly imported accounts seem to have the right userName

@tobiasKaminsky or @David-Development: is there any way to prevent this in future? I guess the files-side of the SSO could be capable of recognize the LDAP-String and resolve the real account name? Any chances?

where the Files app imported the LDAP user id as the accounts userName

We did a transition to userId a while ago (I guess even before Deck was released).
Maybe there is a problem with the transition…

I will close this issue as we were able to solve it for @skeal (please reopen if i didn't remember correctly).

@tobiasKaminsky

We did a transition to userId a while ago (I guess even before Deck was released).
Maybe there is a problem with the transition…

If we can provide help (open an issue in your tracker or so) let us know!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

R4U5CH1337 picture R4U5CH1337  ·  3Comments

jancborchardt picture jancborchardt  ·  7Comments

loicvh picture loicvh  ·  3Comments

timkrief picture timkrief  ·  3Comments

cappuMUC picture cappuMUC  ·  3Comments