Mail: Various issues with latest versions of Firefox

Created on 19 Nov 2020  Â·  50Comments  Â·  Source: nextcloud/mail

Expected behavior

Writing mail, I should be able to delete text by using delete or backspace key. I also should be able to copy/paste text.

Actual behavior

When I answer a mail, I can delete 1 or 2 chars with backspace and then it stops working and I cannot anymore delete chars (even with delete key). The only solution is to select text with mouse and type another text to overwrite it (though the final result that the recipient will receive may not look the same as what you see).

Copying text to the clipboard doesn't work neither.

Issues are not reproducible in Chromium 84.

Mail app

Mail app version: 1.4.1

Mailserver or service: Personal server (Dovecot + Postfix)

Server configuration

Operating system: Official Docker fpm image

Web server: Nginx

Database: PostgreSQL

PHP version: Official docker image

Nextcloud Version: 19.0.4

Client configuration

Browser: Firefox 83

Operating system: Windows

3. to review bug help wanted high

Most helpful comment

In the end, I was able to do the test. Tried on a Firefox 78.5.0esr and works well too.

All 50 comments

I can find in the web console this type of error when the issue occurs:

Uncaught CKEditorError: a is undefined                                                                    mail.js:1:64080
    <anonymous> VueJS
    value range.js:348
    value deletecommand.js:107
    value model.js:805
    value model.js:231
    value deletecommand.js:76
    decorate observablemixin.js:255
    fire emittermixin.js:209
    e observablemixin.js:259
    value commandcollection.js:68
    value editor.js:288
    value delete.js:55
    fire emittermixin.js:209
    c deleteobserver.js:87
    u deleteobserver.js:50
    fire emittermixin.js:209
    value domeventobserver.js:96
    value keyobserver.js:28
    value domeventobserver.js:79
    fire emittermixin.js:209
    r emittermixin.js:235
    construct self-hosted:2653
    s mail.js:1
    r mail.js:1
    construct self-hosted:2653
    f mail.js:5
    d ckeditorerror.js:66
    value ckeditorerror.js:118
    value model.js:236
    value deletecommand.js:76
    decorate observablemixin.js:255
    fire emittermixin.js:209
    e observablemixin.js:259
    value commandcollection.js:68
    value editor.js:288
    value delete.js:55
    fire emittermixin.js:209
    c deleteobserver.js:87
    u deleteobserver.js:50
    fire emittermixin.js:209
    value domeventobserver.js:96
    value keyobserver.js:28
    value domeventobserver.js:79
    fire emittermixin.js:209
    r emittermixin.js:235
Uncaught CKEditorError: model-nodelist-offset-out-of-bounds: Given offset cannot be found in the node list. Read more: https://ckeditor.com/docs/ckeditor5/latest/framework/guides/…t/error-codes.html#error-model-nodelist-offset-out-of-bounds
 {"offset":10,"nodeList":[{"data":"Ho  can i"}]}                                            mail.js:1:63758
    r mail.js:1
    f mail.js:5
    d ckeditorerror.js:66
    value nodelist.js:161
    value element.js:188
    d position.js:1091
    get position.js:221
    v document.js:481
    value document.js:390
    n documentselection.js:646
    fire emittermixin.js:209
    value selection.js:479
    value selection.js:370
    value documentselection.js:734
    value documentselection.js:421
    value writer.js:1177
    convertSelectionChange upcasthelpers.js:413
    value model.js:173
    convertSelectionChange upcasthelpers.js:412
    fire emittermixin.js:209
    value selectionobserver.js:183
    value selectionobserver.js:104
    fire emittermixin.js:209
    r emittermixin.js:235
    construct self-hosted:2653
    r mail.js:1
    construct self-hosted:2653
    f mail.js:5
    d ckeditorerror.js:66
    value nodelist.js:161
    value element.js:188
    d position.js:1091
    get position.js:221
    v document.js:481
    value document.js:390
    n documentselection.js:646
    fire emittermixin.js:209
    value selection.js:479
    value selection.js:370
    value documentselection.js:734
    value documentselection.js:421
    value writer.js:1177
    convertSelectionChange upcasthelpers.js:413
    value model.js:173
    convertSelectionChange upcasthelpers.js:412
    fire emittermixin.js:209
    value selectionobserver.js:183
    value selectionobserver.js:104
    fire emittermixin.js:209
    r emittermixin.js:235

