Nextcloud-deck: Error at syncing sincing one board of one of my accounts on one of my servers

Created on 30 Jul 2020  Β·  14Comments  Β·  Source: stefan-niedermann/nextcloud-deck

How to use GitHub

  • Please use the πŸ‘ reaction to show that you are interested into the same feature.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Describe the bug

Since a few updates of the android desk app I can't sync one board of one of my account on one of my servers. It says it has an error at syncing.

Expected behavior

The desk android app should sync my board like before.

Versions

  • Nextcloud: 19.0.1
  • Nextcloud Deck: 1.0.5
  • Nextcloud Android: 3.12.1
  • Nextcloud Android Deck: 1.9.3

Smartphone (please complete the following information):

  • Device: Samsung Galaxy S10 (Fingerprint: Google Pixel 4)
  • Android-Version: LineageOS 17.1 (Android 10.1)
  • App-Store:

    • ❔ Google Play Store

    • βœ” F-Droid

Stacktrace

App Version: 1.9.3
App Version Code: 1009003
App Flavor: fdroid

Deck Server Version: 1.0.5

Files App Version Code: 30120190

---

OS Version: 4.14.113-gfe8f81568d52(6506677)
OS API Level: 29
Device: flame
Manufacturer: Google
Model (and Product): Pixel 4 (flame)

---

it.niedermann.nextcloud.deck.exceptions.TraceableException: Sorry, a wild error appeared!

⚠️ If you want to tell us about the following issue, please make sure to censor sensitive data beforehand! ⚠️

Failed to run traceable code with arguments:
{"title":"Version 1.11","boardId":2,"deletedAt":0,"lastModified":1595999512,"cards":[{"title":"Edit camera frustrum","description":"[Reference Message](https://discordapp.com/channels/441656243346735115/441658028782125076/731627891292635248)","stackId":23,"type":"plain","lastModified":1595999512,"lastEditor":null,"createdAt":1594614450,"labels":[{"title":"Enhancement","color":"399a2c","boardId":2,"cardId":89,"lastModified":1586440033,"id":9},{"title":"Level Manager","color":"ac5753","boardId":2,"cardId":89,"lastModified":1586429414,"id":19}],"assignedUsers":[{"id":72,"participant":"pilzinsel64","cardId":89,"type":null}],"attachments":null,"attachmentCount":0,"owner":{"primaryKey":"pilzinsel64","uid":"pilzinsel64","displayname":"Pilzinsel64","type":0},"order":0,"archived":false,"duedate":null,"deletedAt":0,"commentsUnread":0,"id":89,"overdue":0},{"title":"Render optimations","description":"# Todo\n- [ ] Textures not clamping\n- [ ] IA and I textures are invisible\n- [ ] vertex colorings appearing way off\n\n# References\n\n[Reference Message](https://discordapp.com/channels/441656243346735115/441657959911653376/732593604177952800)","stackId":23,"type":"plain","lastModified":1595999512,"lastEditor":null,"createdAt":1594741953,"labels":[{"title":"Bug","color":"ad1818","boardId":2,"cardId":91,"lastModified":1586440039,"id":10},{"title":"Confirmed","color":"317CCC","boardId":2,"cardId":91,"lastModified":1586428742,"id":13}],"assignedUsers":[],"attachments":null,"attachmentCount":0,"owner":{"primaryKey":"pilzinsel64","uid":"pilzinsel64","displayname":"Pilzinsel64","type":0},"order":1,"archived":false,"duedate":null,"deletedAt":0,"commentsUnread":0,"id":91,"overdue":0},{"title":"Import/Export (part of) Levels","description":"# Todo\n## General\n- [x] Prepair code for <font  color=\"green\">JSON</font> serialization\n- [ ] Implementation to Level Manager\n- [x] Controller\n\n## Functions\n- [x] Export functions\n- [x] Import functions\n\n## GUI\n- [ ] GUI for import\n\n# Infos\n## Features\n- Be able to export the whole area or just some parts of it.\n- Be able to import the whole area (if available) from that file or just parts of it.\n- What can be exported (selected, Radio Buttons):\n  - Whole area\n  - Objects\n    - Include all\n    - Choose single ones\n  - Warps\n    - Include all\n    - Choose single ones\n## File formats\n- JSON file format\n  - Extra class that contains a list of the new type `ContentHolder` that has an property `object Content`.\n  - Serialize with `@type` node (remember type of objects).\n# Feature Requests\n## TheGreatDuck#9159\nSee [πŸ“Ž beeg_request.txt](/pilzcloud/apps/deck/cards/90/attachment/10)","stackId":23,"type":"plain","lastModified":1595999512,"lastEditor":null,"createdAt":1594701665,"labels":[{"title":"Enhancement","color":"399a2c","boardId":2,"cardId":90,"lastModified":1586440033,"id":9},{"title":"Confirmed","color":"317CCC","boardId":2,"cardId":90,"lastModified":1586428742,"id":13},{"title":"Doing","color":"094195","boardId":2,"cardId":90,"lastModified":1586956672,"id":16},{"title":"Level Editor","color":"ac5753","boardId":2,"cardId":90,"lastModified":1586429423,"id":20}],"assignedUsers":[{"id":73,"participant":"pilzinsel64","cardId":90,"type":null}],"attachments":null,"attachmentCount":1,"owner":{"primaryKey":"pilzinsel64","uid":"pilzinsel64","displayname":"Pilzinsel64","type":0},"order":2,"archived":false,"duedate":null,"deletedAt":0,"commentsUnread":0,"id":90,"overdue":0},{"title":"Data Editor for Objects and Warps","description":"# Todo\n- Edit Objects and Warps in a Data Table\n  - [ ] Normal 3D Objects\n  - [ ] Connected Warps\n  - [ ] Instant Warps\n  - [ ] Painting Warps\n- [ ] Import function\n- [ ] Export function\n- [ ] GUI\n\n# Features\n- Edit Objects and Warps in a Data Table.\n- Export all or selected content as CSV\n  - Include file formats to SaveFileDialog: VSC\n  - Add radiobuttons to SavFileDialog:\n    - Splitter char: `;` (Default)\n    - Splitter char: `,`\n- Import all content from a CSV\n# Feature Requests\n## TheGreatDuck#9159\nSee [πŸ“Ž beeg_request.txt](/pilzcloud/apps/deck/cards/90/attachment/10)","stackId":23,"type":"plain","lastModified":1595999512,"lastEditor":null,"createdAt":1595581955,"labels":[{"title":"Enhancement","color":"399a2c","boardId":2,"cardId":96,"lastModified":1586440033,"id":9},{"title":"Confirmed","color":"317CCC","boardId":2,"cardId":96,"lastModified":1586428742,"id":13},{"title":"Doing","color":"094195","boardId":2,"cardId":96,"lastModified":1586956672,"id":16},{"title":"New Module","color":"ac5753","boardId":2,"cardId":96,"lastModified":1586429394,"id":17},{"title":"Level Editor","color":"ac5753","boardId":2,"cardId":96,"lastModified":1586429423,"id":20}],"assignedUsers":[],"attachments":null,"attachmentCount":0,"owner":{"primaryKey":"pilzinsel64","uid":"pilzinsel64","displayname":"Pilzinsel64","type":0},"order":3,"archived":false,"duedate":null,"deletedAt":0,"commentsUnread":0,"id":96,"overdue":0},{"title":"Shadow Editor","description":"# Feature Request\n```\nAnonyme Antwort\nFreitag, 24. Juli 2020 08:29\n\n1. For what module is this feature?\nCustom Objects\n\n2. How would you name your feature?\nShadow Editor\n\n3. Please describe your feature detailed:\nAllow users to add and edit shadows on imported models. Models are currently imported with hardcoded geolayouts in `Geolayout.cs` using the `0x20` instruction. Shadows can be added using the `0x16` instruction, but it is 4 bytes longer than the `0x20` instruction, so this cannot be done via hex editing. This must be done in Rom Manager to prevent overwriting data in the ROM. Users should be able to edit the shadow type, size, and opacity. I have already done some coding for this to provide wireframes, and can also complete the feature if you would like to accept my help on this.\n\n4. Please provide me some screenshots, mockups or other helpful ressources, if possible: (πŸ—’1)\ncontext menu wireframe: https://ibb.co/dBwTfFM\ndialog wireframe https://ibb.co/PrvwyPm\nGeolayout `0x16` instruction documentation: https://hack64.net/wiki/doku.php?id=super_mario_64:geometry_layout_commands#start_geo_layout_with_shadow\n\n5. What version of the ROM Manager are you using right now? (e.g. \"Version 1.9.0.0 Beta\")\n1.9.15\n\n6. How can you be contacted If there are more questions open?\nDiscord: Zenonx#9532\n```","stackId":23,"type":"plain","lastModified":1595999512,"lastEditor":null,"createdAt":1595833403,"labels":[{"title":"Enhancement","color":"399a2c","boardId":2,"cardId":97,"lastModified":1586440033,"id":9},{"title":"Done","color":"7C31CC","boardId":2,"cardId":97,"lastModified":1586428755,"id":11},{"title":"Custom Objects Manager","color":"ac5753","boardId":2,"cardId":97,"lastModified":1586611648,"id":33}],"assignedUsers":[],"attachments":null,"attachmentCount":0,"owner":{"primaryKey":"pilzinsel64","uid":"pilzinsel64","displayname":"Pilzinsel64","type":0},"order":4,"archived":false,"duedate":null,"deletedAt":0,"commentsUnread":0,"id":97,"overdue":0}],"order":3,"id":23}
Cause: Sorry, a wild error appeared!

⚠️ If you want to tell us about the following issue, please make sure to censor sensitive data beforehand! ⚠️

Failed to run traceable code with arguments:
{"title":"Edit camera frustrum","description":"[Reference Message](https://discordapp.com/channels/441656243346735115/441658028782125076/731627891292635248)","stackId":23,"type":"plain","lastModified":1595999512,"lastEditor":null,"createdAt":1594614450,"labels":[{"title":"Enhancement","color":"399a2c","boardId":2,"cardId":89,"lastModified":1586440033,"id":9},{"title":"Level Manager","color":"ac5753","boardId":2,"cardId":89,"lastModified":1586429414,"id":19}],"assignedUsers":[{"id":72,"participant":"pilzinsel64","cardId":89,"type":null}],"attachments":null,"attachmentCount":0,"owner":{"primaryKey":"pilzinsel64","uid":"pilzinsel64","displayname":"Pilzinsel64","type":0},"order":0,"archived":false,"duedate":null,"deletedAt":0,"commentsUnread":0,"id":89,"overdue":0}
Cause: Not a JSON Object: "pilzinsel64"
    at it.niedermann.nextcloud.deck.api.JsonToEntityParser.parseStack(JsonToEntityParser.java:530)
    at it.niedermann.nextcloud.deck.api.JsonToEntityParser.parseJsonObject(JsonToEntityParser.java:51)
    at it.niedermann.nextcloud.deck.api.NextcloudArrayDeserializer.deserialize(NextcloudArrayDeserializer.java:36)
    at it.niedermann.nextcloud.deck.api.NextcloudArrayDeserializer.deserialize(NextcloudArrayDeserializer.java:18)
    at com.google.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:69)
    at com.google.gson.Gson.fromJson(Gson.java:932)
    at com.google.gson.Gson.fromJson(Gson.java:897)
    at com.nextcloud.android.sso.api.NextcloudAPI.convertStreamToTargetEntity(NextcloudAPI.java:122)
    at com.nextcloud.android.sso.api.NextcloudAPI.lambda$performRequestObservableV2$1$NextcloudAPI(NextcloudAPI.java:98)
    at com.nextcloud.android.sso.api.-$$Lambda$NextcloudAPI$HPzOdi9LOc_f-wA9GNnhc9LKQSM.subscribe(Unknown Source:6)
    at io.reactivex.internal.operators.observable.ObservableFromPublisher.subscribeActual(ObservableFromPublisher.java:31)
    at io.reactivex.Observable.subscribe(Observable.java:12284)
    at io.reactivex.internal.operators.observable.ObservableMap.subscribeActual(ObservableMap.java:32)
    at io.reactivex.Observable.subscribe(Observable.java:12284)
    at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeTask.run(ObservableSubscribeOn.java:96)
    at io.reactivex.Scheduler$DisposeTask.run(Scheduler.java:578)
    at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66)
    at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
    at java.lang.Thread.run(Thread.java:919)
Caused by: it.niedermann.nextcloud.deck.exceptions.TraceableException: Sorry, a wild error appeared!

⚠️ If you want to tell us about the following issue, please make sure to censor sensitive data beforehand! ⚠️

Failed to run traceable code with arguments:
{"title":"Edit camera frustrum","description":"[Reference Message](https://discordapp.com/channels/441656243346735115/441658028782125076/731627891292635248)","stackId":23,"type":"plain","lastModified":1595999512,"lastEditor":null,"createdAt":1594614450,"labels":[{"title":"Enhancement","color":"399a2c","boardId":2,"cardId":89,"lastModified":1586440033,"id":9},{"title":"Level Manager","color":"ac5753","boardId":2,"cardId":89,"lastModified":1586429414,"id":19}],"assignedUsers":[{"id":72,"participant":"pilzinsel64","cardId":89,"type":null}],"attachments":null,"attachmentCount":0,"owner":{"primaryKey":"pilzinsel64","uid":"pilzinsel64","displayname":"Pilzinsel64","type":0},"order":0,"archived":false,"duedate":null,"deletedAt":0,"commentsUnread":0,"id":89,"overdue":0}
Cause: Not a JSON Object: "pilzinsel64"
    at it.niedermann.nextcloud.deck.api.JsonToEntityParser.parseCard(JsonToEntityParser.java:340)
    at it.niedermann.nextcloud.deck.api.JsonToEntityParser.lambda$parseStack$12(JsonToEntityParser.java:545)
    at it.niedermann.nextcloud.deck.api.-$$Lambda$JsonToEntityParser$PlcXUu1u8LNgp7aOPq437OOzOqY.run(Unknown Source:6)
    at it.niedermann.nextcloud.deck.exceptions.TraceableException.makeTraceableIfFails(TraceableException.java:13)
    ... 23 more
Caused by: java.lang.IllegalStateException: Not a JSON Object: "pilzinsel64"
    at com.google.gson.JsonElement.getAsJsonObject(JsonElement.java:91)
    at it.niedermann.nextcloud.deck.api.JsonToEntityParser.lambda$parseCard$8(JsonToEntityParser.java:365)
    at it.niedermann.nextcloud.deck.api.-$$Lambda$JsonToEntityParser$ar3RHPP0QM1zvvkXYGeTM-aSu2Y.run(Unknown Source:6)
    at it.niedermann.nextcloud.deck.exceptions.TraceableException.makeTraceableIfFails(TraceableException.java:13)
    ... 27 more

🐞 bug

Most helpful comment

Awwwwww

IMG_20200801_160324_653

All 14 comments

Hi @Pilzinsel64, thanks for the report!

It seems the server doesn't return the assigned users in the proper structure. Due to fragmentation we often have this kind of problem, especially with the assigned users.

I'd like to fix that, would you help us testing a possible fix? I have a plan how we can get this more tolerant, but I need someone with this special constellation who can confirm my fix isn't garbage... Would you?

I'd try to fix this and provide a custom APK for you. All you'd need to do is to see if the sync starts working again for all your accounts.

Of course, I am glad to help! Will test all the APKs you will provide me.

Btw, maybe this can help you. I guess the error in the android app happens because the blue user after updating from v0.8 to 1.0. The blue user was "pilzinsel64" before the update. And in the trance log I can read:

Cause: Not a JSON Object: "pilzinsel64"

See this issue: https://github.com/nextcloud/deck/issues/2154

blue unnamed user on card

Probably he's just drunk! :laughing:

Okay, yeah, this might be the root cause. I suspect the server app to not properly did an migration while upgrading to the new version. This should definitely be fixed.

Though it would still be great if @desperateCoder could provide (and you could test) a more tolerant version which is capable of handling such edge cases more gracefully.

Probably he's just drunk! πŸ˜†

😁

Ok, so here you go: (βˆ©ο½€-Β΄)βŠƒβ”β˜†οΎŸ.*ο½₯q゚

Btw, maybe this can help you. I guess the error in the android app happens because the blue user after updating from v0.8 to 1.0. The blue user was "pilzinsel64" before the update.

Indeed, this could be the root cause why the user is returned that strange way, but anyways, the UID of the user is correct, only the structure is broken. So maybe we're lucky here.

Probably he's just drunk! :laughing:

Maybe :smile:, but if my fix really works, I'd say I was drunk at some point, too. The fix is so stupid and simple, that I am actually asking myself, why i didn't handle it that way eversince... :man_shrugging:

Just in case @Pilzinsel64 didn't notice: The ASCII magician is the link to the .apk-file (took me longer to notice than i want to admit...)

https://github.com/stefan-niedermann/nextcloud-deck/suites/983967566/artifacts/12614881

Alright, the main problem was solved!

But now I get another error when syncing the other two accounts on other servers. But I guess that's an seperated issue. However, it doesn't happen in the latest stabel version, so here is the stack trace:

Alright, after clearing the data of the dev app I added all accounts again. This time, everything worked fine! Everything works as expected now!

Trace log:

App Version: 1.9.3
App Version Code: 1009003
App Flavor: dev

Deck Server Version: 1.0.5

Files App Version Code: 30120190

---

OS Version: 4.14.113-gfe8f81568d52(6506677)
OS API Level: 29
Device: flame
Manufacturer: Google
Model (and Product): Pixel 4 (flame)

---

java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Long it.niedermann.nextcloud.deck.model.Card.getStackId()' on a null object reference
    at it.niedermann.nextcloud.deck.persistence.sync.helpers.providers.CardDataProvider.goDeeperForUpSync(CardDataProvider.java:237)
    at it.niedermann.nextcloud.deck.persistence.sync.helpers.providers.StackDataProvider.goDeeperForUpSync(StackDataProvider.java:120)
    at it.niedermann.nextcloud.deck.persistence.sync.helpers.providers.BoardDataProvider.goDeeperForUpSync(BoardDataProvider.java:126)
    at it.niedermann.nextcloud.deck.persistence.sync.helpers.SyncHelper.doUpSyncFor(SyncHelper.java:105)
    at it.niedermann.nextcloud.deck.persistence.sync.helpers.SyncHelper.doUpSyncFor(SyncHelper.java:85)
    at it.niedermann.nextcloud.deck.persistence.sync.SyncManager$3$1.lambda$onResponse$0$SyncManager$3$1(SyncManager.java:236)
    at it.niedermann.nextcloud.deck.persistence.sync.-$$Lambda$SyncManager$3$1$_pEMrPKc-nDkeuO3bebb8hu3RB0.run(Unknown Source:6)
    at java.lang.Thread.run(Thread.java:919)

Woohoo πŸ₯³

It's up to @desperateCoder whether he wants to analyze the NullPointer. Guess it was a server hickup, but we aim for a more tolerant sync in the long term.

I don't think the server screwed up at the NPE, since it happened in the upsync. That's quite weird, I guess it was some kind of hickup tho, but it has no relation to my fix. As long as this won't come up any more, I think I'm happy with the current solution.

@stefan-niedermann: https://github.com/stefan-niedermann/nextcloud-deck/pull/634

Fix will be shipped with version 1.9.4.

Oh, and @Pilzinsel64 thanks for your help fixing this issue!

Btw: I personally like the fact, that our app is being used by a such broad variety of users, but when I see a N64 modder, i get proud. I never had a N64, but i got a Retropie now, so chances aren't too few, that i will run _your_ software one day :wink:

Oh, and @Pilzinsel64 thanks for your help fixing this issue!

@desperateCoder I liked to help very much. It's wonderful for me if I can help, anytime. πŸ˜‰

Btw: I personally like the fact, that our app is being used by a such broad variety of users, but when I see a N64 modder, i get proud.

Nextcloud is a really beautiful cloud system that can be used in soo many situations. I personaly have three cloud instances. One for my company, one for my private uses and friends, and one for me as Pilzinsel64 and the community.
Thanks to people like you there exist soo many wonderful apps (also for android) that extends this nice expirience.
And at the end, for the user everything is free. That's the biggest point, I guess.
However, thank you (all) for your beautiful work on all the Nextcloud Apps. You (all) do really good work. πŸ‘

I really like to help at the Nextcloud community. I even would help to contribute but I have only very basic php knowledge. But I am really good in .NET programming. I was thinking about writing a Nextcloud Desktop client for Windows/Max/Linux in .NET Core but there is already a really nice desktop client.

I never had a N64, but i got a Retropie now, so chances aren't too few, that i will run _your_ software one day πŸ˜‰

If you want to mod SM64, why not? I'd be pleased! πŸ˜€ If you ever join the community, just let me know who you are. πŸ˜‰

Awwwwww

IMG_20200801_160324_653

Was this page helpful?
0 / 5 - 0 ratings

Related issues

stefan-niedermann picture stefan-niedermann  Β·  5Comments

stefan-niedermann picture stefan-niedermann  Β·  7Comments

cappuMUC picture cappuMUC  Β·  3Comments

timkrief picture timkrief  Β·  3Comments

lachmanfrantisek picture lachmanfrantisek  Β·  7Comments