Content
View differences
Updated by Pavel Balashou 10 months ago
### Steps to reproduce
1. Wait for token Prerequisite: Have access to expire or break access\_token from rails console. a OpenProject and Nextcloud instance with a setup storage and user logged into OpenProject.
2. Open project storage from left hand side menu. Deploy OpenProject
3. See error.
4. Try again.
5. See project With the logged in user, click on the storage being opened successfully. link in the left hand menu
Similar behavior can be experienced in work package files tab.
### What is the buggy behavior?
* Token is refreshed, but used only in upcoming requests. A unexpected error occurs
### What is the expected behavior?
* Refreshed access token is used right in 1. OpenProject redirects to the same request as well. Nextcloud folder
<br>
### Investigation log
1. No errors found in AppSignal for community.
2. I tried to search logs for `Error while refreshing OAuth token - Payload:` and `Timeout while refreshing OAuth token. - Payload:`. Nothing.
3. Tried to check nextlcoud logs through UI: [https://nextcloud.openproject.org/settings/admin/logging](https://nextcloud.openproject.org/settings/admin/logging)
There are no entries older than Aug 8, 2025, 8:56:39 AM.
4. We looked at nextcloud logs through AppSignal and found the following pattern:
1. 401 on /ocs/v1.php/cloud/user
2. 200 on /apps/oauth2/api/v1/token
3. 401 on /ocs/v1.php/cloud/user again
5. Then we reproduced it on local setup and realized what the issue is.
1. Wait for token
2. Open project storage from left hand side menu.
3. See error.
4. Try again.
5. See project
Similar behavior can be experienced in work package files tab.
### What is the buggy behavior?
* Token is refreshed, but used only in upcoming requests.
### What is the expected behavior?
* Refreshed access token is used right in
<br>
### Investigation log
1. No errors found in AppSignal for community.
2. I tried to search logs for `Error while refreshing OAuth token - Payload:` and `Timeout while refreshing OAuth token. - Payload:`. Nothing.
3. Tried to check nextlcoud logs through UI: [https://nextcloud.openproject.org/settings/admin/logging](https://nextcloud.openproject.org/settings/admin/logging)
There are no entries older than Aug 8, 2025, 8:56:39 AM.
4. We looked at nextcloud logs through AppSignal and found the following pattern:
1. 401 on /ocs/v1.php/cloud/user
2. 200 on /apps/oauth2/api/v1/token
3. 401 on /ocs/v1.php/cloud/user again
5. Then we reproduced it on local setup and realized what the issue is.