Skip to content

[BUG] Token expires instead of being renewed #4332

Closed

Description

@individual-it

Actual behaviour

  • After not using the app for a while I get the message that the access token is expired
    Screenshot_20240229-085550
  • after clicking on "Anmelden" (login) and going through the login process on the webUI first time an "unknown error" was displayed and then again the same one about the expired token. But still it seemed to got some data, because the file list is updated:
    Screenshot_20240229-085605
  • The only way to get the app working is to "resync" through the accounts list

Expected behaviour

  • If the token has expired, login again should work

Steps to reproduce

  1. don't use the app for a couple of weeks
  2. try to use it when the token expired
  3. go through the login process

Can this problem be reproduced with the official owncloud server?
(url: https://demo.owncloud.org, user: test, password: test)

Environment data

Android version:
13
Device model:
Fairphone 3
Stock or customized system:
stock
ownCloud app version:
4.2.1
ownCloud server version:
ocis 5.0.0-rc5

Logs

Happy to share the android log if it can be done not in public

Activity

  1. JuancaG05 commented on Feb 29, 2024

    @JuancaG05
    Contributor

    Hi @individual-it! Thanks for opening a new issue! 🍻

    Sure, you can share the logs privately if you send them to [email protected], they will be very helpful to us 👍

  2. changed the title [-][BUG][/-] [+][BUG] Token expires instead of being renewed[/+] on Feb 29, 2024
  3. added this to the 4.3 - Future milestone on Mar 1, 2024
  4. modified the milestones: 4.4 - Current, Backlog on Oct 4, 2024
  5. kjeldahl commented on Mar 27, 2025

    @kjeldahl

    I am also seeing this error.
    ownCloud release version 4.5.0 (7bef18e)

  6. TermeHansen commented on Apr 28, 2025

    @TermeHansen

    I'm also having this issue, now on
    version 4.5.1 (43b8579)

  7. jesmrec commented on Apr 29, 2025

    @jesmrec
    Member

    We are aware of the problem, it's kind of random to reproduce (indeed, i can't). Would it be posible to share logs with the problem? we will provide you a safe way to do it, so that, we can research about it.

  8. TermeHansen commented on Apr 29, 2025

    @TermeHansen

    @jesmrec I just did it now with debugging enabled, and then it failed in first auth, but actually came fully through second time. Do you wan to have a look at this log? How should I share?

  9. jesmrec commented on Apr 29, 2025

    @jesmrec
    Member

    The first failed attemp is the problem you reproduced, right?

    You can push the log file here pwd: "I54<aV~f)nU0" without quotation marks

  10. TermeHansen commented on Apr 29, 2025

    @TermeHansen

    @jesmrec I just uploaded my log. Yes there was one failed attempt first, and then the second time my browser had the login from last time and it went through. Sometimes this has ended in an endless loop of trials with no success.

  11. jesmrec commented on Apr 29, 2025

    @jesmrec
    Member

    Thanks @TermeHansen, we will take a look ;)

  12. jesmrec commented on Apr 29, 2025

    @jesmrec
    Member

    My first and preliminary guess. I can see in the logs:

    ...
    D: 2025-04-29 14:02:13:321(RemoteOperationResult.java:322)RemoteOperationResult has processed UNHANDLED_HTTP_CODE: 400 Bad Request
    ...
    

    we may expect a 401 ...

  13. TermeHansen commented on Apr 30, 2025

    @TermeHansen

    I have a geo filter in front of my ocis domain (using Caddy) so only let request from my country gets through, do you think it could be related to that?

    I will at least try to stop the filter next time...

  14. jesmrec commented on Apr 30, 2025

    @jesmrec
    Member

    Well, it depends on the Caddy rules. If you can check without the filter taking new logs, it could be helpful

  15. modified the milestones: Backlog, 4.6 - Next on May 2, 2025
  16. jesmrec commented on May 29, 2025

    @jesmrec
    Member

    In this PR, we'll release a candidate to fix this problem. @TermeHansen , we can provide you a build to test it in your environment, it you wish to.

  17. TermeHansen commented on May 29, 2025

    @TermeHansen

    Sure, I can do that...

  18. jesmrec commented on May 29, 2025

    @jesmrec
    Member

    @TermeHansen you can download the apk from here

    Pwd: qCh70C/)Z^5(

    thanks a lot for your engagement!

  19. TermeHansen commented on May 29, 2025

    @TermeHansen

    Jep, just did, you can take it down, I will test in a bit...

  20. TermeHansen commented on May 29, 2025

    @TermeHansen

    So far so good. Login flow worked as it should straight through 🥳

  21. self-assigned this
    on Jun 10, 2025
  22. joragua commented on Jun 10, 2025

    @joragua
    Member

    We have taken a look to this bug and we can't reproduce it anymore in master branch since this fix: #4586 (the token is refreshed every 5 minutes and it is working well). I will close this issue then. Feel free to re-open it if you are able to reproduce the problem again 🙌🏻 . In any case, the fix will be included in the next release: 4.6.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions