# Bug OP-13327 - Nextcloud integration Error: The automatically managed project folder was not yet found. 

Project: OpenProject
Status: closed
URL: https://community.openproject.org/work_packages/OP-13327

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module |  |
| Target versions | 13.0.5 |
| Observed in versions | 13.0.0 |
| Sprint | 13.0.5 |
| Backlog bucket |  |
| Bug found in version (deprecated) | 13.0.x |
| Found in mobile app version |  |
| Follow-up feedback e-mail |  |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers |  |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Work |  |
| Labor costs |  |

## Description

### Before filing a report

*Not found any suitable tickets.*

### Steps to reproduce

1.  Install NC 27.02 (virtual machine 1) // this run was with snap
2.  Install OP 13.0.3 (virtual machine 2)
3.  Configure SSL's for both vm's (let's encrypt)
4.  Install NC modules: Group Folders, OpenProject integration (no errors here)
5.  Configure OpenProject integration (no errors here)
6.  Configure FileStorages in system & project settings (no errors here)
7.  Login into OP from NC server, and login into NC from OP server (no errors here)
8.  Try to link file, to see error "**The automatically managed project folder was not yet found**"
9.  Try to upload file, to see error "**No Nextcloud connection"**

### What is the buggy behavior?

  - Group Folder with name "OpenProject" was not created on NC server
  - On click the "Link existing files" button, i see error: The automatically managed project folder was not yet found. Please wait a bit, reload the page to fetch the newest data, and try again
  - On click the "Upload files" button and choose any file, i see error: **No Nextcloud connection** Some Nextcloud settings are not working. Please contact your Nextcloud administrator
  - Automaticaly managed Project Folders on NC servers was not created.

If i add admins group into group folder "OpenProject" on system settings, folders will be created (openproject folders and automaticaly managed project folders), but this not resolve bug with "The automatically managed project folder was not yet found".

### What is the expected behavior?

1.  Group Folder with name "OpenProject" was created
2.  Automaticaly managed Project Folders on NC servers was created
3.  Buttons "Link" and "Upload" associated with suitable automaticaly managed folders on NC server.

### **Logs**

Didn't find any errors on OP server. But Errors on NC server was founded: 

1:

`Error    index    2023-09-18T14:30:42+0300`  
`Exception: OCA\Text\Service\DocumentService::getFileForSession(): Argument #1 ($session) must be of type OCA\Text\Db\Session, bool given, called in /snap/nextcloud/37045/htdocs/apps/text/lib/Service/ApiService.php on line 232 in file '/snap/nextcloud/37045/htdocs/apps/text/lib/Service/DocumentService.php' line 442`

`/snap/nextcloud/37045/htdocs/lib/private/AppFramework/App.php - line 183: OC\AppFramework\Http\Dispatcher->dispatch()`

`/snap/nextcloud/37045/htdocs/lib/private/Route/Router.php - line 315: OC\AppFramework\App::main()`

`/snap/nextcloud/37045/htdocs/lib/base.php - line 1071: OC\Route\Router->match()`

`/snap/nextcloud/37045/htdocs/index.php - line 36: OC::handleRequest()`

`Caused by TypeError: OCA\Text\Service\DocumentService::getFileForSession(): Argument #1 ($session) must be of type OCA\Text\Db\Session, bool given, called in /snap/nextcloud/37045/htdocs/apps/text/lib/Service/ApiService.php on line 232`

`/snap/nextcloud/37045/htdocs/apps/text/lib/Service/ApiService.php - line 232: OCA\Text\Service\DocumentService->getFileForSession()`

`/snap/nextcloud/37045/htdocs/apps/text/lib/Controller/SessionController.php - line 92: OCA\Text\Service\ApiService->sync("*** sensiti ... *")`

`/snap/nextcloud/37045/htdocs/lib/private/AppFramework/Http/Dispatcher.php - line 230: OCA\Text\Controller\SessionController->sync("*** sensiti ... *")`

`/snap/nextcloud/37045/htdocs/lib/private/AppFramework/Http/Dispatcher.php - line 137: OC\AppFramework\Http\Dispatcher->executeController()`

`/snap/nextcloud/37045/htdocs/lib/private/AppFramework/App.php - line 183: OC\AppFramework\Http\Dispatcher->dispatch()`

`/snap/nextcloud/37045/htdocs/lib/private/Route/Router.php - line 315: OC\AppFramework\App::main()`

`/snap/nextcloud/37045/htdocs/lib/base.php - line 1071: OC\Route\Router->match()`

`/snap/nextcloud/37045/htdocs/index.php - line 36: OC::handleRequest()`

2:

`Error    core    2023-09-18T14:24:10+0300`  
`OCP\Files\NotFoundException: /appdata_ocqgw142f8uv/theming/global`

`<<closure>> OC\Files\Node\Root->get()`

`/snap/nextcloud/37045/htdocs/lib/private/Files/Node/LazyFolder.php - line 74: call_user_func_array()`

`/snap/nextcloud/37045/htdocs/lib/private/Files/Node/LazyFolder.php - line 151: OC\Files\Node\LazyFolder->__call()`

`/snap/nextcloud/37045/htdocs/lib/private/Files/AppData/AppData.php - line 132: OC\Files\Node\LazyFolder->get()`

`/snap/nextcloud/37045/htdocs/apps/theming/lib/Jobs/MigrateBackgroundImages.php - line 168: OC\Files\AppData\AppData->getFolder()`

`/snap/nextcloud/37045/htdocs/apps/theming/lib/Jobs/MigrateBackgroundImages.php - line 100: OCA\Theming\Jobs\MigrateBackgroundImages->storeUserIdsToProcess()`

`/snap/nextcloud/37045/htdocs/apps/theming/lib/Jobs/MigrateBackgroundImages.php - line 79: OCA\Theming\Jobs\MigrateBackgroundImages->runPreparation()`

`/snap/nextcloud/37045/htdocs/lib/public/BackgroundJob/Job.php - line 81: OCA\Theming\Jobs\MigrateBackgroundImages->run()`

`/snap/nextcloud/37045/htdocs/lib/public/BackgroundJob/QueuedJob.php - line 57: OCP\BackgroundJob\Job->start()`

`/snap/nextcloud/37045/htdocs/lib/public/BackgroundJob/QueuedJob.php - line 47: OCP\BackgroundJob\QueuedJob->start()`

`/snap/nextcloud/37045/htdocs/cron.php - line 152: OCP\BackgroundJob\QueuedJob->execute()`

### Environment information

Clean install OP, NC on ununtu 20.04 (updated and upgraded)

PHP 8.1.22

**OpenProject installation type**

- [ ] Hosted cloud edition
- [x] Packaged installation
    - Ubuntu 20.04
- [ ] Docker All-in-one container
- [ ] Docker-compose installation
- [ ] Other (please specify)

**OpenProject version**

*13.0.3*
