Text editor fails with "An internal server error occurred" for some users/files

Steps to reproduce

1.Create a file
2.Make changes to it in text editor
3.Eventually the error will occur

Expected behaviour

Should always be able to open a text file

Actual behaviour

When clicking the file the error pops up after a brief empty “window” where the text editor usually is.
If the file is shared with a different user then it can be opened by the other user, usually.
The file can be downloaded.
Changing it by the other user does not resolve the problem, nor does restoring an old version.
Moving it to the “Notes” folder makes it available to the Notes app.
Worked like a charm before I updated, but I cannot remember which version it was from - I updated both owncloud, text editor and the underlying ubuntu from 21.10 to 22.04.

Server configuration

Operating system:
Ubuntu 22.04.2 LTS
Web server:
2.4.57
Database:
mysql 5.8
PHP version:
7.4.33
ownCloud version: (see ownCloud admin page)
version: 10.11.0.6
versionstring: 0.11.0
edition: Community
text editor: 2.5.1
Updated from an older ownCloud or fresh install:
Updated
Where did you install ownCloud from:
Downloaded from owncloud
Signing status (ownCloud 9.0 and above):
No errors have been found.

The content of config/config.php:
{
“system”: {
“passwordsalt”: “REMOVED SENSITIVE VALUE”,
“secret”: “REMOVED SENSITIVE VALUE”,
“trusted_domains”: [
“localhost”,
“192.168.8.6”,
“192.168.9.6”,
“85.191.93.54”,
“cloud.jagular.dk”
],
“datadirectory”: “/var/www/owncloud/data”,
“overwrite.cli.url”: “http://localhost”,
“dbtype”: “mysql”,
“version”: “10.11.0.6”,
“dbname”: “owncloud”,
“dbhost”: “localhost”,
“dbtableprefix”: “oc_”,
“mysql.utf8mb4”: true,
“dbuser”: “REMOVED SENSITIVE VALUE”,
“memcache.local”: “\OC\Memcache\APCu”,
“memcache.locking”: “\OC\Memcache\APCu”,
“filelocking.enabled”: true,
“dbpassword”: “REMOVED SENSITIVE VALUE”,
“logtimezone”: “UTC”,
“apps_paths”: [
{
“path”: “/var/www/owncloud/apps”,
“url”: “/apps”,
“writable”: false
},
{
“path”: “/var/www/owncloud/apps-external”,
“url”: “/apps-external”,
“writable”: true
}
],
“installed”: true,
“instanceid”: “ockrpi07ba6o”,
“mail_domain”: “REMOVED SENSITIVE VALUE”,
“mail_from_address”: “REMOVED SENSITIVE VALUE”,
“mail_smtpmode”: “smtp”,
“mail_smtpauthtype”: “LOGIN”,
“mail_smtpsecure”: “tls”,
“mail_smtphost”: “REMOVED SENSITIVE VALUE”,
“mail_smtpauth”: 1,
“mail_smtpport”: “587”,
“mail_smtpname”: “REMOVED SENSITIVE VALUE”,
“mail_smtppassword”: “REMOVED SENSITIVE VALUE”,
“updater.secret”: “REMOVED SENSITIVE VALUE”,
“loglevel”: 0,
“logdateformat”: “F d, Y H:i:s”,
“maintenance”: false,
“allow_user_to_change_mail_address”: “”
}
}

