Content
View differences
Updated by Wieland Lindenthal over 3 years ago
### Steps to reproduce
_Please write down the steps to reproduce. Try to write down all necessary preconditions (what permissions do you have, are other users involved?). Example:_
1. Login to my own Nextcloud working installation
2. Update OpenProject integration app to v2.2.1
3. Check for OpenProject settings
4. The server name has been lost and the Openproject app tells to every user that the app is broken and to contact an admin
### What is the buggy behavior?
_Please describe the bug with as most details as possible. Example:_
* The issue is I can't reset the the app anymore. I am trying to pair the two server once again but with no luck. I can copy&paste the secure shared key from OpenProject to Nextcloud but when I try to ask to the nextcloud app the new keys to copy to OpenProject the two fields are blank. I can see an error thrown on the Nextcloud logs.
Related issue: I tried to reset the entire installation using the command [shown here](https://github.com/nextcloud/integration_openproject#setting-up-the-integration-as-an-administrator-with-api) but (my fault) wasn't able to properly use it. The guide tells I am supposed to use:
`curl -XDELETE -uadmin:admin http://<nextcloud_host>/index.php/apps/integration_openproject/setup`
but I wasn't able to understand the user I should use. I tried to use the command like this with no luck:
`curl -XDELETE -uEmanuele:<per-app-generated-password> http://<nextcloud_host>/index.php/apps/integration_openproject/setup`
I tried to rollback the app to the previous release but something is broken in the database now so using the older app will not fix the issue.
### What is the expected behavior?
_Describe how the application should behave like. Example:_
1. Setup the connection between the two server once again
### Important note
_Please note that unless you are a contributor to OpenProject, you can no longer edit this bug report after saving. You can still add new comments, but no longer add any new images or other attachments. Please make sure that all necessary information and attachments are added, and the following attributes are set:_
### **Logs**
_Are there errors in the browser console? (_[_Click here for information on how to open your browser's console_](https://webmasters.stackexchange.com/a/77337)_) For a local installation: Are there relevant logs output by_ `_openproject logs_` _(packaged installation) (_[_click here for details_](https://docs.openproject.org/installation-and-operations/operation/monitoring/#show-logs)_) or in a log/production.log or /var/log/openproject/ ? Please attach error output in these log files if applicable_
Nextcloud raw logs:
```text
{"reqId":"qjThyuh9Ma0ajN0nBIRx","level":3,"time":"2023-01-29T23:08:27+00:00","remoteAddr":"127.0.0.1","user":"Emanuele","app":"index","method":"PUT","url":"/apps/integration_openproject/admin-config","message":"Call to undefined method OCA\\OpenProject\\Service\\OpenProjectAPIService::revokeUserOAuthToken() in file '/var/www/nextcloud/apps/integration_openproject/lib/Controller/ConfigController.php' line 236","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36","version":"25.0.3.2","exception":{"Exception":"Exception","Message":"Call to undefined method OCA\\OpenProject\\Service\\OpenProjectAPIService::revokeUserOAuthToken() in file '/var/www/nextcloud/apps/integration_openproject/lib/Controller/ConfigController.php' line 236","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1047,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","Line":165,"Previous":{"Exception":"Error","Message":"Call to undefined method OCA\\OpenProject\\Service\\OpenProjectAPIService::revokeUserOAuthToken()","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/User/Manager.php","line":533,"function":"OCA\\OpenProject\\Controller\\{closure}","class":"OCA\\OpenProject\\Controller\\ConfigController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/apps/integration_openproject/lib/Controller/ConfigController.php","line":263,"function":"callForAllUsers","class":"OC\\User\\Manager","type":"->"},{"file":"/var/www/nextcloud/apps/integration_openproject/lib/Controller/ConfigController.php","line":287,"function":"setIntegrationConfig","class":"OCA\\OpenProject\\Controller\\ConfigController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":225,"function":"setAdminConfig","class":"OCA\\OpenProject\\Controller\\ConfigController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":133,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1047,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/apps/integration_openproject/lib/Controller/ConfigController.php","Line":236},"CustomMessage":"--"},"id":"63d6fce52ea5b"}
```
_Formatted logs:_
```text
[index] Errore: Exception: Call to undefined method OCA\OpenProject\Service\OpenProjectAPIService::revokeUserOAuthToken() in file '/var/www/nextcloud/apps/integration_openproject/lib/Controller/ConfigController.php' line 236 at <<closure>>
0. /var/www/nextcloud/lib/private/AppFramework/App.php line 172
OC\AppFramework\Http\Dispatcher->dispatch()
1. /var/www/nextcloud/lib/private/Route/Router.php line 298
OC\AppFramework\App::main()
2. /var/www/nextcloud/lib/base.php line 1047
OC\Route\Router->match()
3. /var/www/nextcloud/index.php line 36
OC::handleRequest()
PUT /apps/integration_openproject/admin-config
from 127.0.0.1 by Emanuele at 2023-01-29T23:08:27+00:00
```
### Screenshots and other files
_If you have screenshots of the application's bug behavior or other relevant files, please drag them into this place or attach them using the "Files" section._
### Environment information
_Please check and fill out the following details to help us identify in what versions and distributions of OpenProject the error occurs_
**OpenProject installation type**
* [ ] Hosted cloud edition
* [x] Packaged installation
* What distribution? Linux 5.10.0-20-amd64 [#1](https://community.openproject.org/work_packages/1) SMP Debian 5.10.158-2 (2022-12-13) x86\_64
* [ ] Docker All-in-one container
* [ ] Docker-compose installation
* [ ] Other (please specify)
**OpenProject version**
_If you're not running on the cloud edition, please specify the version of OpenProject you're running. Example: v12.1.5_
_v12.4.2_
**Browser**
* [x] Chrome
* [x] Firefox
* [ ] Safari
* [ ] Mobile Safari
* [ ] Other (please specify)
**Language**
_Please specify the browser language and the language of the OpenProject user for which the bug occurred._
2. Update OpenProject integration app to v2.2.1
3. Check for OpenProject settings
4. The server name has been lost and the Openproject app tells to every user that the app is broken and to contact an admin
### What is the buggy behavior?
Related issue: I tried to reset the entire installation using the command [shown here](https://github.com/nextcloud/integration_openproject#setting-up-the-integration-as-an-administrator-with-api) but (my fault) wasn't able to properly use it. The guide tells I am supposed to use:
`curl -XDELETE -uadmin:admin http://<nextcloud_host>/index.php/apps/integration_openproject/setup`
but I wasn't able to understand the user I should use. I tried to use the command like this with no luck:
`curl -XDELETE -uEmanuele:<per-app-generated-password> http://<nextcloud_host>/index.php/apps/integration_openproject/setup`
I tried to rollback the app to the previous release but something is broken in the database now so using the older app will not fix the issue.
### What is the expected behavior?
###
_Please note that unless you are a contributor to OpenProject, you can no longer edit this bug report after saving. You can still add new comments, but no longer add any new images or other attachments. Please make sure that all necessary information and attachments are added, and the following attributes are set:_
###
```text
{"reqId":"qjThyuh9Ma0ajN0nBIRx","level":3,"time":"2023-01-29T23:08:27+00:00","remoteAddr":"127.0.0.1","user":"Emanuele","app":"index","method":"PUT","url":"/apps/integration_openproject/admin-config","message":"Call to undefined method OCA\\OpenProject\\Service\\OpenProjectAPIService::revokeUserOAuthToken() in file '/var/www/nextcloud/apps/integration_openproject/lib/Controller/ConfigController.php' line 236","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36","version":"25.0.3.2","exception":{"Exception":"Exception","Message":"Call to undefined method OCA\\OpenProject\\Service\\OpenProjectAPIService::revokeUserOAuthToken() in file '/var/www/nextcloud/apps/integration_openproject/lib/Controller/ConfigController.php' line 236","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1047,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","Line":165,"Previous":{"Exception":"Error","Message":"Call to undefined method OCA\\OpenProject\\Service\\OpenProjectAPIService::revokeUserOAuthToken()","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/User/Manager.php","line":533,"function":"OCA\\OpenProject\\Controller\\{closure}","class":"OCA\\OpenProject\\Controller\\ConfigController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/apps/integration_openproject/lib/Controller/ConfigController.php","line":263,"function":"callForAllUsers","class":"OC\\User\\Manager","type":"->"},{"file":"/var/www/nextcloud/apps/integration_openproject/lib/Controller/ConfigController.php","line":287,"function":"setIntegrationConfig","class":"OCA\\OpenProject\\Controller\\ConfigController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":225,"function":"setAdminConfig","class":"OCA\\OpenProject\\Controller\\ConfigController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":133,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1047,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/apps/integration_openproject/lib/Controller/ConfigController.php","Line":236},"CustomMessage":"--"},"id":"63d6fce52ea5b"}
```
_Formatted logs:_
```text
[index] Errore: Exception: Call to undefined method OCA\OpenProject\Service\OpenProjectAPIService::revokeUserOAuthToken() in file '/var/www/nextcloud/apps/integration_openproject/lib/Controller/ConfigController.php' line 236 at <<closure>>
0. /var/www/nextcloud/lib/private/AppFramework/App.php line 172
OC\AppFramework\Http\Dispatcher->dispatch()
1. /var/www/nextcloud/lib/private/Route/Router.php line 298
OC\AppFramework\App::main()
2. /var/www/nextcloud/lib/base.php line 1047
OC\Route\Router->match()
3. /var/www/nextcloud/index.php line 36
OC::handleRequest()
PUT /apps/integration_openproject/admin-config
from 127.0.0.1 by Emanuele at 2023-01-29T23:08:27+00:00
```
_If you have screenshots of the application's bug behavior or other relevant files, please drag them into this place or attach them using the "Files" section._
### Environment information
_Please check and fill out the following details to help us identify in what versions and distributions of OpenProject the error occurs_
* [ ] Hosted cloud edition
* [x] Packaged installation
* What distribution? Linux 5.10.0-20-amd64 [#1](https://community.openproject.org/work_packages/1) SMP Debian 5.10.158-2 (2022-12-13) x86\_64
* [ ] Docker All-in-one container
* [ ] Docker-compose installation
* [ ] Other (please specify)
**OpenProject version**
**Browser**
* [x] Chrome
* [x] Firefox
* [ ] Safari
* [ ] Mobile Safari
* [ ] Other (please specify)
**Language**
_Please specify the browser language and the language of the OpenProject user for which the bug occurred._