Autosave issues
Probably not the most popular feature request but I've noticed a strange bug with the autosave that sometimes work, other time does not and ends up with me having to refresh. A save button with a reworked save scheme can really help.
Rather than introducing a save button, the autosave should be fixed if its unreliable. Please describe the exact issue including server and js console logs
I'm having a similar problem with the autosaving. It usually happens when I write for a while without stopping 500-1000 words. Although it also happens some times when I write just a few
Today I've kept the web tools open and I've noticed that at one point the server (a small scaleway server) returned a 500 http error saying that there was an internal server error, and after that it didn't tried to save anymore the changes.
This is the log returned by the admin panel on owncloud:
Error notes OCA\Notes\Db\Note Object ( [modified] => 1451378078 [title] => Test [content] => Test --- Some long text [id] => 61941 [_updatedFields:OCP\AppFramework\Db\Entity:private] => Array ( ) [_fieldTypes:OCP\AppFramework\Db\Entity:private] => Array ( [id] => integer [modified] => integer ) ) 2015-12-29T08:34:39+00:00
Error index Exception: {"Exception":"OCP\\Lock\\LockedException","Message":"\"Notes\/Test.txt\" is locked","Code":0,"Trace":"#0 \/var\/www\/owncloud\/lib\/private\/files\/view.php(1017): OC\\Files\\View->changeLock('\/user\/files\/No...', 2)\n#1 \/var\/www\/owncloud\/lib\/private\/files\/view.php(585): OC\\Files\\View->basicOperation('file_put_conten...', '\/user\/files\/No...', Array, 'Morning page #1...')\n#2 \/var\/www\/owncloud\/lib\/private\/files\/node\/file.php(51): OC\\Files\\View->file_put_contents('\/user\/files\/No...', 'Morning page #1...')\n#3 \/var\/www\/owncloud\/apps\/notes\/service\/notesservice.php(129): OC\\Files\\Node\\File->putContent('Morning page #1...')\n#4 \/var\/www\/owncloud\/apps\/notes\/controller\/notescontroller.php(103): OCA\\Notes\\Service\\NotesService->update(61941, 'Morning page #1...', 'user')\n#5 \/var\/www\/owncloud\/apps\/notes\/controller\/errors.php(31): OCA\\Notes\\Controller\\NotesController->OCA\\Notes\\Controller\\{closure}()\n#6 \/var\/www\/owncloud\/apps\/notes\/controller\/notescontroller.php(104): OCA\\Notes\\Controller\\NotesController->respond(Object(Closure))\n#7 [internal function]: OCA\\Notes\\Controller\\NotesController->update(61941, 'Morning page #1...')\n#8 \/var\/www\/owncloud\/lib\/private\/appframework\/http\/dispatcher.php(159): call_user_func_array(Array, Array)\n#9 \/var\/www\/owncloud\/lib\/private\/appframework\/http\/dispatcher.php(89): OC\\AppFramework\\Http\\Dispatcher->executeController(Object(OCA\\Notes\\Controller\\NotesController), 'update')\n#10 \/var\/www\/owncloud\/lib\/private\/appframework\/app.php(108): OC\\AppFramework\\Http\\Dispatcher->dispatch(Object(OCA\\Notes\\Controller\\NotesController), 'update')\n#11 \/var\/www\/owncloud\/lib\/private\/appframework\/routing\/routeactionhandler.php(45): OC\\AppFramework\\App::main('NotesController', 'update', Object(OC\\AppFramework\\DependencyInjection\\DIContainer), Array)\n#12 [internal function]: OC\\AppFramework\\routing\\RouteActionHandler->__invoke(Array)\n#13 \/var\/www\/owncloud\/lib\/private\/route\/router.php(282): call_user_func(Object(OC\\AppFramework\\routing\\RouteActionHandler), Array)\n#14 \/var\/www\/owncloud\/lib\/base.php(851): OC\\Route\\Router->match('\/apps\/notes\/not...')\n#15 \/var\/www\/owncloud\/index.php(39): OC::handleRequest()\n#16 {main}","File":"\/var\/www\/owncloud\/lib\/private\/files\/view.php","Line":1844} 2015-12-29T08:24:53+00:00
Error notes OCA\Notes\Db\Note Object ( [modified] => 1451377491 [title] => Test [content] => Test --- Some long text [id] => 61941 [_updatedFields:OCP\AppFramework\Db\Entity:private] => Array ( ) [_fieldTypes:OCP\AppFramework\Db\Entity:private] => Array ( [id] => integer [modified] => integer ) ) 2015-12-29T08:24:49+00:00
Fatal webdav Exception: {"Message":"HTTP\/1.1 423 \"Notes\/Test.txt\" is locked","Exception":"OC\\Connector\\Sabre\\Exception\\FileLocked","Code":0,"Trace":"#0 \/var\/www\/owncloud\/3rdparty\/sabre\/dav\/lib\/DAV\/CorePlugin.php(82): OC\\Connector\\Sabre\\File->get()\n#1 [internal function]: Sabre\\DAV\\CorePlugin->httpGet(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#2 \/var\/www\/owncloud\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#3 \/var\/www\/owncloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(469): Sabre\\Event\\EventEmitter->emit('method:GET', Array)\n#4 \/var\/www\/owncloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(254): Sabre\\DAV\\Server->invokeMethod(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#5 \/var\/www\/owncloud\/apps\/files\/appinfo\/remote.php(55): Sabre\\DAV\\Server->exec()\n#6 \/var\/www\/owncloud\/remote.php(137): require_once('\/var\/www\/ownclo...')\n#7 {main}","File":"\/var\/www\/owncloud\/lib\/private\/connector\/sabre\/file.php","Line":277} 2015-12-29T08:24:48+00:00
The javascript console didn't show any error.
Maybe the fix could be to take care of server errors and retry to save or maybe showing that there was an error during the save, and if there are new changes to try to save again. I'm not sure what's the cause on the server, it usually takes ~2 seconds to process each request, which is not a big deal since I'm the only user.
I've also noticed that the plugin sends a lot of requests one after the other, maybe it could send them when you finish to type for 1-2 seconds, instead of continuing sending them
Same here. everytime when I'm writing on my notes for longer, its seems that nothing will be saved. I see the spinning icon on the top right corner but even i would wait allday nothing will happen. Next time i will watch the console for any errors.
Well, now I know where the problem is.... When an xhr request is pending and you press ctrl + s for whatever reason, (in my case i just want to save it like notepad++ :D ) the xhr request is immediately cancel and the app doesnt know and waits for response.
see screenshot...