List of activated apps:
Enabled:

  • calendar:
    • Version: 2.0.0
    • Path: /var/www/owncloud/apps-external/calendar
  • comments:
    • Version: 0.3.0
    • Path: /var/www/owncloud/apps/comments
  • configreport:
    • Version: 0.2.1
    • Path: /var/www/owncloud/apps/configreport
  • contacts:
    • Version: 1.5.5
    • Path: /var/www/owncloud/apps-external/contacts
  • dav:
    • Version: 0.7.0
    • Path: /var/www/owncloud/apps/dav
  • federatedfilesharing:
    • Version: 0.5.0
    • Path: /var/www/owncloud/apps/federatedfilesharing
  • federation:
    • Version: 0.1.0
    • Path: /var/www/owncloud/apps/federation
  • files:
    • Version: 1.5.2
    • Path: /var/www/owncloud/apps/files
  • files_external:
    • Version: 0.9.0
    • Path: /var/www/owncloud/apps/files_external
  • files_mediaviewer:
    • Version: 1.0.5
    • Path: /var/www/owncloud/apps/files_mediaviewer
  • files_pdfviewer:
    • Version: 1.0.1
    • Path: /var/www/owncloud/apps-external/files_pdfviewer
  • files_sharing:
    • Version: 0.14.0
    • Path: /var/www/owncloud/apps/files_sharing
  • files_texteditor:
    • Version: 2.5.1
    • Path: /var/www/owncloud/apps-external/files_texteditor
  • files_trashbin:
    • Version: 0.9.1
    • Path: /var/www/owncloud/apps/files_trashbin
  • files_versions:
    • Version: 1.3.0
    • Path: /var/www/owncloud/apps/files_versions
  • firstrunwizard:
    • Version: 1.2.0
    • Path: /var/www/owncloud/apps/firstrunwizard
  • market:
    • Version: 0.7.0
    • Path: /var/www/owncloud/apps/market
  • notes:
    • Version: 2.0.6
    • Path: /var/www/owncloud/apps-external/notes
  • notifications:
    • Version: 0.5.4
    • Path: /var/www/owncloud/apps/notifications
  • provisioning_api:
    • Version: 0.5.0
    • Path: /var/www/owncloud/apps/provisioning_api
  • systemtags:
    • Version: 0.3.0
    • Path: /var/www/owncloud/apps/systemtags
  • tasks:
    • Version: 0.9.7
    • Path: /var/www/owncloud/apps-external/tasks
  • updatenotification:
    • Version: 0.2.1
    • Path: /var/www/owncloud/apps/updatenotification
      Disabled:
  • encryption:
    • Path: /var/www/owncloud/apps/encryption
  • external:
    • Path: /var/www/owncloud/apps/external
  • user_external:
    • Path: /var/www/owncloud/apps/user_external

Are you using external storage, if yes which one: local/smb/sftp/…
No
Are you using encryption: yes/no
No
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/…
No

Client configuration

Browser:
Firefox, Chrome, Chromium, Samsung Web etc.
Operating system:
Android, Linux

Logs

Nothing in logs - please help debug!

Web server error log

Nothing in logs - please help debug!

ownCloud log (data/owncloud.log)

Nothing useful in log - please help debug!

Browser log

I managed to get a dump of the exception:
Next Doctrine\DBAL\Driver\PDO\Exception: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘f664dd5c2e411cfe30f7afb2e28f5bb9’ for key ‘UNIQ_F0C3D55BB3BC57DA’ in /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php:18
Not much help as I don’t know the db layout. What can I do to fix this? - I have dbeaver and access to the db.

Even more debugging:
DELETE from oc_persistent_locks where token_hash = ‘f664dd5c2e411cfe30f7afb2e28f5bb9’
Enables me to open it again - until next time it happens
There are multiple locks in this table, I think they are responsible for the turmoil. But why?

Hey,

maybe you could try to update to the most recent version 10.12.1 of ownCloud:

I have manually updated owncloud to 10.12.1.3 and we will see if the problem persists.
I thought the updater would alert me when there is a newer version? - I’ve set it to “stable”.

Hey,

let’s hope the best that the error is gone with the updated version :+1:

The missing update notification is currently getting discussed in Your version is up to date, but it is not and seems to wait for an official statement from the ownCloud people.

We have not seen the issue on our owncloud server since upgrading to 10.12.1.3, so I’m marking it as solved. @tom42 thank you for your help.

1 Like

I’m having the exact same issue and I just upgraded to the latest 10.12.2 to solve the issue, but nothing changed. Like OP said when clicking the file, a brief empty window opens suddenly followed by a “internal server error occured” popup.

I changed loglevel to 0 and got this in the log file, seems similar to the locking error already reported:

{“reqId”:“EMybAgWKbxMQsRvFhbzX”,“level”:0,“time”:“2023-06-21T14:55:45+00:00”,“remoteAddr”:“93.51.53.195”,“user”:“owncloud”,“app”:“no app in context”,“method”:“GET”,“url”:“/index.php/apps/files_texteditor/ajax/loadfile?filename=music-notes.txt&dir=%2F”,“message”:“Lock files/77c6754d509bc3949efea2dbfa63c5d1/1 already exists”}

Also using exactly the same version of mysql and PHP, text editor version 2.5.1. I did the upgrade from the previous version using the manual procedure.

Hey,

i think this is a different problem and i think this could need a separate topic because for example this topic is already marked as solved for the OP and the OP had a complete different error:

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.