Deck: REST-API only usable after web app has been opened at least once

Created on 24 Sep 2019  路  10Comments  路  Source: nextcloud/deck

Describe the bug
The REST-API does respond with error messages when it is used before the user has opened the web interface at least one time before.

To Reproduce
Steps to reproduce the behavior:

  1. Create new dummy user
  2. Do NOT open the deck app in the browser
  3. Use Android Deck App to connect
  4. See error in log (something like owner is null)

Expected behavior
REST-API can be used fully without opening it in the web interface. Maybe do first initialization stuff as post install hook or when using the REST-API (like checking a flag isInitialized and do initialization if flag is false)


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

1. to develop bug api

Most helpful comment

All 10 comments

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Please keep open @juliushaertl

@stefan-niedermann Do you have the actual log error available?

currently not, but if i am at my notebook back again, i will reproduce this error

Maybe @desperateCoder can explain better what exactly is happening here.

https://github.com/stefan-niedermann/nextcloud-deck/blob/9898c0135132b323c433f0bc33ce3fbd2bef7b88/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/SyncManager.java#L205

It has been a while since september, i do not remember exactly, but i let a hint there "this can be the case if the Deck app has never before been opened in the webinterface" - and voila - as soon as i opened the deck app on my test user the very first time, this does not happen anymore.

@stefan-niedermann i actually have no idea. safe to close?

No, create a new user, try to connect to it. Does only work, when the web UI for this user has at least been opened once. No log available yet

What do we need? Server response for this case? PHP logs from the server?

I don't see where this would fail on the server side, if the user has never opened the web interface the /boards endpoint will just return an empty array as no default "Personal" board has been created.

I'll prepare a pull request to create the initial board from the API as well, but I guess there is also an issue on the app side here.

Was this page helpful?
0 / 5 - 0 ratings