nextcloud / sharepoint

💾 Nextcloud SharePoint Backend for External storages
https://apps.nextcloud.com/apps/sharepoint
GNU Affero General Public License v3.0
25 stars 18 forks source link

Setup successful but user gets "Failed to create the document session" #205

Open jurgenhaas opened 5 months ago

jurgenhaas commented 5 months ago

I've successfully set up a sharepoint instance, but when the user goes to that folder, they get a popup after a few seconds which says Failed to create the document session.

At the same time, there is an error in the logs: General error: 1364 Field 'last_saved_version_time' doesn't have a default value

The full error message is this:

{
  "reqId": "pJl7DVtBPqyaN5sP0E9q",
  "level": 3,
  "time": "2024-05-13T12:07:08+00:00",
  "remoteAddr": "192.168.3.44",
  "user": "jurgenhaas",
  "app": "text",
  "method": "PUT",
  "url": "/index.php/apps/text/session/1672330/create",
  "message": "An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1364 Field 'last_saved_version_time' doesn't have a default value",
  "userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
  "version": "29.0.0.19",
  "exception": {
    "Exception": "OC\\DB\\Exceptions\\DbalException",
    "Message": "An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1364 Field 'last_saved_version_time' doesn't have a default value",
    "Code": 1364,
    "Trace": [
      {
        "file": "/var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php",
        "line": 328,
        "function": "wrap",
        "class": "OC\\DB\\Exceptions\\DbalException",
        "type": "::"
      },
      {
        "file": "/var/www/html/lib/public/AppFramework/Db/QBMapper.php",
        "line": 137,
        "function": "executeStatement",
        "class": "OC\\DB\\QueryBuilder\\QueryBuilder",
        "type": "->"
      },
      {
        "file": "/var/www/html/apps/text/lib/Service/DocumentService.php",
        "line": 162,
        "function": "insert",
        "class": "OCP\\AppFramework\\Db\\QBMapper",
        "type": "->"
      },
      {
        "file": "/var/www/html/apps/text/lib/Service/ApiService.php",
        "line": 125,
        "function": "createDocument",
        "class": "OCA\\Text\\Service\\DocumentService",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/html/apps/text/lib/Controller/SessionController.php",
        "line": 62,
        "function": "create",
        "class": "OCA\\Text\\Service\\ApiService",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 232,
        "function": "create",
        "class": "OCA\\Text\\Controller\\SessionController",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 138,
        "function": "executeController",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->"
      },
      {
        "file": "/var/www/html/lib/private/AppFramework/App.php",
        "line": 184,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->"
      },
      {
        "file": "/var/www/html/lib/private/Route/Router.php",
        "line": 338,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::"
      },
      {
        "file": "/var/www/html/lib/base.php",
        "line": 1050,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->"
      },
      {
        "file": "/var/www/html/index.php",
        "line": 49,
        "function": "handleRequest",
        "class": "OC",
        "type": "::"
      }
    ],
    "File": "/var/www/html/lib/private/DB/Exceptions/DbalException.php",
    "Line": 71,
    "Previous": {
      "Exception": "Doctrine\\DBAL\\Exception\\NotNullConstraintViolationException",
      "Message": "An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1364 Field 'last_saved_version_time' doesn't have a default value",
      "Code": 1364,
      "Trace": [
        {
          "file": "/var/www/html/3rdparty/doctrine/dbal/src/Connection.php",
          "line": 1943,
          "function": "convert",
          "class": "Doctrine\\DBAL\\Driver\\API\\MySQL\\ExceptionConverter",
          "type": "->"
        },
        {
          "file": "/var/www/html/3rdparty/doctrine/dbal/src/Connection.php",
          "line": 1885,
          "function": "handleDriverException",
          "class": "Doctrine\\DBAL\\Connection",
          "type": "->"
        },
        {
          "file": "/var/www/html/3rdparty/doctrine/dbal/src/Connection.php",
          "line": 1213,
          "function": "convertExceptionDuringQuery",
          "class": "Doctrine\\DBAL\\Connection",
          "type": "->"
        },
        {
          "file": "/var/www/html/3rdparty/doctrine/dbal/src/Connections/PrimaryReadReplicaConnection.php",
          "line": 292,
          "function": "executeStatement",
          "class": "Doctrine\\DBAL\\Connection",
          "type": "->"
        },
        {
          "file": "/var/www/html/lib/private/DB/Connection.php",
          "line": 360,
          "function": "executeStatement",
          "class": "Doctrine\\DBAL\\Connections\\PrimaryReadReplicaConnection",
          "type": "->"
        },
        {
          "file": "/var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php",
          "line": 393,
          "function": "executeStatement",
          "class": "OC\\DB\\Connection",
          "type": "->"
        },
        {
          "file": "/var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php",
          "line": 280,
          "function": "execute",
          "class": "Doctrine\\DBAL\\Query\\QueryBuilder",
          "type": "->"
        },
        {
          "file": "/var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php",
          "line": 326,
          "function": "execute",
          "class": "OC\\DB\\QueryBuilder\\QueryBuilder",
          "type": "->"
        },
        {
          "file": "/var/www/html/lib/public/AppFramework/Db/QBMapper.php",
          "line": 137,
          "function": "executeStatement",
          "class": "OC\\DB\\QueryBuilder\\QueryBuilder",
          "type": "->"
        },
        {
          "file": "/var/www/html/apps/text/lib/Service/DocumentService.php",
          "line": 162,
          "function": "insert",
          "class": "OCP\\AppFramework\\Db\\QBMapper",
          "type": "->"
        },
        {
          "file": "/var/www/html/apps/text/lib/Service/ApiService.php",
          "line": 125,
          "function": "createDocument",
          "class": "OCA\\Text\\Service\\DocumentService",
          "type": "->",
          "args": [
            "*** sensitive parameters replaced ***"
          ]
        },
        {
          "file": "/var/www/html/apps/text/lib/Controller/SessionController.php",
          "line": 62,
          "function": "create",
          "class": "OCA\\Text\\Service\\ApiService",
          "type": "->",
          "args": [
            "*** sensitive parameters replaced ***"
          ]
        },
        {
          "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
          "line": 232,
          "function": "create",
          "class": "OCA\\Text\\Controller\\SessionController",
          "type": "->",
          "args": [
            "*** sensitive parameters replaced ***"
          ]
        },
        {
          "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
          "line": 138,
          "function": "executeController",
          "class": "OC\\AppFramework\\Http\\Dispatcher",
          "type": "->"
        },
        {
          "file": "/var/www/html/lib/private/AppFramework/App.php",
          "line": 184,
          "function": "dispatch",
          "class": "OC\\AppFramework\\Http\\Dispatcher",
          "type": "->"
        },
        {
          "file": "/var/www/html/lib/private/Route/Router.php",
          "line": 338,
          "function": "main",
          "class": "OC\\AppFramework\\App",
          "type": "::"
        },
        {
          "file": "/var/www/html/lib/base.php",
          "line": 1050,
          "function": "match",
          "class": "OC\\Route\\Router",
          "type": "->"
        },
        {
          "file": "/var/www/html/index.php",
          "line": 49,
          "function": "handleRequest",
          "class": "OC",
          "type": "::"
        }
      ],
      "File": "/var/www/html/3rdparty/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php",
      "Line": 114,
      "Previous": {
        "Exception": "Doctrine\\DBAL\\Driver\\PDO\\Exception",
        "Message": "SQLSTATE[HY000]: General error: 1364 Field 'last_saved_version_time' doesn't have a default value",
        "Code": 1364,
        "Trace": [
          {
            "file": "/var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php",
            "line": 132,
            "function": "new",
            "class": "Doctrine\\DBAL\\Driver\\PDO\\Exception",
            "type": "::"
          },
          {
            "file": "/var/www/html/3rdparty/doctrine/dbal/src/Connection.php",
            "line": 1207,
            "function": "execute",
            "class": "Doctrine\\DBAL\\Driver\\PDO\\Statement",
            "type": "->"
          },
          {
            "file": "/var/www/html/3rdparty/doctrine/dbal/src/Connections/PrimaryReadReplicaConnection.php",
            "line": 292,
            "function": "executeStatement",
            "class": "Doctrine\\DBAL\\Connection",
            "type": "->"
          },
          {
            "file": "/var/www/html/lib/private/DB/Connection.php",
            "line": 360,
            "function": "executeStatement",
            "class": "Doctrine\\DBAL\\Connections\\PrimaryReadReplicaConnection",
            "type": "->"
          },
          {
            "file": "/var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php",
            "line": 393,
            "function": "executeStatement",
            "class": "OC\\DB\\Connection",
            "type": "->"
          },
          {
            "file": "/var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php",
            "line": 280,
            "function": "execute",
            "class": "Doctrine\\DBAL\\Query\\QueryBuilder",
            "type": "->"
          },
          {
            "file": "/var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php",
            "line": 326,
            "function": "execute",
            "class": "OC\\DB\\QueryBuilder\\QueryBuilder",
            "type": "->"
          },
          {
            "file": "/var/www/html/lib/public/AppFramework/Db/QBMapper.php",
            "line": 137,
            "function": "executeStatement",
            "class": "OC\\DB\\QueryBuilder\\QueryBuilder",
            "type": "->"
          },
          {
            "file": "/var/www/html/apps/text/lib/Service/DocumentService.php",
            "line": 162,
            "function": "insert",
            "class": "OCP\\AppFramework\\Db\\QBMapper",
            "type": "->"
          },
          {
            "file": "/var/www/html/apps/text/lib/Service/ApiService.php",
            "line": 125,
            "function": "createDocument",
            "class": "OCA\\Text\\Service\\DocumentService",
            "type": "->",
            "args": [
              "*** sensitive parameters replaced ***"
            ]
          },
          {
            "file": "/var/www/html/apps/text/lib/Controller/SessionController.php",
            "line": 62,
            "function": "create",
            "class": "OCA\\Text\\Service\\ApiService",
            "type": "->",
            "args": [
              "*** sensitive parameters replaced ***"
            ]
          },
          {
            "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
            "line": 232,
            "function": "create",
            "class": "OCA\\Text\\Controller\\SessionController",
            "type": "->",
            "args": [
              "*** sensitive parameters replaced ***"
            ]
          },
          {
            "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
            "line": 138,
            "function": "executeController",
            "class": "OC\\AppFramework\\Http\\Dispatcher",
            "type": "->"
          },
          {
            "file": "/var/www/html/lib/private/AppFramework/App.php",
            "line": 184,
            "function": "dispatch",
            "class": "OC\\AppFramework\\Http\\Dispatcher",
            "type": "->"
          },
          {
            "file": "/var/www/html/lib/private/Route/Router.php",
            "line": 338,
            "function": "main",
            "class": "OC\\AppFramework\\App",
            "type": "::"
          },
          {
            "file": "/var/www/html/lib/base.php",
            "line": 1050,
            "function": "match",
            "class": "OC\\Route\\Router",
            "type": "->"
          },
          {
            "file": "/var/www/html/index.php",
            "line": 49,
            "function": "handleRequest",
            "class": "OC",
            "type": "::"
          }
        ],
        "File": "/var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Exception.php",
        "Line": 28,
        "Previous": {
          "Exception": "PDOException",
          "Message": "SQLSTATE[HY000]: General error: 1364 Field 'last_saved_version_time' doesn't have a default value",
          "Code": "HY000",
          "Trace": [
            {
              "file": "/var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php",
              "line": 130,
              "function": "execute",
              "class": "PDOStatement",
              "type": "->"
            },
            {
              "file": "/var/www/html/3rdparty/doctrine/dbal/src/Connection.php",
              "line": 1207,
              "function": "execute",
              "class": "Doctrine\\DBAL\\Driver\\PDO\\Statement",
              "type": "->"
            },
            {
              "file": "/var/www/html/3rdparty/doctrine/dbal/src/Connections/PrimaryReadReplicaConnection.php",
              "line": 292,
              "function": "executeStatement",
              "class": "Doctrine\\DBAL\\Connection",
              "type": "->"
            },
            {
              "file": "/var/www/html/lib/private/DB/Connection.php",
              "line": 360,
              "function": "executeStatement",
              "class": "Doctrine\\DBAL\\Connections\\PrimaryReadReplicaConnection",
              "type": "->"
            },
            {
              "file": "/var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php",
              "line": 393,
              "function": "executeStatement",
              "class": "OC\\DB\\Connection",
              "type": "->"
            },
            {
              "file": "/var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php",
              "line": 280,
              "function": "execute",
              "class": "Doctrine\\DBAL\\Query\\QueryBuilder",
              "type": "->"
            },
            {
              "file": "/var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php",
              "line": 326,
              "function": "execute",
              "class": "OC\\DB\\QueryBuilder\\QueryBuilder",
              "type": "->"
            },
            {
              "file": "/var/www/html/lib/public/AppFramework/Db/QBMapper.php",
              "line": 137,
              "function": "executeStatement",
              "class": "OC\\DB\\QueryBuilder\\QueryBuilder",
              "type": "->"
            },
            {
              "file": "/var/www/html/apps/text/lib/Service/DocumentService.php",
              "line": 162,
              "function": "insert",
              "class": "OCP\\AppFramework\\Db\\QBMapper",
              "type": "->"
            },
            {
              "file": "/var/www/html/apps/text/lib/Service/ApiService.php",
              "line": 125,
              "function": "createDocument",
              "class": "OCA\\Text\\Service\\DocumentService",
              "type": "->",
              "args": [
                "*** sensitive parameters replaced ***"
              ]
            },
            {
              "file": "/var/www/html/apps/text/lib/Controller/SessionController.php",
              "line": 62,
              "function": "create",
              "class": "OCA\\Text\\Service\\ApiService",
              "type": "->",
              "args": [
                "*** sensitive parameters replaced ***"
              ]
            },
            {
              "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
              "line": 232,
              "function": "create",
              "class": "OCA\\Text\\Controller\\SessionController",
              "type": "->",
              "args": [
                "*** sensitive parameters replaced ***"
              ]
            },
            {
              "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
              "line": 138,
              "function": "executeController",
              "class": "OC\\AppFramework\\Http\\Dispatcher",
              "type": "->"
            },
            {
              "file": "/var/www/html/lib/private/AppFramework/App.php",
              "line": 184,
              "function": "dispatch",
              "class": "OC\\AppFramework\\Http\\Dispatcher",
              "type": "->"
            },
            {
              "file": "/var/www/html/lib/private/Route/Router.php",
              "line": 338,
              "function": "main",
              "class": "OC\\AppFramework\\App",
              "type": "::"
            },
            {
              "file": "/var/www/html/lib/base.php",
              "line": 1050,
              "function": "match",
              "class": "OC\\Route\\Router",
              "type": "->"
            },
            {
              "file": "/var/www/html/index.php",
              "line": 49,
              "function": "handleRequest",
              "class": "OC",
              "type": "::"
            }
          ],
          "File": "/var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php",
          "Line": 130
        }
      }
    },
    "message": "An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1364 Field 'last_saved_version_time' doesn't have a default value",
    "exception": {},
    "CustomMessage": "An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1364 Field 'last_saved_version_time' doesn't have a default value"
  }
}

All components (NC, app, PHP, etc.) are at the latest versions.