Hmmmm I've seen that Given offset cannot be found in the node list a while ago.

Do you have formatting enabled for that reply or is it off?

@ChristophWurst by default formatting is not activated on my side.
I just checked and I am able to reproduce the issue with and without formatting activated.

Can reproduce on Linux Mint 19.3, Firefox 83.0, same server and mail app as report (Nextcloud 19.04, Mail 1.4.1)

@ChristophWurst unusable interface, please assign a high priority to this bug! A coworker complained about this today, people can't work because of this. (I know, buy a Nextcloud subscription..... just telling you that probably thousands of other people have this problem right now, but they don't know that it can be reported here).

@doc75 Does updating to 19.0.5 help?

Let me know if you need info from me.

@alexanderdd @ChristophWurst , same issue on NC 19.0.5 and also on Linux (with Firefox 83).
Not reproducible on Chromium 86 on Linux

Just noticed: everthing works fine (also enter, delete keys) until you use the backspace key. Then the backspace, enter, delete key does not work anymore.

This is only in Firefox, Chromium works fine.

I have the same problem, as how @alexanderdd say, only fail with Firefox. Brave (based on Chromium) works well too.

I'm using Firefox v83.0 too, but Nextcloud 20.0.2 and MAil 1.7.0.

Any thing that you need ¿?

@ChristophWurst unusable interface, please assign a high priority to this bug! A coworker complained about this today, people can't work because of this. (I know, buy a Nextcloud subscription..... just telling you that probably thousands of other people have this problem right now, but they don't know that it can be reported here).

More than 200k installations of Mail and three users reported this.

I'm fine with the label. But with the assignment we don't fix it. We need someone who can reproduce this in a development environment.

So, who wants to dive into this?

The first thing to check would be bug reports of the CKEditor version in use in an affected version and if anything like that has been reported upstream.

Just chiming in to let you know that I have the same issue on NC 19.0.5, Mail 1.4.1. on Apache. I use Firefox 83 on Linux.
I don't have a development environment available but if I can be helpful in testing or providing more information, I'd be happy to help.

Can confirm also. NC 19.04 Firefox 83

You can use the :+1: on the original report. Thanks.

This also happens on latest master: Uncaught CKEditorError: Range.setStart: Argument 1 is not an object..

Did anyone check CKEditor for existing bug reports?

Thanks a lot. I'll check them :)

Hello @ChristophWurst

Can I help?

For me this problem occurs too, both when composing a new message or replying to an existing one. I type some characters and then back space wont do anything. I'm using Firefox 83.0. I tested with Chrome as well, the problem did not occur there.

edit: I'm running nextcloud 20.0.2 and Mail app version 1.7.0

What can I provide to help finding the issue?

What I find a bit strange is that this is showing up now for so many different versions of Mail at the same time. The 1.4.x for 19 was released in early July. And since then we updated CKEditor a at least two times as far as I remember. Therefore it's possible to be something that changed in the browser(s).

Does anyone have access to older Firefoxes (e.g. ESR) to check if the problem is reproducible there as well?

FWIW I can't reproduce the bug at https://ckeditor.com/ckeditor-5/demo/

What I find a bit strange is that this is showing up now for so many different versions of Mail at the same time. The 1.4.x for 19 was released in early July. And since then we updated CKEditor a at least two times as far as I remember. Therefore it's possible to be something that changed in the browser(s).

Does anyone have access to older Firefoxes (e.g. ESR) to check if the problem is reproducible there as well?

I have a laptop with Firefox ESR version., but until I finish working and arrive at home I won't have it. I willl test then.

FWIW I can't reproduce the bug at https://ckeditor.com/ckeditor-5/demo/

Does anyone have access to older Firefoxes (e.g. ESR) to check if the problem is reproducible there as well?

I just tried this on Firefox 68.12.0esr on Windows 10. The problem doesn't appear to exist there. I wrote a rather long email, used Enter and Backspace a lot on purpose. Didn't run into an issue.

Let me know if you need me to test anything specific.

In the end, I was able to do the test. Tried on a Firefox 78.5.0esr and works well too.

I am "happy" to join in. Same issue in reply AND new mails since I updated to Nextcloud 20.0.2, Mail Version 1.7.0
No backspace or delete. Usually happens a few seconds after I start writing the reply.
Using Firefox 83.0.

Keeping the console open during writing / answering a mail comes up with the same. CK Editor seems to cause the problem.
Error log says: Uncaught CKEditorError: a is undefined

Same problem for me on Mail 1.7 since a about a week. Ubuntu LTS and Firefox. Was on Nextcloud 19.0 a week ago, and now on 20.0. Problem is on both.
log on console
Uncaught CKEditorError: Index or size is negative or greater than the allowed amount
Read more: https://ckeditor.com/docs/ckeditor5/latest/framework/guides/support/error-codes.html#error-Index or size is negative or greater than the allowed amount
value domconverter.js:307
value view.js:393
value delete.js:59
fire emittermixin.js:209
l deleteobserver.js:87
c deleteobserver.js:50
fire emittermixin.js:209
value domeventobserver.js:96
value keyobserver.js:28
value domeventobserver.js:79
fire emittermixin.js:209
r emittermixin.js:247

Same here, on multiple NC 20 installations.

I planned to look into it this week. Can't promise anything at this moment but we'll figure it out.

Thanks. I just played further with it. Strange things happened:

  • Tried to create an all new address; just created auth creds in dovecot, never used on Thunderbird or any other MUA. Couldn't set up the account in NC mail though. Noticed errors in nextcloud.log complaining about "non-existend special folder 'Drafts'". So I set up the account in TB to make sure I made no mistake with creds. Worked fine. After creating (INBOX), Trash, Sent and Drafts, I could set up the account in NC Mail. So that's another NC Mail glitch. Shall I open a bug for that?
  • Then I tried to write a new message in NC Mail, to reproduce the editing issue. But I couldn't. It clicked "Create new message" but nothing happened, waiting didn't help. So I Ctrl-Shift-R(eloaded) the Mail page. Now I saw five(!) identical(!) accounts resulting from the multiple retries. I deleted the first four of them and only left that that contained all folders I set up in TB. After deletion, I clicked "Create new message" again … and it worked.
  • So I now finally could test the write something and delete it with backspace issue – but it is not present THERE. I'm baffled. It was there for another user in the SAME NC (he just showed me live in a video session), and I could reproduce it in another NC on the same server. Common is that these are accounts that were set up on NC 19 or older (or in Mail versions prior to 1.7 (or most probably even prior to 1.6). The NEW account does NOT show the symptom described above HERE. The good news (for this bug is that the original still exists no matter what we changed there, so I should be able to do tests and post results and logs. I could even provide access to that account in 1to1 sessions (production system but not a sensitive account).
  • After fiddling with insert and delete, I decided to sent that test message. Worked fine. But in Drafts, I see multiple versions of the message just sent … drafts, that should be overwritten during editing, and deleted after being sent. In the other NC, I saw many OLD messages in Sent but not the one I just sent from there. Only after quite a while, the old messages disappeared and were replaced by the messages that I see in Thunderbird in that "Sent" folder. It seems Mail takes a while to sync messages in the background? Or was it due to TB accessing (and pruning) that folder? The multiple drafts in the new account do NOT disappear though, not even when I prune that folder in TB and/or (Shift-)reload the Mail app.
  • I'm baffled: Is there no way to delete multiple messages from a folder? And no feature to empty Trash or Spam? When I create a folder, move messages into it, then delete the whole folder – neither folder nor messages are displayed in Trash. Accounts do get a color assigned. Any way to change that color? OK, that are definitely different RFEs…Sorry.

Setup here is: Arch server, Nginx+PHP-FPM+MariaDB, NC 20.0.2, Mail 1.7.0.

Thanks for the updated title, @StCyr. Hadn't realized all reports are about Firefox, so that's good and we can focus on a single browser.

Thanks for the updated title, @StCyr. Hadn't realized all reports are about Firefox, so that's good and we can focus on a single browser.

Apparently it's some inconsistency between the editor's model and its view.

I'm willing to work on this. However, I've hard time understanding how to show the editor model and view in the console.

Apparently it's some inconsistency between the editor's model and its view.

Mind linking to a resource if you found this info in some docs?

Btw switching from @ckeditor/ckeditor5-vue to @ckeditor/ckeditor5-vue2 didn't help.

Some findings

    // notify change
    ob.dep.notify();

Bildschirmfoto von 2020-12-01 15-54-45

… as far as I understand the __ob__ is Vue's reactive object. For some reason it's not available on this object and therefore we see an error. I think the out of bounds error is just another symptom and possible fixed as soon as this original error is resolved.

Did anyone see any consistent steps that reliably trigger the error? For me it seems rather random. One time it occurs soon, the next time I have to try rather long until this shows. :thinking:

For me, it triggers very reliably. I start typing an email, hit enter or backspace and usually it happens right away. Typically while writing the first line.

On 1 Dec 2020, at 18:42, Christoph Wurst notifications@github.com wrote:


Did anyone see any consistent steps that reliably trigger the error? For me it seems rather random. One time it occurs soon, the next time I have to try rather long until this shows. 🤔

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.

I can also provide access to a system/account where it is triggered all the time.

Thanks for the offer @nursoda. The problem with that is that I can't modify the sources. Hence I would preferably have this locally where I can add debug statements and try a few things to see if they make the situation any better.

For me, it seems to happen immediately after a copy of the message I am currently working on is sending a copy to draft.

I understand that adding debug is necessary, but at least I could increase log level and you could see what is logged when it happens? Or are you beyond this point ;)

If a take the copy in draft it works again for a few seconds. Then again impossible do correct the text . Possibly another copy in dradt added

I can backspace ONCE, it seems that this triggers something. After that, I cannot backspace or delete in that session. But I can overwrite text that I mark with Shift+Arrows.

Yes, same here: it’s very reliable: juste hit backspace 2 or 3 times

Le 1 déc. 2020 à 19:25, Olav Seyfarth notifications@github.com a écrit :


I can backspace ONCE, it seems that this triggers something. After that, I cannot backspace or delete in that session. But I can overwrite text that I mark with Shift+Arrows.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.

Fix is at https://github.com/nextcloud/mail/pull/4163 for anyone who has a test/dev environment set up :v:

Hmmm, it seems like an easy fix (delete one line of code) and I can edit files within my setup, but I was unable to locate that file. I have no real dev setup, but if you'd --verbose a bit, I'd like to try!

Hmmm, it seems like an easy fix (delete one line of code) and I can edit files within my setup, but I was unable to locate that file. I have no real dev setup, but if you'd --verbose a bit, I'd like to try!

Just update your app. I'm guessing the update will be available from the store as from tomorrow.

I will try to release updates soon. You can't edit that file on your production instance because our javascript code gets compiled and you don't have the source file.

Oups. Sorry. I thought releases were automaticaly published

I'm the automatism that publishes :P

@ChristophWurst gald you find how to fix.
Too bad that the version compatible with NC19 is not getting the fix as far as I saw (1.4 branch did not get the fix) ;-(

yeah, I haven't totally given up on that but somehow the CI pipeline for the stable1.4 branch broke. If I get it working again I can look into a release for that as well. But since we're moving rather quickly at the moment and add lots of features the backporting effort is high, hence I'm putting more focus on the new releases. Sorry for that, we'll do better once everything stabilized a bit again.

An update was available today. Was applied. Its now working fine for me. Thanks.

Updated the mail app to 1.7.1 and the bug appears to be gone now! I just did some small tests the previously resulted in the described problem (e.g. replying to a mail, writing something and backspacing a couple of times while doing so for good measure).

I'll report back should it stop working or in case I did not trigger the bug that way (even though this behaviour did before).

Thanks for the fix!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

b1f17773 picture b1f17773  Â·  5Comments

jancborchardt picture jancborchardt  Â·  4Comments

HLFH picture HLFH  Â·  3Comments

Valdnet picture Valdnet  Â·  3Comments

UtechtDustin picture UtechtDustin  Â·  3Comments