Nextcloud-notes: Creating a note with emoji in the title constantly spawns New Note, New Note (2) etc while trying to sync

Created on 15 Aug 2017  路  13Comments  路  Source: stefan-niedermann/nextcloud-notes

When creating a new note with a title containing an emoji, the app appears to get "stuck" syncing it, and continually creates new notes with the generic title New Note, New Note (2), New Note (3) etc while in this state. Removing the emoji from the title of the new note allowed the app to sync it as normal without creating additional notes.

I tried it a second time with a new note, and on adding an emoji to the title, saw the app generate new notes up as far as New Note (9) before stopping the process by editing the note I created and removing the emoji again.

Server-App

All 13 comments

There was an issue in the server app regarding special chars, see nextcloud/notes#93. The fix was just merged, see nextcloud/notes#125. It would be nice if you could test if that solves your issue, too. So please test it again using the server app in the version from git.

@mikebabb can you please retest with the server app from git like @korelstar mentioned and give us feedback?

@korelstar @stefan-niedermann My Nextcloud instance is currently running Notes 2.3.1 - how can I update it to the version you'd like the issue tested on? And once I've done that, can I revert back to 2.3.1 easily enough? I'd like to keep everything on stable channels if possible.

If you're not familiar with Git, download the zip from https://github.com/nextcloud/notes/archive/master.zip and copy the content to your note's app directory.

Alternatively, do the following changes manually: https://github.com/nextcloud/notes/commit/d7e81dc0c862fbb628208b108707a8399c7a248a

@korelstar I replaced apps/notes on the server with the version you linked, but the bug persists. Notes containing emoji continually spawn new note files as detailed in the first post.

Is there any relevant information in the logfile nextcloud.log (in the data directory)?

@mikebabb did you have time to check the log files? We all are completely blind here, we can only guess if we do not have concrete information. Please check also your browser console for eventual errors.

Hey @stefan-niedermann, I didn't get a chance to look in on this again until now. Here's what my log says while the notes are continually created:

Error   PHP Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php://input stream instead. at Unknown#0   2017-10-28T12:40:15+0100
Error   PHP Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php://input stream instead. at Unknown#0   2017-10-28T12:40:09+0100
Error   index   OCP\Files\InvalidPathException: File name contains at least one invalid character   2017-10-28T12:40:09+0100
Error   PHP Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php://input stream instead. at Unknown#0   2017-10-28T12:40:03+0100
Error   index   OCP\Files\InvalidPathException: File name contains at least one invalid character   2017-10-28T12:40:03+0100
Error   PHP Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php://input stream instead. at Unknown#0   2017-10-28T12:39:58+0100
Error   index   OCP\Files\InvalidPathException: File name contains at least one invalid character   2017-10-28T12:39:58+0100
Error   PHP Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php://input stream instead. at Unknown#0   2017-10-28T12:39:49+0100
Error   index   OCP\Files\InvalidPathException: File name contains at least one invalid character   2017-10-28T12:39:49+0100
Error   PHP Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php://input stream instead. at Unknown#0   2017-10-28T12:39:44+0100
Error   index   OCP\Files\InvalidPathException: File name contains at least one invalid character   2017-10-28T12:39:44+0100
Error   PHP Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php://input stream instead. at Unknown#0   2017-10-28T12:39:42+0100
Error   index   OCP\Files\InvalidPathException: File name contains at least one invalid character   2017-10-28T12:39:41+0100

Expanding each instance of OCP\Files\InvalidPathException: File name contains at least one invalid character looks like this:

/home/nextcloud_user/nextcloud/lib/private/Files/View.php - line 769: OC\Files\View->verifyPath('/mike/files/Not...', 'Test \xF0\x9F\x98\x81.txt')
/home/nextcloud_user/nextcloud/lib/private/Files/Node/Node.php - line 415: OC\Files\View->rename('/mike/files/Not...', '/mike/files/Not...')
/home/nextcloud_user/nextcloud/apps/notes/service/notesservice.php - line 155: OC\Files\Node\Node->move('/mike/files/Not...')
/home/nextcloud_user/nextcloud/apps/notes/controller/notesapicontroller.php - line 176: OCA\Notes\Service\NotesService->update(145974, 'Test \xF0\x9F\x98\x81', 'mike', NULL, 1509190778)
/home/nextcloud_user/nextcloud/apps/notes/controller/notesapicontroller.php - line 138: OCA\Notes\Controller\NotesApiController->updateData(145974, 'Test \xF0\x9F\x98\x81', NULL, 1509190778, false)
/home/nextcloud_user/nextcloud/apps/notes/controller/errors.php - line 31: OCA\Notes\Controller\NotesApiController->OCA\Notes\Controller\{closure}()
/home/nextcloud_user/nextcloud/apps/notes/controller/notesapicontroller.php - line 139: OCA\Notes\Controller\NotesApiController->respond(Object(Closure))
[internal function] OCA\Notes\Controller\NotesApiController->create('Test \xF0\x9F\x98\x81', NULL, 1509190778, false)
/home/nextcloud_user/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 160: call_user_func_array(Array, Array)
/home/nextcloud_user/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 90: OC\AppFramework\Http\Dispatcher->executeController(Object(OCA\Notes\Controller\NotesApiController), 'create')
/home/nextcloud_user/nextcloud/lib/private/AppFramework/App.php - line 114: OC\AppFramework\Http\Dispatcher->dispatch(Object(OCA\Notes\Controller\NotesApiController), 'create')
/home/nextcloud_user/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php - line 47: OC\AppFramework\App main('NotesApiControl...', 'create', Object(OC\AppFramework\DependencyInjection\DIContainer), Array)
[internal function] OC\AppFramework\Routing\RouteActionHandler->__invoke(Array)
/home/nextcloud_user/nextcloud/lib/private/Route/Router.php - line 299: call_user_func(Object(OC\AppFramework\Routing\RouteActionHandler), Array)
/home/nextcloud_user/nextcloud/lib/base.php - line 1004: OC\Route\Router->match('/apps/notes/api...')
/home/nextcloud_user/nextcloud/index.php - line 48: OC handleRequest()
{main}

Thanks for the log!

Do you use MySQL as database backend? Please try this: https://docs.nextcloud.com/server/12/admin_manual/configuration_database/mysql_4byte_support.html

But, of course, the current situation is not satisfying. We'll have to fix the server app to better cope with such errors. I've started to work on this.

Please see nextcloud/notes#148 for a fix.

@korelstar thanks for your work on a fix, shall I close this issue or leave it open until your pull request is merged in?

We can leave it open as a reminder if you want (though this is the android-client-repository). You can close it when the PR in the server repo has been merged or now, whatever you prefer :)

This should not happen anymore with the server app version 2.3.2.

Was this page helpful?
0 / 5 - 0 ratings