Closed BMerz closed 6 months ago
The dashboard loads every widget available for every request, even if they're not actually enabled. Since the passwords widget also needs a token, i guess this can take a while on a RaspberryPI.
I will add an additional check to not load the widget if not needed and cache the token so the time is lower for repeat requests.
Thanks @marius-wieschollek for the fast response and action!
Will this update also be available for NC 27 / PHP 8.1 server? Since an update to NC 28 and PHP 8.2 will take some time for raspberrypi users it would be nice if this could be fixed. I'm asking because the appstore tells me version 2023.12.31 was the last one for older setups.
This issue is also happening on a VPS which should be faster than a Raspberri Pi.
But why other apps are involved too with the Passwords widget?
{"reqId":"","level":3,"time":"2023-12-23T11:42:29+00:00","remoteAddr":"","user":"","app":"no app in context","method":"GET","url":"/ocs/v2.php/apps/dashboard/api/v1/widgets","message":"Dashboard widget passwords-widget took 2.13 seconds to load.","userAgent":"","version":"27.1.5.1","data":[]}
{"reqId":"","level":3,"time":"2023-12-23T11:42:38+00:00","remoteAddr":"","user":"","app":"no app in context","method":"GET","url":"/ocs/v2.php/apps/dashboard/api/v2/widget-items?widgets%5B%5D=collectives-recent-pages","message":"Dashboard widget passwords-widget took 5.36 seconds to load.","userAgent":"","version":"27.1.5.1","data":[]}
{"reqId":"","level":3,"time":"2023-12-23T11:42:39+00:00","remoteAddr":"","user":"","app":"no app in context","method":"GET","url":"/ocs/v2.php/apps/dashboard/api/v2/widget-items?widgets%5B%5D=user_status","message":"Dashboard widget passwords-widget took 6.53 seconds to load.","userAgent":"","version":"27.1.5.1","data":[]}
{"reqId":"","level":3,"time":"2023-12-23T11:42:40+00:00","remoteAddr":"","user":"","app":"no app in context","method":"GET","url":"/ocs/v2.php/apps/dashboard/api/v2/widget-items?widgets%5B%5D=mail-unread","message":"Dashboard widget passwords-widget took 6.86 seconds to load.","userAgent":"","version":"27.1.5.1","data":[]}
{"reqId":"","level":3,"time":"2023-12-23T11:42:40+00:00","remoteAddr":"","user":"","app":"no app in context","method":"GET","url":"/ocs/v2.php/apps/dashboard/api/v2/widget-items?widgets%5B%5D=recommendations","message":"Dashboard widget passwords-widget took 7.17 seconds to load.","userAgent":"","version":"27.1.5.1","data":[]}
{"reqId":"","level":3,"time":"2023-12-23T11:42:40+00:00","remoteAddr":"","user":"","app":"no app in context","method":"GET","url":"/ocs/v2.php/apps/dashboard/api/v2/widget-items?widgets%5B%5D=mail","message":"Dashboard widget passwords-widget took 7.26 seconds to load.","userAgent":"","version":"27.1.5.1","data":[]}
{"reqId":"","level":3,"time":"2023-12-23T11:42:40+00:00","remoteAddr":"","user":"","app":"no app in context","method":"GET","url":"/ocs/v2.php/apps/dashboard/api/v2/widget-items?widgets%5B%5D=calendar","message":"Dashboard widget passwords-widget took 7.61 seconds to load.","userAgent":"","version":"27.1.5.1","data":[]}
running yesterday release 2024.3.20 the issue https://github.com/marius-wieschollek/passwords/issues/624 still persists :(
Why not to remove the date from the event of the session?
Why not to remove the date from the event of the session?
I don't understand what you're trying to say.
Also i can no longer reproduce either of these issues.
The session name is recorded including a time and date stamp when session names could be function specific so they can be reused/over written.
When enabling passwords and refreshing the dashboard multiple sessions are logged like in the issue referenced.
Using a fully patched instance and latest app updates.
Issue #624 should be re opened is still happening basically.
The app reuses the same session as long as the token is stored in your Nextcloud session. The timestamp is just part of the name, it's not used for any technical functionality.
I have tested the session functionality on test.passwordsapp.org and it works as intended:
I still get many session logged every 15-20 min a new session comes in during the hours I'm working on the web ui.
I have many more apps
Calendar, talk, photos, files, and few others and this happens when I refresh the dashboard screen and the password widget is not enabled. I only have calendar, activity and weather widgets enabled.
3-4 sessions per hour is not excessive. In 624, users got 10+ sessions per minute. That has been fixed.
I checked the lifetime of how long the token is being stored in the session. It's 10 minutes by default, uses with E2EE/CSE enabled can set this to up to an hour in the expert settings.
In my testing, i can also not see that the app is creating sessions on its own, so if you get a new session every 15 - 20 min, it's because you have opened the app or the dashboard. The tokens are temporary, so NC will automatically clean up after some time.
I have checked the logs of all my servers for any loading time warning related to the passwords app dashboard widget. I have found none. So i assume that the issue has been resolved on any reasonably sized Nextcloud instance.
I will close this ticket now. if you still experience any issues, please open a new bug report with all the information necessary to reproduce the issue. If you have any more questions, please use one of the support channels to ask them.
⚠️ This issue respects the following points: ⚠️
Server Information
Client Information
Browser and Version: Firefox 115.5.0esr (64-Bit) Client OS and Version: Linux, Debian 12.2
Bug description
I have not activated the Passwords widget on the Dashboard page. But I see an error in the nextcloud server log, that the widget takes several seconds to load.
Steps to reproduce
Expected behavior
Nextcloud Logs
Browser Logs