files_texteditor
files_texteditor copied to clipboard
Text Editor 2.0 saving errors - ownCloud 8.2.1 upgrade from 8.1.4
As usual there are a few bumps in the road in the upgrade process. This last one was no exception although it was a little smoother than in the past. I had two quirks, the other is for a different forum... The one noted in the subject line is a little strange. I use this app a lot for note taking and the previous versions have worked perfectly as expected.
In the upgrade process I upgraded the Text Editor app to version 2.0. All seemed to work fine... the new improvements in the Text Editor make it a little nicer to use with the auto-save feature. It works as expected when creating a text file, editing and saving with in the Files area on ownCloud. The strange behavior occurs after to create or attempt to edit a text file on a share across the network. You can create the text file, you can open it and edit it, however ONLY the 1st save saves OK. All subsequent saves fail and eventually locks up the text file. You can close it but only the 1st save EACH time you open it saves.
You would thing that there is a permissions problem; if that were so you could not create/save the file and the first save would fail as well.
Error message next the file name: Failed!
Error message when closing the text file: There was a problem saving your changes. Click to resume editing
System ownCloud: 8.2.1 php: 5.6 OS: CentOS 7 app: Text Editor 2.0 I have the same problem on a different system System ownCloud: 8.2.1 php: 5.4.4 OS: CentOS 6.5 app: Text Editor 2.0
Any pointers to solve the problem would be appreciated.
DaCapn
The strange behavior occurs after to create or attempt to edit a text file on a share across the network.
Can you explain your external file storage setup please?
Maybe related to: https://github.com/owncloud/files_texteditor/issues/95
I'm having the same issue Ubuntu 14.04.3 LTS Owncloud version 8.2.1 Text Editor 2.0
External SMB Storage affected only, files residing on the server save fine
@capnjb Hey can you explain your external storage setup for me? Want to dig into this and get it sorted for you :) We have some other hiccups with external storages (https://github.com/owncloud/files_texteditor/issues/155) but they don't sound directly related.
@VamPikmin What is written in your own cloud log file? It should give us some hints on where it is going wrong after the first successful save. Same with @capnjb
Is this enough? There's so much going on there
{"reqId":"5oP4r+qHwbteaeEpW/Ma","remoteAddr":"10.131.175.198","app":"files_texteditor","message":"File: /server/test.txt modified since opening.","level":3,"time":"2015-12-31T12:25:44+00:00","method":"PUT","url":"/index.php/apps/files_texteditor/ajax/savefile"} {"reqId":"Ox4EuABuU8EVsQt9wCnZ","remoteAddr":"10.131.175.198","app":"files_texteditor","message":"File: /server/test.txt modified since opening.","level":3,"time":"2015-12-31T12:26:22+00:00","method":"PUT","url":"/index.php/apps/files_texteditor/ajax/savefile"} {"reqId":"8UqV+yRCnw2ZgZCTeI3k","remoteAddr":"10.131.175.198","app":"core","message":"Generating preview for "/server/test.txt" with "OC\Preview\TXT"","level":0,"time":"2015-12-31T12:26:38+00:00","method":"GET","url":"/index.php/core/preview.png?file=%2Fserver%2Ftest.txt&c=56851efb61924&x=32&y=32&forceIcon=0"} {"reqId":"8UqV+yRCnw2ZgZCTeI3k","remoteAddr":"10.131.175.198","app":"files_locking","message":"INFO: Write lock requested for /owncloud/user/thumbnails/33165/2048-2048-max.png","level":0,"time":"2015-12-31T12:26:38+00:00","method":"GET","url":"/index.php/core/preview.png?file=%2Fserver%2Ftest.txt&c=56851efb61924&x=32&y=32&forceIcon=0"} {"reqId":"8UqV+yRCnw2ZgZCTeI3k","remoteAddr":"10.131.175.198","app":"files_locking","message":"PASS: Write lock succeeded on /owncloud/user/thumbnails/33165/2048-2048-max.png","level":0,"time":"2015-12-31T12:26:38+00:00","method":"GET","url":"/index.php/core/preview.png?file=%2Fserver%2Ftest.txt&c=56851efb61924&x=32&y=32&forceIcon=0"} {"reqId":"8UqV+yRCnw2ZgZCTeI3k","remoteAddr":"10.131.175.198","app":"files_locking","message":"INFO: Incrementing lock type 2 count for /owncloud/user/thumbnails/33165/2048-2048-max.png","level":0,"time":"2015-12-31T12:26:38+00:00","method":"GET","url":"/index.php/core/preview.png?file=%2Fserver%2Ftest.txt&c=56851efb61924&x=32&y=32&forceIcon=0"} {"reqId":"8UqV+yRCnw2ZgZCTeI3k","remoteAddr":"10.131.175.198","app":"files_locking","message":"INFO: Write lock requested for /owncloud/user/thumbnails/33165/32-32.png","level":0,"time":"2015-12-31T12:26:38+00:00","method":"GET","url":"/index.php/core/preview.png?file=%2Fserver%2Ftest.txt&c=56851efb61924&x=32&y=32&forceIcon=0"} {"reqId":"8UqV+yRCnw2ZgZCTeI3k","remoteAddr":"10.131.175.198","app":"files_locking","message":"PASS: Write lock succeeded on /owncloud/user/thumbnails/33165/32-32.png","level":0,"time":"2015-12-31T12:26:38+00:00","method":"GET","url":"/index.php/core/preview.png?file=%2Fserver%2Ftest.txt&c=56851efb61924&x=32&y=32&forceIcon=0"} {"reqId":"8UqV+yRCnw2ZgZCTeI3k","remoteAddr":"10.131.175.198","app":"files_locking","message":"INFO: Incrementing lock type 2 count for /owncloud/user/thumbnails/33165/32-32.png","level":0,"time":"2015-12-31T12:26:38+00:00","method":"GET","url":"/index.php/core/preview.png?file=%2Fserver%2Ftest.txt&c=56851efb61924&x=32&y=32&forceIcon=0"} {"reqId":"brbb6rPz83r0kxGnBmcC","remoteAddr":"10.131.175.198","app":"files_texteditor","message":"File: /server/test.txt modified since opening.","level":3,"time":"2015-12-31T12:27:16+00:00","method":"PUT","url":"/index.php/apps/files_texteditor/ajax/savefile"} root@owncloud:/owncloud# cat owncloud.log | grep test.txt {"reqId":"5oP4r+qHwbteaeEpW/Ma","remoteAddr":"10.131.175.198","app":"files_texteditor","message":"File: /server/test.txt modified since opening.","level":3,"time":"2015-12-31T12:25:44+00:00","method":"PUT","url":"/index.php/apps/files_texteditor/ajax/savefile"} {"reqId":"Ox4EuABuU8EVsQt9wCnZ","remoteAddr":"10.131.175.198","app":"files_texteditor","message":"File: /server/test.txt modified since opening.","level":3,"time":"2015-12-31T12:26:22+00:00","method":"PUT","url":"/index.php/apps/files_texteditor/ajax/savefile"} {"reqId":"8UqV+yRCnw2ZgZCTeI3k","remoteAddr":"10.131.175.198","app":"core","message":"Generating preview for "/server/test.txt" with "OC\Preview\TXT"","level":0,"time":"2015-12-31T12:26:38+00:00","method":"GET","url":"/index.php/core/preview.png?file=%2Fserver%2Ftest.txt&c=56851efb61924&x=32&y=32&forceIcon=0"} {"reqId":"8UqV+yRCnw2ZgZCTeI3k","remoteAddr":"10.131.175.198","app":"files_locking","message":"INFO: Write lock requested for /owncloud/user/thumbnails/33165/2048-2048-max.png","level":0,"time":"2015-12-31T12:26:38+00:00","method":"GET","url":"/index.php/core/preview.png?file=%2Fserver%2Ftest.txt&c=56851efb61924&x=32&y=32&forceIcon=0"} {"reqId":"8UqV+yRCnw2ZgZCTeI3k","remoteAddr":"10.131.175.198","app":"files_locking","message":"PASS: Write lock succeeded on /owncloud/user/thumbnails/33165/2048-2048-max.png","level":0,"time":"2015-12-31T12:26:38+00:00","method":"GET","url":"/index.php/core/preview.png?file=%2Fserver%2Ftest.txt&c=56851efb61924&x=32&y=32&forceIcon=0"} {"reqId":"8UqV+yRCnw2ZgZCTeI3k","remoteAddr":"10.131.175.198","app":"files_locking","message":"INFO: Incrementing lock type 2 count for /owncloud/user/thumbnails/33165/2048-2048-max.png","level":0,"time":"2015-12-31T12:26:38+00:00","method":"GET","url":"/index.php/core/preview.png?file=%2Fserver%2Ftest.txt&c=56851efb61924&x=32&y=32&forceIcon=0"} {"reqId":"8UqV+yRCnw2ZgZCTeI3k","remoteAddr":"10.131.175.198","app":"files_locking","message":"INFO: Write lock requested for /owncloud/user/thumbnails/33165/32-32.png","level":0,"time":"2015-12-31T12:26:38+00:00","method":"GET","url":"/index.php/core/preview.png?file=%2Fserver%2Ftest.txt&c=56851efb61924&x=32&y=32&forceIcon=0"} {"reqId":"8UqV+yRCnw2ZgZCTeI3k","remoteAddr":"10.131.175.198","app":"files_locking","message":"PASS: Write lock succeeded on /owncloud/user/thumbnails/33165/32-32.png","level":0,"time":"2015-12-31T12:26:38+00:00","method":"GET","url":"/index.php/core/preview.png?file=%2Fserver%2Ftest.txt&c=56851efb61924&x=32&y=32&forceIcon=0"} {"reqId":"8UqV+yRCnw2ZgZCTeI3k","remoteAddr":"10.131.175.198","app":"files_locking","message":"INFO: Incrementing lock type 2 count for /owncloud/user/thumbnails/33165/32-32.png","level":0,"time":"2015-12-31T12:26:38+00:00","method":"GET","url":"/index.php/core/preview.png?file=%2Fserver%2Ftest.txt&c=56851efb61924&x=32&y=32&forceIcon=0"} {"reqId":"brbb6rPz83r0kxGnBmcC","remoteAddr":"10.131.175.198","app":"files_texteditor","message":"File: /server/test.txt modified since opening.","level":3,"time":"2015-12-31T12:27:16+00:00","method":"PUT","url":"/index.php/apps/files_texteditor/ajax/savefile"}
@tomneedham Thank you for taking interest in this problem. The two past upgrades impacted SMB shares in my application. Prior to that last 2 major upgrades all worked as expected. Perhaps they are both related so I will try to explain.
- I use ownCloud for its calendar and as web gateway to selected shares on other devices on my networks (home & work). I have two systems a CentOS6.5 system at work and a CentOS7 system at home and BOTH experience the same problems and are both configured in a similar fashion on the network. Most notably to shares located on a Buffalotech NAS RAID box. These work flawlessly as expected on the LAN with both Windows and Linux PC's.
- I believe it was in July 2015 I was going from 7.4.x to 8.1.x with SMB shares I lost ability to share more than the root share. For Example: I could share top level share but not a directory with the share. As I posted on Gethub a picture is worth a thousand words. The work around for me was to move the share locations but it was a pretty big job to reconfigure everything... moving the share was the easy part... backups was another matter.
- This same problem exists today with OC 8.2.2 and why it could be related to other problems noted below
Next comes the upgrade from 8.1.4 to 8.2.1 two things broke and they may be related because they are both on SMB shares and may give a clue.
- Problem 1 was that the new text-editor 2.0 would save only the first (auto) save after that it would fail. If you attempted to delete the file it would not delete and when you close the file OC with complain there was an error saving your file. You could create a new text file and copy the text from the locked one into the new one but again it would only save the first time. Initially I only noticed this phenomenon on SMB shared text files but it later appeared on the files located locally in the data/"username" directory. (Note: the latest update 8.2.2 fixed the ability to delete the files, edit and save files properly if saved in the local data/"username" directory. With SMB locations it still reacts as mentioned above. However, OC speed has dramatically increased in navigating from screen to screen ... 8.2.1 was painfully slow!)
- Problem 2 which is the most annoying and applies to SMB shares for any file or directory. The shared directory listing does not update. If a file or directory is added to an existing directory (not by ownCloud) that is shared when you navigate to that location in ownCloud it is not there. One suggestion was to do an scan using php. This sort of worked BUT required by trial and error as it would run out of memory for during the scan and not complete. It required modifying the php.ini file from the default of 128MB to 8192MB! ; Maximum amount of memory a script may consume (128MB) ; http://php.net/memory-limit ;memory_limit = 128M memory_limit = 8192M
However, after the scan it no longer updates the ownCloud directory listing... as you can imagine this is pretty annoying and renders much of the power of ownCloud pretty useless. This is some kind of indexing update error associated with SMB shares.
I am not using any memcache-ing yet. I wanted to solve these other problems first and not add new issues to the pot.
I hope this explains how my network is configured and the problems I am having with OC 8.x... everything worked great in OC 7.4 and older! Sometimes I wonder if I should upgrade... if it ain't broke don't fix it!
On 12/30/2015 06:21, Tom Needham wrote:
@capnjb https://github.com/capnjb Hey can you explain your external storage setup for me? Want to dig into this and get it sorted for you :) We have some other hiccups with external storages (#155 https://github.com/owncloud/files_texteditor/issues/155) but they don't sound directly related.
— Reply to this email directly or view it on GitHub https://github.com/owncloud/files_texteditor/issues/150#issuecomment-167981355.
@tomneedham This is an example creating and saving a Test of SMB Save.txt file.
{"reqId":"VoV496WUDBbg5kC@WVKt@gAAAAA","remoteAddr":"107.77.76.19","app":"caldav","message":"Exception: {"Message":"HTTP\/1.1 401 No basic authentication headers were found","Exception":"Sabre\DAV\Exception\NotAuthenticated","Code":0,"Trace":"#0 \/var\/www\/html\/owncloud\/lib\/private\/connector\/sabre\/auth.php(154): Sabre\DAV\Auth\Backend\AbstractBasic->authenticate(Object(Sabre\DAV\Server), 'ownCloud')\n#1 \/var\/www\/html\/owncloud\/lib\/private\/connector\/sabre\/auth.php(127): OC\Connector\Sabre\Auth->auth(Object(Sabre\DAV\Server), 'ownCloud')\n#2 \/var\/www\/html\/owncloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Auth\/Plugin.php(118): OC\Connector\Sabre\Auth->authenticate(Object(Sabre\DAV\Server), 'ownCloud')\n#3 [internal function]: Sabre\DAV\Auth\Plugin->beforeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))\n#4 \/var\/www\/html\/owncloud\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#5 \/var\/www\/html\/owncloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(456): Sabre\Event\EventEmitter->emit('beforeMethod', Array)\n#6 \/var\/www\/html\/owncloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(254): Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))\n#7 \/var\/www\/html\/owncloud\/apps\/calendar\/appinfo\/remote.php(60): Sabre\DAV\Server->exec()\n#8 \/var\/www\/html\/owncloud\/remote.php(137): require_once('\/var\/www\/html\/o...')\n#9 {main}","File":"\/var\/www\/html\/owncloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Auth\/Backend\/AbstractBasic.php","Line":70}","level":0,"time":"2015-12-31T18:50:31+00:00","method":"PROPFIND","url":"/owncloud/remote.php/caldav/calendars/maggie.a/"} {"reqId":"VoV5DOu@gFo2vSup78xzRQAAAAE","remoteAddr":"192.168.10.254","app":"files","message":" Backends provided no user object for ","level":3,"time":"2015-12-31T18:50:53+00:00","method":"GET","url":"/owncloud/cron.php"} {"reqId":"VoV5DOu@gFo2vSup78xzRQAAAAE","remoteAddr":"192.168.10.254","app":"no app in context","message":"Error while running background job: Backends provided no user object for ","level":3,"time":"2015-12-31T18:50:53+00:00","method":"GET","url":"/owncloud/cron.php"} {"reqId":"VoV65Gj21MPWKSmz@tnRgQAAAAU","remoteAddr":"192.168.10.254","app":"files_texteditor","message":"File: /!Vacations/Test of SMB Save.txt modified since opening.","level":3,"time":"2015-12-31T18:58:44+00:00","method":"PUT","url":"/owncloud/index.php/apps/files_texteditor/ajax/savefile"} {"reqId":"VoV68dKfXMmzr@T7GvnhnQAAAAI","remoteAddr":"192.168.10.254","app":"files_texteditor","message":"File: /!Vacations/Test of SMB Save.txt modified since opening.","level":3,"time":"2015-12-31T18:58:58+00:00","method":"PUT","url":"/owncloud/index.php/apps/files_texteditor/ajax/savefile"} {"reqId":"VoV696WUDBbg5kC@WVKt-QAAAAA","remoteAddr":"192.168.10.254","app":"files_texteditor","message":"File: /!Vacations/Test of SMB Save.txt modified since opening.","level":3,"time":"2015-12-31T18:59:03+00:00","method":"PUT","url":"/owncloud/index.php/apps/files_texteditor/ajax/savefile"}
Regards, Jon
Sorry did not mean to close...
@VamPikmin Thanks. Crucial bit for me is the
{"reqId":"Ox4EuABuU8EVsQt9wCnZ","remoteAddr":"10.131.175.198","app":"files_texteditor","message":"File: \/server\/test.txt modified since opening.","level":3,"time":"2015-12-31T12:26:22+00:00","method":"PUT","url":"\/index.php\/apps\/files_texteditor\/ajax\/savefile"}
Likewise, @capnjb you seem to have a similar issue:
{"reqId":"VoV696WUDBbg5kC@WVKt-QAAAAA","remoteAddr":"192.168.10.254","app":"files_texteditor","message":"File: \/!Vacations\/Test of SMB Save.txt modified since opening.","level":3,"time":"2015-12-31T18:59:03+00:00","method":"PUT","url":"\/owncloud\/index.php\/apps\/files_texteditor\/ajax\/savefile"}
I shall dig into this new week, thanks for the additional info, happy new year!
@tomneedham Thank you! Happy New Year to you as well....
On 12/31/2015 14:15, Tom Needham wrote:
I shall dig into this new week, thanks for the additional info, happy new year!
— Reply to this email directly or view it on GitHub https://github.com/owncloud/files_texteditor/issues/150#issuecomment-168236382.
Thank you, Happy New Year guys
the same problem here - opensuse 13.2 and OC 8.2.2
same problem here.. OC 8.2.2 Ubuntu LTS 14.04.
This seems to be finally fixed, upgraded to OC9 and Text Editor 2.1 Thank you