Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating a note with emoji in the title constantly spawns New Note, New Note (2) etc while trying to sync #237

Closed
mikebabb opened this issue Aug 15, 2017 · 13 comments · Fixed by nextcloud/notes#148
Labels
Server-App depends on changes in the Nextcloud Notes server app

Comments

@mikebabb
Copy link
Member

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.

@korelstar
Copy link
Member

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.

@stefan-niedermann
Copy link
Member

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

@stefan-niedermann stefan-niedermann added the Server-App depends on changes in the Nextcloud Notes server app label Sep 18, 2017
@mikebabb
Copy link
Member Author

mikebabb commented Oct 11, 2017

@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.

@korelstar
Copy link
Member

korelstar commented Oct 11, 2017 via email

@mikebabb
Copy link
Member Author

@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.

@korelstar
Copy link
Member

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

@stefan-niedermann
Copy link
Member

@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.

@mikebabb
Copy link
Member Author

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}

@korelstar
Copy link
Member

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.

@korelstar
Copy link
Member

Please see nextcloud/notes#148 for a fix.

@mikebabb
Copy link
Member Author

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

@stefan-niedermann
Copy link
Member

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 :)

@korelstar
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Server-App depends on changes in the Nextcloud Notes server app
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants