Server: NC 16: Cannot create projects

Created on 26 Apr 2019  路  11Comments  路  Source: nextcloud/server

Installed a new instance of NC 16 and wanted to try out the projects feature as described here.

Steps to reproduce

  1. Create some files
  2. Try to create a project by selecting a file -> details pane -> "Add to a project"
  3. Select any other file this file should be linked

Expected behaviour

I was just testing. Maybe a project would be created?

Actual behaviour

A message appears "Failed to create project"

Server configuration

Operating system:
Ubuntu 18.04

Web server:
nginx

Database:
PostgreSQL

PHP version:
7.2

Nextcloud version: (see Nextcloud admin page)
16.0.0

Updated from an older Nextcloud/ownCloud or fresh install:
Fresh install

Where did you install Nextcloud from:
Nextcloud homepage

Signing status:


Signing status

No errors have been found.

List of activated apps:


App list

Enabled:
  - accessibility: 1.2.0
  - activity: 2.9.1
  - bruteforcesettings: 1.3.0
  - cloud_federation_api: 0.2.0
  - comments: 1.6.0
  - dav: 1.9.2
  - federatedfilesharing: 1.6.0
  - federation: 1.6.0
  - files: 1.11.0
  - files_pdfviewer: 1.5.0
  - files_rightclick: 0.13.0
  - files_sharing: 1.8.0
  - files_texteditor: 2.8.0
  - files_trashbin: 1.6.0
  - files_versions: 1.9.0
  - files_videoplayer: 1.5.0
  - firstrunwizard: 2.5.0
  - gallery: 18.3.0
  - groupfolders: 3.0.0
  - logreader: 2.1.0
  - lookup_server_connector: 1.4.0
  - nextcloud_announcements: 1.5.0
  - notifications: 2.4.1
  - oauth2: 1.4.2
  - password_policy: 1.6.0
  - privacy: 1.0.0
  - provisioning_api: 1.6.0
  - recommendations: 0.4.0
  - serverinfo: 1.6.0
  - sharebymail: 1.6.0
  - support: 1.0.0
  - systemtags: 1.6.0
  - theming: 1.7.0
  - twofactor_backupcodes: 1.5.0
  - updatenotification: 1.6.0
  - viewer: 1.0.0
  - workflowengine: 1.6.0
Disabled:
  - admin_audit
  - encryption
  - files_external
  - survey_client
  - user_ldap

Nextcloud configuration:


Config report

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "testlab.decatec.de"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "pgsql",
        "version": "16.0.0.9",
        "overwrite.cli.url": "http:\/\/testlab.decatec.de\/nextcloud",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "overwriteprotocol": "https",
        "logtimezone": "Europe\/Berlin",
        "filelocking.enabled": "true",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "timeout": 0
        }
    }
}

Are you using external storage, if yes which one: local/smb/sftp/...
No

Are you using encryption:
No

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
No

Client configuration

Browser:
Firefox/Chrome

Operating system:
Manjaro

Logs

Web server error log


Web server error log
No Logs

Nextcloud log (data/nextcloud.log)


Nextcloud log

[no app in context] Error: Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'INSERT INTO "oc_collres_accesscache" ("user_id", "resource_id", "resource_type", "access") VALUES(?, ?, ?, ?)' with params ["Admin", "207", "file", true]:

SQLSTATE[22P02]: Invalid text representation: 7 FEHLER:  ung眉ltige Eingabesyntax f眉r ganze Zahl: 禄t芦 at <<closure>>

 0. /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 184
    Doctrine\DBAL\Driver\AbstractPostgreSQLDriver->convertException("An exception oc ... 芦", Doctrine\DBAL\Dr ... ]})
 1. /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 158
    Doctrine\DBAL\DBALException::wrapException(Doctrine\DBAL\Driver\PDOPgSql\Driver {}, Doctrine\DBAL\Dr ... ]}, "An exception oc ... 芦")
 2. /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php line 1088
    Doctrine\DBAL\DBALException::driverExceptionDuringQuery(Doctrine\DBAL\Driver\PDOPgSql\Driver {}, Doctrine\DBAL\Dr ... ]}, "INSERT INTO \"o ... )", {1: "Admin",2: "207",3: "file",4: true})
 3. /var/www/nextcloud/lib/private/DB/Connection.php line 216
    Doctrine\DBAL\Connection->executeUpdate("INSERT INTO \"o ... )", ["Admin","207","file",true], [2,2,2,5])
 4. /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php line 222
    OC\DB\Connection->executeUpdate("INSERT INTO \"o ... )", {dcValue1: "Admi ... e}, {dcValue1: 2,dcV ... 5})
 5. /var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php line 214
    Doctrine\DBAL\Query\QueryBuilder->execute()
 6. /var/www/nextcloud/lib/private/Collaboration/Resources/Manager.php line 421
    OC\DB\QueryBuilder\QueryBuilder->execute()
 7. /var/www/nextcloud/lib/private/Collaboration/Resources/Manager.php line 338
    OC\Collaboration\Resources\Manager->cacheAccessForResource(OC\Collaboration\Resources\Resource {}, OC\User\User {}, true)
 8. /var/www/nextcloud/lib/private/Collaboration/Resources/Resource.php line 118
    OC\Collaboration\Resources\Manager->canAccessResource(OC\Collaboration\Resources\Resource {}, OC\User\User {})
 9. /var/www/nextcloud/lib/private/Collaboration/Resources/Resource.php line 108
    OC\Collaboration\Resources\Resource->canUserAccess(OC\User\User {})
10. /var/www/nextcloud/core/Controller/CollaborationResourcesController.php line 203
    OC\Collaboration\Resources\Resource->canAccess(OC\User\User {})
11. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 166
    OC\Core\Controller\CollaborationResourcesController->createCollectionOnResource("file", "207", "Neuer Ordner")
12. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 99
    OC\AppFramework\Http\Dispatcher->executeController(OC\Core\Controll ... {}, "createCollectionOnResource")
13. /var/www/nextcloud/lib/private/AppFramework/App.php line 126
    OC\AppFramework\Http\Dispatcher->dispatch(OC\Core\Controll ... {}, "createCollectionOnResource")
14. /var/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php line 47
    OC\AppFramework\App::main("OC\\Core\\Contr ... r", "createCollectionOnResource", OC\AppFramework\ ... {}, {baseResourceTyp ... "})
15. <<closure>>
    OC\AppFramework\Routing\RouteActionHandler->__invoke({baseResourceTyp ... "})
16. /var/www/nextcloud/lib/private/Route/Router.php line 297
    undefinedundefinedcall_user_func(OC\AppFramework\ ... {}, {baseResourceTyp ... "})
17. /var/www/nextcloud/ocs/v1.php line 82
    OC\Route\Router->match("/ocsapp/collabo ... 7")
18. /var/www/nextcloud/ocs/v2.php line 24
    undefinedundefinedrequire_once("/var/www/nextcloud/ocs/v1.php")

POST /nextcloud/ocs/v2.php/collaboration/resources/file/207?format=json
from 192.168.178.10 by Admin at 2019-04-26T11:49:22+02:00

Browser log


Browser log

Failed to create a project Error: "Request failed with status code 404"
    exports https://domain.de/nextcloud/apps/files_sharing/js/dist/files_sharing.3.js:7
    exports https://domain.de/nextcloud/apps/files_sharing/js/dist/files_sharing.3.js:509
    h https://domain.de/nextcloud/apps/files_sharing/js/dist/files_sharing.3.js:7
files_sharing.3.js:353:77097

0. Needs triage bug

Most helpful comment

@kesselb Thank you. The idea is good but there is still plenty of room for improvement how projects are created. From my point of view the workflow is not really intuitive yet.
Instead of linking two files together and then rename the randomly named project, I would have expected to use the "Add project" button, enter a project name and if it doesn't already exist it will be created. In a second step you can add other file to the created project and that's it.

All 11 comments

Same. I was unable to find any documentation about how to create these things, which is rather surprising. All kinds of screenshots of adding things to existing projects, though haha :).

It seems that this is not only a PostgreSQL problem. I'm experiencing the same problem with a MySQL/MariaDB v10.2.23 database. Only searching for an existing project seems to be possible yet.

Create a new project:

Pick a file, open details, goto sharing, click add to a project. Now link the current file to another file (which should be part of your project) and there is your new project :tada:

@kesselb Thank you. The idea is good but there is still plenty of room for improvement how projects are created. From my point of view the workflow is not really intuitive yet.
Instead of linking two files together and then rename the randomly named project, I would have expected to use the "Add project" button, enter a project name and if it doesn't already exist it will be created. In a second step you can add other file to the created project and that's it.

@kesselb Thank you. The idea is good but there is still plenty of room for improvement how projects are created. From my point of view the workflow is not really intuitive yet.
Instead of linking two files together and then rename the randomly named project, I would have expected to use the "Add project" button, enter a project name and if it doesn't already exist it will be created. In a second step you can add other file to the created project and that's it.

that's the right way

cc @jancborchardt

I have a similar problem, I run two instances, both exactly the same but one without "Deck" app. Both have option to "Add to project" in "Details"->"Share" tab. I'm not sure it should be on the instance without "Deck". Secondly none of them work whether I try to link to a file or existing project (instance with "Deck") it shows the same error - _"Failed to create a project"_
Edit:
I think it has something to do with this message:

Level | App | Message
-- | -- | --
Error | no app in context | Doctrine\DBAL\Exception\DriverException:聽An exception occurred while executing 'INSERT INTO "oc_collres_accesscache" ("user_id", "resource_id", "resource_type", "access") VALUES(?, ?, ?, ?)' with params ["username", "406330", "file", true]: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for integer: "t"

Instead of linking two files together and then rename the randomly named project, I would have expected to use the "Add project" button, enter a project name and if it doesn't already exist it will be created. In a second step you can add other file to the created project and that's it.

@j-ed perfect suggestion for improvement! @juliushaertl what do you think?

I am experiencing the same issue on Docker. My setup:

  • Nextcloud 16.0-fpm-alpine
  • PostgreSQL 11.3
  • Server-side encryption enabled
  • Object storage on OVH

I am seeing a similar message to the one reported by @adi-dev. From my nextcloud.log:

    "Exception": "Doctrine\\DBAL\\Exception\\DriverException",
    "Message": "An exception occurred while executing 'INSERT INTO \"collres_accesscache\" (\"user_id\", \"resource_id\", \"resource_type\", \"access\") VALUES(?, ?, ?, ?)' with params [\"username\", \"624\", \"file\", true]:\n\nSQLSTATE[22P02]: Invalid text representation: 7 ERROR:  invalid input syntax for integer: \"t\"",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php",
        "line": 184,
        "function": "convertException",
        "class": "Doctrine\\DBAL\\Driver\\AbstractPostgreSQLDriver",
        "type": "->",
        "args": [
          "An exception occurred while executing 'INSERT INTO \"collres_accesscache\" (\"user_id\", \"resource_id\", \"resource_type\", \"access\") VALUES(?, ?, ?, ?)' with params [\"my_user\", \"624\", \"file\", true]:\n\nSQLSTATE[22P02]: Invalid text representation: 7 ERROR:  invalid input syntax for integer: \"t\"",
          {
            "errorInfo": [
              "22P02",
              7,
              "ERROR:  invalid input syntax for integer: \"t\""
            ],
            "__class__": "Doctrine\\DBAL\\Driver\\PDOException"
          }
        ]
      },

@DecaTec @bardo Your issue should be fixed by 16.0.1 (here is the patch https://github.com/nextcloud/server/pull/15259). Could you retry?

@j-ed mind to create an enhancement issue because this one is a bug issue?

I can confirm, it looks like is working on 16.0.1, cheers 馃嵒

Was this page helpful?
0 / 5 - 0 ratings