-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PostgreSQL: Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'INSERT INTO "oc_schedulingobjects" #8825
Comments
@enoch85 can you confirm this? |
Using the Calendar app I can confirm that it works as expected. No error when following the steps to reproduce in this ticket. |
@enoch85 which pgsql version do you run? |
|
→ might be an incompatibility with 10 |
I just got this error and fixed it by removing all non ascii from the location of the event. |
nextcloud.log gives: |
Actually this is a bug in doctrine dbal not handling the bytea type for postgres properly. It either needs a hex representation or their escaping of every non printable character. (See https://www.postgresql.org/docs/current/static/datatype-binary.html) |
Funny enough. There was a similar bug some time ago #4071. But the fix was not for the root cause, I believe. @nickvergessen |
Where did my comment go... |
In my postgres DB 'calendardata' in 'oc_schedulingobjects' is bytea, yes. It is the default type in dbal for blob with psql. It comes from the migration 'Version1004Date20170825134824.php'. |
|
I also witness this from time to time. It happens with some calendar objects and not others, I suspect due to some particular text used. I have not identified a pattern. |
I have observed that this problem seems to only happen if I invite an e-mail address that happens to be associated with a Nextcloud account on my server. In my case, the other accounts on my Nextcloud calendar do not use their calendars (not sure that is relevant, but thought I'd mention just in case). |
I can confirm that this Problem still exists on the latest stable nextcloud ("installed" via the official docker container):
Its especially bad as the error is only visible in the log. The event itself gets silently discarded by the server. Davdroid shows no error at all. |
It seems that there might a server/apps/dav/lib/CalDAV/CalDavBackend.php Line 1989 in 89b6ee1
See https://github.com/owncloud/core/pull/27914/files#diff-ded00a57c79a474ac4c4b43c620d6050R1483 where this bug got fixed in owncloud. |
Can you prepare a PR with that? |
Sadly not, Sorry. I've no testing environment here to test the changes. |
Here is one without having tried the unittests: #10523 The change applied to my local instance fixes the problem though. |
This was fixed in #10523 |
Steps to reproduce
This isue only occures with PostgreSQL. After converting the database type to mySQL the problem is gone.
Expected behaviour
It should be possible to create an appointment and invite an attendee.
Actual behaviour
It is not possible to invite an attendee.
Server configuration
Operating system: Arch Linux
Web server: Apache 2.4.29
Database: PostgreSQL 10.1
PHP version: 7.2.3
Nextcloud version: 13.0.0.14
Updated from an older Nextcloud/ownCloud or fresh install: No, fresh install.
Where did you install Nextcloud from: Arch repository.
Signing status:
Signing status
No errors have been found.
List of activated apps:
App list
Enabled:
Disabled:
Nextcloud configuration:
Config report
{ "system": { "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "***REMOVED SENSITIVE VALUE***" ], "datadirectory": "***REMOVED SENSITIVE VALUE***", "overwrite.cli.url": "***REMOVED SENSITIVE VALUE***", "dbtype": "pgsql", "version": "13.0.0.14", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "", "dbtableprefix": "oc_", "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "data-fingerprint": "eaa11f1bd391bfc2dc9512be92b22157", "maintenance": false } }Are you using external storage, if yes which one: no
Are you using encryption: no
Are you using an external user-backend, if yes which one: no.
Client configuration
Browser: Firefox, Chrome, Thunderbird / Lightning …
Operating system: Arch Linux
Logs
Nextcloud log (data/nextcloud.log)
Nextcloud log
Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'INSERT INTO "oc_schedulingobjects" ("principaluri", "calendardata", "uri", "lastmodified", "etag", "size") VALUES(?, ?, ?, ?, ?, ?)' with params ["principals/users/[REMOVED]", "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//Sabre//Sabre VObject 4.1.2//EN\r\nCALSCALE:GREGORIAN\r\nMETHOD:REQUEST\r\nBEGIN:VTIMEZONE\r\n[…DELETED…]\r\nSEQUENCE:1\r\nX-MOZ-GENERATION:3\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n", "sabredav-6f8e8738-04a2-42cc-a8d5-4ec0114cd746.ics", 1521033701, "751f620dbe364fbf1c40b03b3422ca93", 1021]: SQLSTATE[22P02]: Invalid text representation: 7 FEHLER: ungültige Eingabesyntax für Typ bytea
The text was updated successfully, but these errors were encountered: