Notes: Fails to save a note (LockedException)

Created on 4 Aug 2019  ·  23Comments  ·  Source: nextcloud/notes

Not saving a note giving many errors like file is locked with HTTP status 400 and sometimes 500. I tried disabling and enabling it to solve the issue, but without any success. Also restarted nginx, php-fpm. Can't edit it from files app since it shows that the file is locked. Not giving the same error with other notes.

To Reproduce
(can't really say since it is happening with only one file/note)

Expected behavior
Should save the note

Screenshots


  1. Screenshot_20190804_221018

Server:

  • Notes app version: 3.0.1
  • Nextcloud version: 16.0.3
  • OS: Arch Linux ARM
  • Web server: nginx 1.16.0-1
  • PHP version: PHP 7.3.8 (cli) (built: Jul 31 2019 19:49:16) ( NTS )
    Copyright (c) 1997-2018 The PHP Group
    Zend Engine v3.3.8, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.3.8, Copyright (c) 1999-2018, by Zend Technologies
  • Database: Postgresql

Client:

  • Browser (incl. version): Firefox Developer Edition 69.0b8 (64-bit)
  • OS: Linux (manjaro linux kde)

Log files

{"reqId":"DKkMKy4XqWKsKT8Fwj2u","level":3,"time":"2019-08-04T16:40:12+00:00","remoteAddr":"192.168.1.249","user":"jibran","app":"index","method":"PUT","url":"/nextcloud/apps/notes/notes/10405","message":{"Exception":"OCP\\Lock\\LockedException","Message":"\".notes/ux/Elements of User Experience.md\" is locked","Code":0,"Trace":[{"file":"/srv/http/nextcloud/lib/private/Files/View.php","line":1149,"function":"changeLock","class":"OC\\Files\\View","type":"->","args":["/jibran/files/.notes/ux/Elements of User Experience.md",2]},{"file":"/srv/http/nextcloud/lib/private/Files/View.php","line":694,"function":"basicOperation","class":"OC\\Files\\View","type":"->","args":["file_put_contents","/jibran/files/.notes/ux/Elements of User Experience.md",["update","write"],"*** sensitive parameter replaced ***"]},{"file":"/srv/http/nextcloud/lib/private/Files/Node/File.php","line":66,"function":"file_put_contents","class":"OC\\Files\\View","type":"->","args":["/jibran/files/.notes/ux/Elements of User Experience.md","*** sensitive parameter replaced ***"]},{"file":"/srv/http/nextcloud/apps/notes/lib/Service/NotesService.php","line":193,"function":"putContent","class":"OC\\Files\\Node\\File","type":"->","args":["*** sensitive parameter replaced ***"]},{"file":"/srv/http/nextcloud/apps/notes/lib/Controller/NotesController.php","line":147,"function":"update","class":"OCA\\Notes\\Service\\NotesService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/srv/http/nextcloud/apps/notes/lib/Controller/Errors.php","line":22,"function":"OCA\\Notes\\Controller\\{closure}","class":"OCA\\Notes\\Controller\\NotesController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/srv/http/nextcloud/apps/notes/lib/Controller/NotesController.php","line":148,"function":"respond","class":"OCA\\Notes\\Controller\\NotesController","type":"->","args":[{"__class__":"Closure"}]},{"file":"/srv/http/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":166,"function":"update","class":"OCA\\Notes\\Controller\\NotesController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/srv/http/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":99,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Notes\\Controller\\NotesController"},"update"]},{"file":"/srv/http/nextcloud/lib/private/AppFramework/App.php","line":126,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Notes\\Controller\\NotesController"},"update"]},{"file":"/srv/http/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php","line":47,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Notes\\Controller\\NotesController","update",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"id":"10405","_route":"notes.notes.update"}]},{"function":"__invoke","class":"OC\\AppFramework\\Routing\\RouteActionHandler","type":"->","args":[{"id":"10405","_route":"notes.notes.update"}]},{"file":"/srv/http/nextcloud/lib/private/Route/Router.php","line":297,"function":"call_user_func","args":[{"__class__":"OC\\AppFramework\\Routing\\RouteActionHandler"},{"id":"10405","_route":"notes.notes.update"}]},{"file":"/srv/http/nextcloud/lib/base.php","line":975,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/notes/notes/10405"]},{"file":"/srv/http/nextcloud/index.php","line":42,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/srv/http/nextcloud/lib/private/Files/View.php","Line":1987,"Previous":{"Exception":"OCP\\Lock\\LockedException","Message":"\"files/5206be7445d1f2e9c00e7492f2cb84ba\" is locked","Code":0,"Trace":[{"file":"/srv/http/nextcloud/lib/private/Files/Storage/Common.php","line":779,"function":"changeLock","class":"OC\\Lock\\DBLockingProvider","type":"->","args":["files/5206be7445d1f2e9c00e7492f2cb84ba",2]},{"file":"/srv/http/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php","line":615,"function":"changeLock","class":"OC\\Files\\Storage\\Common","type":"->","args":["files/.notes/ux/Elements of User Experience.md",2,{"__class__":"OC\\Lock\\DBLockingProvider"}]},{"file":"/srv/http/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php","line":615,"function":"changeLock","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->","args":["files/.notes/ux/Elements of User Experience.md",2,{"__class__":"OC\\Lock\\DBLockingProvider"}]},{"file":"/srv/http/nextcloud/lib/private/Files/View.php","line":1981,"function":"changeLock","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->","args":["files/.notes/ux/Elements of User Experience.md",2,{"__class__":"OC\\Lock\\DBLockingProvider"}]},{"file":"/srv/http/nextcloud/lib/private/Files/View.php","line":1149,"function":"changeLock","class":"OC\\Files\\View","type":"->","args":["/jibran/files/.notes/ux/Elements of User Experience.md",2]},{"file":"/srv/http/nextcloud/lib/private/Files/View.php","line":694,"function":"basicOperation","class":"OC\\Files\\View","type":"->","args":["file_put_contents","/jibran/files/.notes/ux/Elements of User Experience.md",["update","write"],"*** sensitive parameter replaced ***"]},{"file":"/srv/http/nextcloud/lib/private/Files/Node/File.php","line":66,"function":"file_put_contents","class":"OC\\Files\\View","type":"->","args":["/jibran/files/.notes/ux/Elements of User Experience.md","*** sensitive parameter replaced ***"]},{"file":"/srv/http/nextcloud/apps/notes/lib/Service/NotesService.php","line":193,"function":"putContent","class":"OC\\Files\\Node\\File","type":"->","args":["*** sensitive parameter replaced ***"]},{"file":"/srv/http/nextcloud/apps/notes/lib/Controller/NotesController.php","line":147,"function":"update","class":"OCA\\Notes\\Service\\NotesService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/srv/http/nextcloud/apps/notes/lib/Controller/Errors.php","line":22,"function":"OCA\\Notes\\Controller\\{closure}","class":"OCA\\Notes\\Controller\\NotesController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/srv/http/nextcloud/apps/notes/lib/Controller/NotesController.php","line":148,"function":"respond","class":"OCA\\Notes\\Controller\\NotesController","type":"->","args":[{"__class__":"Closure"}]},{"file":"/srv/http/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":166,"function":"update","class":"OCA\\Notes\\Controller\\NotesController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/srv/http/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":99,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Notes\\Controller\\NotesController"},"update"]},{"file":"/srv/http/nextcloud/lib/private/AppFramework/App.php","line":126,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Notes\\Controller\\NotesController"},"update"]},{"file":"/srv/http/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php","line":47,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Notes\\Controller\\NotesController","update",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"id":"10405","_route":"notes.notes.update"}]},{"function":"__invoke","class":"OC\\AppFramework\\Routing\\RouteActionHandler","type":"->","args":[{"id":"10405","_route":"notes.notes.update"}]},{"file":"/srv/http/nextcloud/lib/private/Route/Router.php","line":297,"function":"call_user_func","args":[{"__class__":"OC\\AppFramework\\Routing\\RouteActionHandler"},{"id":"10405","_route":"notes.notes.update"}]},{"file":"/srv/http/nextcloud/lib/base.php","line":975,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/notes/notes/10405"]},{"file":"/srv/http/nextcloud/index.php","line":42,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/srv/http/nextcloud/lib/private/Lock/DBLockingProvider.php","Line":264},"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0","version":"16.0.3.0","id":"5d470a6c47f14"}
bug

Most helpful comment

I finally was able to reproduce this issue (while implenting https://github.com/nextcloud/notes/pull/519). However, I did not found a way to fix this, yet. I'm still searching for a comprehensive documentation of file locks in Nextcloud. Any help is appreciated. :-)

A possible solution would be to retry the original operation if a LockedException occurs. However, I think it would be better if requesting a lock could include a timeout, until a retry is done automatically. But I'm unsure if this would be possible in Nextcloud.

All 23 comments

Please try this howto to unlock your file: https://help.nextcloud.com/t/file-is-locked-how-to-unlock/1883

@korelstar Thanks, I have started using redis to solve this issue, will report back if I don't face this problem much again.

@korelstar It was happening because the file I was editing couldn't be unlocked sometimes. Switch to Redis for file locking from Memcached - is the solution that I am trying... As mentioned in the url above.

I am using Redis for filelocking but still while editing a text file in Nextcloud I get file is locked error after sometime. I am the only user of the instance and usually edit one file at a time.

I ran into this problem too. At first I solved it by flushing the redis database but now even new notes immediately get locked. The app manages to upload the note but it gets immediately locked and the app doesnt even show that it got uploaded, it still shows the "sync" icon.
I'm using the nextcloud 17.0.3 and the latest notes app.
Filelocking through redis.

I ran into this problem too. At first I solved it by flushing the redis database but now even new notes immediately get locked. The app manages to upload the note but it gets immediately locked and the app doesnt even show that it got uploaded, it still shows the "sync" icon.
I'm using the nextcloud 17.0.3 and the latest notes app.
Filelocking through redis.

The same is happening to me. I can see in the Nextcloud server log that the notes get locked immediately when the mobile app tries to sync them.
I removed every entry from the DB table oc_file_locksbut on the next sync the notes get locked again.

Could you please try to (temporarily) deactivate all other apps in your Nextcloud setup and test again?

Please give also detailed information about your server setup (issue template).

Hi guys, I am on Nextcloud 17.0.3 with all apps updated to their latest version. I am not facing this issue anymore so I think I can't help you debug it.

I found the responsible conflict after deactivating all aps and then activating it in small batches.. Should have known it was this one: Ransomware Recovery (actually called ransomware_detection in app list)
As soon as this app is active, all note changes result in "locked files" and as soon as I disable it, all syncs are fine.

This is the error message that the notes app on android showed when the sync was not possible:

App Version: 2.10.1
App Version Code: 79
Files App Version Code: 30100190

---

OS Version: 4.9.210-Revolution_Kernel(eng.zenix.20200116.165344)
OS API Level: 29
Device: dipper
Model (and Product): MI 8 (dipper)

---

com.nextcloud.android.sso.exceptions.NextcloudHttpRequestFailedException: HTTP request failed with HTTP status-code: 500
at com.nextcloud.android.sso.api.AidlNetworkRequest.performNetworkRequestV2(AidlNetworkRequest.java:155)
at com.nextcloud.android.sso.api.NextcloudAPI.performNetworkRequestV2(NextcloudAPI.java:148)
at it.niedermann.owncloud.notes.persistence.NotesClient.requestServer(NotesClient.java:163)
at it.niedermann.owncloud.notes.persistence.NotesClient.putNote(NotesClient.java:107)
at it.niedermann.owncloud.notes.persistence.NotesClient.editNote(NotesClient.java:122)
at it.niedermann.owncloud.notes.persistence.NoteServerSyncHelper$SyncTask.pushLocalChanges(NoteServerSyncHelper.java:347)
at it.niedermann.owncloud.notes.persistence.NoteServerSyncHelper$SyncTask.doInBackground(NoteServerSyncHelper.java:318)
at it.niedermann.owncloud.notes.persistence.NoteServerSyncHelper$SyncTask.doInBackground(NoteServerSyncHelper.java:284)
at android.os.AsyncTask$3.call(AsyncTask.java:378)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:289)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:919)
Caused by: java.lang.IllegalStateException: <!DOCTYPE html>
<html class="ng-csp" data-placeholder-focus="false" lang="de" data-locale="de" >
<head
data-requesttoken="">
<meta charset="utf-8">
<title>
FBIngolstadt Cloud </title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
<meta name="apple-itunes-app" content="app-id=1125420102">
<meta name="theme-color" content="#0C3D5A">
<link rel="icon" href="/index.php/apps/theming/favicon?v=12">;
<link rel="apple-touch-icon" href="/index.php/apps/theming/icon?v=12">;
<link rel="mask-icon" sizes="any" href="/core/img/favicon-mask.svg" color="#0C3D5A">
<link rel="manifest" href="/index.php/apps/theming/manifest?v=12">;
<link rel="stylesheet" href="/apps/apporder/css/apporder.css?v=778cf622-12">;
<link rel="stylesheet" href="/apps/deck/css/activity.css?v=fa73a1d4-12">;
<link rel="stylesheet" href="/apps/files_pdfviewer/css/style.css?v=ca9f0d77-12">;
<link rel="stylesheet" href="/core/css/guest.css?v=17190c2f-12">;
<script nonce="d1c1TFpDZ0JDK1BvMWsvMU9JajBGQTAvbTU2bXF3bW1JTk1Vd25FbFR1MD06OFEwQUwySktSS2V4bkFDRFYrU1FjRmhRN056SGtsejBRcDFCdHlaQUs5bz0=" defer src="/core/js/dist/main.js?v=17190c2f-12"></script>;
<script nonce="d1c1TFpDZ0JDK1BvMWsvMU9JajBGQTAvbTU2bXF3bW1JTk1Vd25FbFR1MD06OFEwQUwySktSS2V4bkFDRFYrU1FjRmhRN056SGtsejBRcDFCdHlaQUs5bz0=" defer src="/index.php/js/core/merged-template-prepend.js?v=17190c2f-12"></script>;
<script nonce="d1c1TFpDZ0JDK1BvMWsvMU9JajBGQTAvbTU2bXF3bW1JTk1Vd25FbFR1MD06OFEwQUwySktSS2V4bkFDRFYrU1FjRmhRN056SGtsejBRcDFCdHlaQUs5bz0=" defer src="/core/search/js/search.js?v=17190c2f-12"></script>;
<script nonce="d1c1TFpDZ0JDK1BvMWsvMU9JajBGQTAvbTU2bXF3bW1JTk1Vd25FbFR1MD06OFEwQUwySktSS2V4bkFDRFYrU1FjRmhRN056SGtsejBRcDFCdHlaQUs5bz0=" defer src="/core/l10n/de.js?v=17190c2f-12"></script>;
<script nonce="d1c1TFpDZ0JDK1BvMWsvMU9JajBGQTAvbTU2bXF3bW1JTk1Vd25FbFR1MD06OFEwQUwySktSS2V4bkFDRFYrU1FjRmhRN056SGtsejBRcDFCdHlaQUs5bz0=" defer src="/apps/apporder/l10n/de.js?v=17190c2f-12"></script>;
<script nonce="d1c1TFpDZ0JDK1BvMWsvMU9JajBGQTAvbTU2bXF3bW1JTk1Vd25FbFR1MD06OFEwQUwySktSS2V4bkFDRFYrU1FjRmhRN056SGtsejBRcDFCdHlaQUs5bz0=" defer src="/apps/apporder/js/apporder.js?v=17190c2f-12"></script>;
<script nonce="d1c1TFpDZ0JDK1BvMWsvMU9JajBGQTAvbTU2bXF3bW1JTk1Vd25FbFR1MD06OFEwQUwySktSS2V4bkFDRFYrU1FjRmhRN056SGtsejBRcDFCdHlaQUs5bz0=" defer src="/apps/files_pdfviewer/js/previewplugin.js?v=17190c2f-12"></script>;
<script nonce="d1c1TFpDZ0JDK1BvMWsvMU9JajBGQTAvbTU2bXF3bW1JTk1Vd25FbFR1MD06OFEwQUwySktSS2V4bkFDRFYrU1FjRmhRN056SGtsejBRcDFCdHlaQUs5bz0=" defer src="/core/js/dist/share_backend.js?v=17190c2f-12"></script>;
<script nonce="d1c1TFpDZ0JDK1BvMWsvMU9JajBGQTAvbTU2bXF3bW1JTk1Vd25FbFR1MD06OFEwQUwySktSS2V4bkFDRFYrU1FjRmhRN056SGtsejBRcDFCdHlaQUs5bz0=" defer src="/apps/files_videoplayer/js/main.js?v=17190c2f-12"></script>;
<script nonce="d1c1TFpDZ0JDK1BvMWsvMU9JajBGQTAvbTU2bXF3bW1JTk1Vd25FbFR1MD06OFEwQUwySktSS2V4bkFDRFYrU1FjRmhRN056SGtsejBRcDFCdHlaQUs5bz0=" defer src="/apps/gallery/l10n/de.js?v=17190c2f-12"></script>;
<script nonce="d1c1TFpDZ0JDK1BvMWsvMU9JajBGQTAvbTU2bXF3bW1JTk1Vd25FbFR1MD06OFEwQUwySktSS2V4bkFDRFYrU1FjRmhRN056SGtsejBRcDFCdHlaQUs5bz0=" defer src="/apps/notifications/l10n/de.js?v=17190c2f-12"></script>;
<script nonce="d1c1TFpDZ0JDK1BvMWsvMU9JajBGQTAvbTU2bXF3bW1JTk1Vd25FbFR1MD06OFEwQUwySktSS2V4bkFDRFYrU1FjRmhRN056SGtsejBRcDFCdHlaQUs5bz0=" defer src="/apps/notifications/js/notifications.js?v=17190c2f-12"></script>;
<script nonce="d1c1TFpDZ0JDK1BvMWsvMU9JajBGQTAvbTU2bXF3bW1JTk1Vd25FbFR1MD06OFEwQUwySktSS2V4bkFDRFYrU1FjRmhRN056SGtsejBRcDFCdHlaQUs5bz0=" defer src="/core/search/js/searchprovider.js?v=17190c2f-12"></script>;
<script nonce="d1c1TFpDZ0JDK1BvMWsvMU9JajBGQTAvbTU2bXF3bW1JTk1Vd25FbFR1MD06OFEwQUwySktSS2V4bkFDRFYrU1FjRmhRN056SGtsejBRcDFCdHlaQUs5bz0=" defer src="/core/js/files/fileinfo.js?v=17190c2f-12"></script>;
<script nonce="d1c1TFpDZ0JDK1BvMWsvMU9JajBGQTAvbTU2bXF3bW1JTk1Vd25FbFR1MD06OFEwQUwySktSS2V4bkFDRFYrU1FjRmhRN056SGtsejBRcDFCdHlaQUs5bz0=" defer src="/core/js/files/client.js?v=17190c2f-12"></script>;
<link rel="stylesheet" href="/index.php/apps/accessibility/css/user-1ce96a1bcd56b4f1fda4462d184051e5"/><script defer src="/index.php/apps/accessibility/js/accessibility?v=0"; nonce="d1c1TFpDZ0JDK1BvMWsvMU9JajBGQTAvbTU2bXF3bW1JTk1Vd25FbFR1MD06OFEwQUwySktSS2V4bkFDRFYrU1FjRmhRN056SGtsejBRcDFCdHlaQUs5bz0="></script><link rel="stylesheet" href="/index.php/apps/theming/styles?v=12"/><script defer src="/index.php/apps/theming/js/theming?v=12"; nonce="d1c1TFpDZ0JDK1BvMWsvMU9JajBGQTAvbTU2bXF3bW1JTk1Vd25FbFR1MD06OFEwQUwySktSS2V4bkFDRFYrU1FjRmhRN056SGtsejBRcDFCdHlaQUs5bz0="></script> </head>
<body id="body-login">
<noscript>
<div id="nojavascript">
<div>
Diese Anwendung benötigt JavaScript zum ordnungsgemäßen Betrieb. Bitte <a href="https://www.enable-javascript.com/"; target="_blank" rel="noreferrer noopener">aktiviere JavaScript</a> und lade die Seite neu. </div>
</div>
</noscript>
<div class="wrapper">
<div class="v-align">
<header role="banner">
<div id="header">
<div class="logo">
<h1 class="hidden-visually">
Cloud </h1>
</div>
</div>
</header>
<main>
<div class="error error-wide">
<h2>Interner Serverfehler</h2>
<p>Der Server konnte die Anfrage nicht fertig stellen.</p>
<p>Sollte dies erneut auftreten, sende bitte die nachfolgenden technischen Einzelheiten an Deinen Server-Administrator.</p>
<p>Weitere Details können im Server-Protokoll gefunden werden.</p>

<h3>Technische Details</h3>
<ul>
<li>Entfernte Adresse: 0.0.0.0</li>
<li>Anfragekennung: changetosomerandomtext</li>
</ul>

</div>
</main>
</div>
</div>
<footer role="contentinfo">
<p class="info">
<a href="https://files.example.com" target="_blank" rel="noreferrer noopener" class="entity-name">Cloud</a> – ein sicherer Ort für all Deine Daten<br/><a href="https://example.com/impressum/"; class="legal" target="_blank" rel="noreferrer noopener">Impressum</a> · <a href="https://example.com/datenschutz/"; class="legal" target="_blank" rel="noreferrer noopener">Datenschutzerklärung </a> </p>
</footer>
</body>
</html>

at com.nextcloud.android.sso.InputStreamBinder.processRequestV2(InputStreamBinder.java:433)
at com.nextcloud.android.sso.InputStreamBinder.performNextcloudRequestAndBodyStreamV2(InputStreamBinder.java:134)
at com.nextcloud.android.sso.InputStreamBinder.performNextcloudRequestV2(InputStreamBinder.java:117)
at com.nextcloud.android.sso.aidl.IInputStreamService$Stub.onTransact(IInputStreamService.java:134)
at android.os.Binder.execTransactInternal(Binder.java:1021)
at android.os.Binder.execTransact(Binder.java:994)

Especially interesting was the line that says (translated): "This application needs javascript to work"

Server configuration detail

Operating system: Linux 4.8.8-040808-generic #201611150231 SMP Tue Nov 15 07:33:21 UTC 2016 x86_64

Webserver: nginx/1.16.1 (fpm-fcgi)

Database: mysql 5.7.29

PHP version:

7.2.27
Modules loaded: Core, date, libxml, openssl, pcre, zlib, bz2, calendar, ctype, hash, filter, ftp, gettext, gmp, SPL, iconv, Reflection, session, standard, SimpleXML, sockets, mbstring, tokenizer, xml, cgi-fcgi, mysqlnd, bcmath, curl, dba, dom, enchant, fileinfo, gd, imagick, imap, intl, json, ldap, exif, mysqli, odbc, PDO, pdo_mysql, PDO_ODBC, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, redis, soap, sodium, sqlite3, sysvmsg, sysvsem, sysvshm, tidy, xmlreader, xmlrpc, xmlwriter, xsl, zip, ionCube Loader, Zend OPcache

Nextcloud version: 17.0.3 - 17.0.3.1

Updated from an older Nextcloud/ownCloud or fresh install:

Where did you install Nextcloud from: unknown

Signing status

Array
(
)

List of activated apps

Enabled:
 - accessibility: 1.3.0
 - activity: 2.10.1
 - admin_audit: 1.7.0
 - announcementcenter: 3.6.1
 - apporder: 0.9.0
 - bookmarks: 2.3.4
 - bruteforcesettings: 1.5.0
 - calendar: 2.0.1
 - camerarawpreviews: 0.7.3
 - checksum: 0.4.4
 - circles: 0.17.10
 - cloud_federation_api: 1.0.0
 - comments: 1.7.0
 - contacts: 3.1.8
 - data_request: 1.4.0
 - dav: 1.13.0
 - deck: 0.8.0
 - drawio: 0.9.4
 - external: 3.4.1
 - federatedfilesharing: 1.7.0
 - federation: 1.7.0
 - files: 1.12.0
 - files_accesscontrol: 1.7.0
 - files_automatedtagging: 1.7.0
 - files_downloadactivity: 1.6.0
 - files_external: 1.8.0
 - files_frommail: 0.3.0
 - files_markdown: 2.2.0
 - files_pdfviewer: 1.6.0
 - files_retention: 1.6.0
 - files_rightclick: 0.15.1
 - files_sharing: 1.9.0
 - files_trashbin: 1.7.0
 - files_versions: 1.10.0
 - files_videoplayer: 1.6.0
 - firstrunwizard: 2.6.0
 - gallery: 18.4.0
 - groupfolders: 5.0.5
 - impersonate: 1.4.0
 - issuetemplate: 0.6.0
 - logreader: 2.2.0
 - lookup_server_connector: 1.5.0
 - mail: 1.1.2
 - metadata: 0.11.1
 - news: 14.1.3
 - nextcloud_announcements: 1.6.0
 - notes: 3.1.5
 - notifications: 2.5.0
 - oauth2: 1.5.0
 - password_policy: 1.7.0
 - passwords: 2020.2.1
 - polls: 1.3.0
 - privacy: 1.1.0
 - provisioning_api: 1.7.0
 - quota_warning: 1.6.0
 - ransomware_protection: 1.5.1
 - recommendations: 0.5.0
 - serverinfo: 1.7.0
 - sharebymail: 1.7.0
 - spreed: 7.0.2
 - support: 1.0.1
 - survey_client: 1.5.0
 - systemtags: 1.7.0
 - tasks: 0.11.3
 - text: 1.1.1
 - theming: 1.8.0
 - twofactor_backupcodes: 1.6.0
 - updatenotification: 1.7.0
 - user_usage_report: 1.1.2
 - viewer: 1.2.0
 - workflow_pdf_converter: 1.2.0
 - workflow_script: 1.2.0
 - workflowengine: 1.7.0
Disabled:
 - encryption
 - end_to_end_encryption
 - files_fulltextsearch
 - fulltextsearch
 - fulltextsearch_elasticsearch
 - mindmaps
 - ransomware_detection
 - richdocuments
 - terms_of_service
 - twofactor_admin
 - twofactor_gateway
 - twofactor_nextcloud_notification
 - twofactor_totp
 - user_ldap

Configuration (config/config.php)

{
    "instanceid": "***REMOVED SENSITIVE VALUE***",
    "passwordsalt": "***REMOVED SENSITIVE VALUE***",
    "secret": "***REMOVED SENSITIVE VALUE***",
    "trusted_domains": [
        "files.example.de"
    ],
    "datadirectory": "***REMOVED SENSITIVE VALUE***",
    "overwrite.cli.url": "https:\/\/files.example.de",
    "dbtype": "mysql",
    "version": "17.0.3.1",
    "dbname": "***REMOVED SENSITIVE VALUE***",
    "dbhost": "***REMOVED SENSITIVE VALUE***",
    "dbtableprefix": "oc_",
    "dbuser": "***REMOVED SENSITIVE VALUE***",
    "dbpassword": "***REMOVED SENSITIVE VALUE***",
    "logtimezone": "Europe\/Berlin",
    "installed": true,
    "filelocking.enabled": "true",
    "memcache.local": "\\OC\\Memcache\\Redis",
    "memcache.distributed": "\\OC\\Memcache\\Redis",
    "memcache.locking": "\\OC\\Memcache\\Redis",
    "redis": {
        "host": "***REMOVED SENSITIVE VALUE***",
        "port": 6379,
        "timeout": 0
    },
    "appstore.experimental.enabled": true,
    "maintenance": false,
    "theme": "",
    "loglevel": 0,
    "log_rotation_size": 10485760,
    "ldapIgnoreNamingRules": false,
    "default_language": "de",
    "defaultapp": "files",
    "remember_login_cookie_lifetime": 1296000,
    "trashbin_retention_obligation": "auto",
    "mail_from_address": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpmode": "smtp",
    "mail_domain": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpauth": 1,
    "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpport": "587",
    "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
    "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpauthtype": "LOGIN",
    "mail_smtpsecure": "tls",
    "mysql.utf8mb4": true
}

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

Are you using encryption: false

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

@kevinkk525 thanks for the information. This is a bug on RansomwareRecoverys side: https://github.com/undo-ransomware/ransomware_detection/issues/26

And your issue is also dup of: https://github.com/nextcloud/notes/issues/430 and https://github.com/nextcloud/notes/issues/468

So: @js-d-coder and @kevinkk525 are solved and @myxor is remaining.

@myxor can you please check if you are also using RansomwareRecovery and if you are using the latest version of all apps?

Just mentioning, I never had installed RansomwareRecoverys app, so I guess in my case it was some old bug that is solved.

Deactivating Ransomware Recovery App works for me.

Having something similar with Nextcloud 18.0.4 and Notes 3.3.0, however I don't have Ransomware Protection installed, and this exception is unstable and only in web ui - it pops up, but then in a couple of tries it saves successfully. Any way to track what app locked the file?

@Anrock I'm not aware of gathering the source of the lock. Even if you have not Ransomware Protection App installed, could you please try to (temporarily) deactivate all other apps in your Nextcloud setup and test again? Maybe another is producing this error.

@korelstar, okay, I've disabled some apps that probably affect Notes (Markdown, Text, Deleted files) and a bunch of others I don't use anyway, but leaved other enabled - like Calendar, Contacts, Log reader (unlikely they can affect Notes) and News (can't leave without this, sorry :D). Will see how it goes...

Welp. Tried to write a new note today. Reproduced after a couple of minutes of writing. Disabled literally every app except Notes - still reproducible.

Strange. I still can't reproduce this issue. Is there any related information in the Nextcloud log? Can you please provide some more detailed information about your setup?

Same problem here,
get the error message, but afer some time the note will be saved.
No entry in the serverlogs, but this in the jc console:

Error: "Request failed with status code 412"
    exports https://cloud.xxx.de/apps/notes/js/notes.js?v=64236d1b-4:797
    exports https://cloud.xxx.de/apps/notes/js/notes.js?v=64236d1b-4:797
    onreadystatechange https://cloud.xxx.de/apps/notes/js/notes.js?v=64236d1b-4:797
notes.js:817:215784
    t https://cloud.xxx.de/apps/notes/js/notes.js?v=64236d1b-4:817

NC 14.0.4, Notes 3.3

@KoljaL Sorry, but Nextcloud 14 is not supported anymore. Please update to at least Nextcloud 16.

Sorry, my mistake.
I use NC 18.0.4 and since a few minutes Notes 3.4

I finally was able to reproduce this issue (while implenting https://github.com/nextcloud/notes/pull/519). However, I did not found a way to fix this, yet. I'm still searching for a comprehensive documentation of file locks in Nextcloud. Any help is appreciated. :-)

A possible solution would be to retry the original operation if a LockedException occurs. However, I think it would be better if requesting a lock could include a timeout, until a retry is done automatically. But I'm unsure if this would be possible in Nextcloud.

I think I've implemented a fix for this in the context of #519. It will be part of the next release (3.5.0). Please test this when released and give feedback. If the problem still occurs, please open a new issue with a detailed description on everything ;-)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dclaisse picture dclaisse  ·  7Comments

Wizlonex picture Wizlonex  ·  4Comments

izuolan picture izuolan  ·  7Comments

trymeouteh picture trymeouteh  ·  6Comments

Tuxyso picture Tuxyso  ·  5Comments