trilium
trilium copied to clipboard
Possible frequent CKEditor crash
Trilium Version
0.58.8
What operating system are you using?
Windows
What is your setup?
Local + server sync
Operating System Version
Window 11
Description
When writing in notes (with Chinese input method MS Pinyin), CKEditor possibly crashes frequently and restart. My cursor goes to the beginning of the note, and the last few words I typed disappear. This happens as frequent as about every 10 to 20 characters I type.
This is more severe than just cursor jumps to the beginning. After finishing a note, I closed trilium, reopened it and found only about 1/3 exists, even though I manually made a server sync just before I closed the window.
Error logs
14:49:42.104 JS Error: Uncaught error: Message: Uncaught CKEditorError: insert-operation-position-invalid
Read more: https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html#error-insert-operation-position-invalid, URL: http://127.0.0.1:37840/#root/ZDaZkH5fhAwD/e2LQ11BxD1Lc/kdB2xv6apRbC/9WWp6ymRU8AG-dsQX, Line: 6, Column: 347725, Error object: {"name":"CKEditorError","context":{"baseVersion":1,"position":{"root":"main","path":[1,169],"stickiness":"toNone"},"nodes":[{"data":" "}],"shouldReceiveAttributes":true,"__className":"InsertOperation"}}, Stack: CKEditorError: insert-operation-position-invalid
Read more: https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html#error-insert-operation-position-invalid
at Kc._validate (
15:04:40.526 Nothing to push
15:04:40.636 Finished pull
15:04:40.636 Nothing to push
15:04:40.802 Content hash computation took 17ms
15:04:40.802 Content hash checks PASSED
15:04:40.802 Sending message to all clients: {"type":"sync-finished","lastSyncedPush":52406}
15:04:41.596 JS Error: Uncaught error: Message: Uncaught CKEditorError: insert-operation-position-invalid
Read more: https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html#error-insert-operation-position-invalid, URL: http://127.0.0.1:37840/#root/ZDaZkH5fhAwD/e2LQ11BxD1Lc/kdB2xv6apRbC/9WWp6ymRU8AG-dsQX, Line: 6, Column: 347725, Error object: {"name":"CKEditorError","context":{"baseVersion":21,"position":{"root":"main","path":[1,431],"stickiness":"toNone"},"nodes":[{"data":" "}],"shouldReceiveAttributes":true,"__className":"InsertOperation"}}, Stack: CKEditorError: insert-operation-position-invalid
Read more: https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html#error-insert-operation-position-invalid
at Kc._validate (
It might correlates to certain inputs. Just happened multiple times when I tried typing a word.
Error Logs
15:09:54.831 JS Error: Uncaught error: Message: Uncaught CKEditorError: insert-operation-position-invalid
Read more: https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html#error-insert-operation-position-invalid, URL: http://127.0.0.1:37840/#root/ZDaZkH5fhAwD/e2LQ11BxD1Lc/kdB2xv6apRbC/9WWp6ymRU8AG-dsQX, Line: 6, Column: 347725, Error object: {"name":"CKEditorError","context":{"baseVersion":25,"position":{"root":"main","path":[1,463],"stickiness":"toNone"},"nodes":[{"data":" "}],"shouldReceiveAttributes":true,"__className":"InsertOperation"}}, Stack: CKEditorError: insert-operation-position-invalid
Read more: https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html#error-insert-operation-position-invalid
at Kc._validate (
Tested on Arch Linux, trilium version 0.58.8 from AUR. No such behavior as on windows.
Hello, unfortunately, CKEditor seems to have trouble with Chinese input. Please try the 0.59.0-beta. The editor will still crash, but it should recover in a way which doesn't lead to loss of data.
I hope that the CKEditor team will manage to fix these issues in the future.
@zadam Thanks a lot for the reply. Curious whether it's because of the input method of windows 11 (was using windows 10) or the newer version CKEditor has some bug. Never had this problme when using 0.57.x on windows 10.
TBH might be either of their combination. Apparently, fully internationalized input on the web is still extremely complex and often OS dependent.
This bug is not showing anymore on 0.59.3.