Nextcloud Office Spreadsheets, clicking on the Formula Bar then typing has erratic typing behavior, may be related to Autocompletion

Nextcloud version

25.0.5, All-in-one docker image
Nextcloud Office is version 7.1.2

Operating system and version

The server running Nextcloud: Ubuntu 22.04.1, Linux 5.19.0-35-generic x86_64
But since All-in-one runs in Docker, this might not be as relevant.

Nextcloud Office About Page

COOLWSD version:
22.05.12.2 git hash: 
c0a4f61
(E)
LOKit version:
built on 
a great technology base
Collabora Office 22.05.11.1 git hash: 
20d7735
Served by: Ubuntu 18.04.6 LTS 
8ae0f824

Copyright © 2023, Collabora Productivity Limited.

The issue you are facing

The erratic typing behavior manifests in many ways, depending on the nature of the client device and browser. I believe they all have the same underlying issue.

Buggy behavior 1:

I open my Nextcloud instance’s URL with Firefox on Ubuntu 20.04 as the client. On one of my spreadsheets, if I click on a cell, then click on the formula bar textbox on the top, then start typing, Nextcloud will produce a blue autocompletion highlight that tries to finish what I type. The autocompletion highlight looks like the highlighting on Android, there will be two blue markers below either side of the autocompleted text. See image.

When this autocompletion appears, I cannot backspace it. I can type new text to cancel the autocompletion, but if I backspace my new text, the autocompletion is triggered again and I cannot reject the autocompletion.

For example: I click on A1, I type “He” and the autocomplete finishes it with “He[llo]”. I press backspace but the “llo” does not go away. If I type “y” then the “llo” highlight disappears and the cell shows “Hey”. If I backspace once, I once again get an autocomplete “He[llo]” and cannot reject the “llo”.

If I type directly without clicking the formula bar, everything seems to work fine. The same is true if I double click a cell before typing. Only when clicking the formula bar is the autocomplete forced upon me.

Buggy Behavior 2:

I perform the same steps using Opera Mobile on an Android phone as the client. I still see the autocompletion highlight, it looks exactly the same as on the Firefox client and it looks different from my phone’s native autocomplete highlight. I am able to reject the autocompletion, but doing so makes the first character in the cell impossible to backspace until I move the cursor away from the cell and back.

For example: I tap on A1, I type “He” and the autocomplete finishes it with “He[llo]”. I can backspace the “llo” successfully. But now the “H” at the front is stuck inside the cell even after pressing backspace many times. The Formula Bar becomes empty, but the “H” is still inside the cell, and will persist until I move the cursor away, tap on the cell again, and backspace the “H”.

Again, the bug only happens when clicking on the Formula Bar. If I double tap the cell to get the keyboard to show up, I don’t see this issue after backspacing the autocomplete text.

Buggy behavior 3:

Again, using Firefox on Ubuntu as the client. If I change the input method to something other than English (I tried Chinese and Japanese), and click on the Formula Bar, then start typing non-English characters, the cell does not get updated. The formula bar shows the non-English characters, but once I move the cursor away and come back to the cell, the Formula Bar reflects the empty contents of the cell.

Again, it only happens when I click on the formula bar. Double clicking a cell or typing directly allows non-English characters to be written to the cell.

Comments

What is this autocompletion functionality anyway? I don’t see it documented anywhere in Nextcloud Office.

I don’t know what are the conditions to get an autocompletion. On a new spreadsheet, no matter how many times I copy the same string into other cells, I don’t see this autocompletion highlight (I still get buggy behavior #3 though).

Other information

Possibly related error in Nextcloud Log in Admin. But it was emitted before my attempts to reproduce the bugs, so I think it’s a red herring.

[richdocuments] Error: OCA\Richdocuments\Exceptions\UnknownTokenException: Could not find token. at <<closure>>

0. /var/www/html/custom_apps/richdocuments/lib/Middleware/WOPIMiddleware.php line 76
   OCA\Richdocuments\Db\WopiMapper->getWopiForToken("l2I6GZpMau8vtOwvqO1OvJFVzo7ilSCP")
1. /var/www/html/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php line 97
   OCA\Richdocuments\Middleware\WOPIMiddleware->beforeController(["OCA\\Richdocum ... "], "checkFileInfo")
2. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 125
   OC\AppFramework\Middleware\MiddlewareDispatcher->beforeController(["OCA\\Richdocum ... "], "checkFileInfo")
3. /var/www/html/lib/private/AppFramework/App.php line 172
   OC\AppFramework\Http\Dispatcher->dispatch(["OCA\\Richdocum ... "], "checkFileInfo")
4. /var/www/html/lib/private/Route/Router.php line 298
   OC\AppFramework\App::main("OCA\\Richdocume ... r", "checkFileInfo", ["OC\\AppFramewo ... "], ["33549_oczoq0gf ... "])
5. /var/www/html/lib/base.php line 1047
   OC\Route\Router->match("/apps/richdocum ... k")
6. /var/www/html/index.php line 36
   OC::handleRequest()

GET /index.php/apps/richdocuments/wopi/files/33549_oczoq0gfi1gk?access_token=l2I6GZpMau8vtOwvqO1OvJFVzo7ilSCP&access_token_ttl=1680894627000&permission=edit
from 172.18.0.2 at 2023-04-08T06:59:06+00:00

Possibly related error in nextcloud.log. But it was emitted before my attempts to reproduce the bugs, so I think it’s a red herring.

{"reqId":"wnCdwSYELOIplPCTpNSP","level":3,"time":"2023-04-08T06:59:06+00:00","remoteAddr":"172.18.0.2","user":"--","app":"richdocuments","method":"GET","url":"/index.php/apps/richdocuments/wopi/files/33549_oczoq0gfi1gk?access_token=l2I6GZpMau8vtOwvqO1OvJFVzo7ilSCP&access_token_ttl=1680894627000&permission=edit","message":"Failed to validate WOPI access","userAgent":"COOLWSD HTTP Agent 22.05.12.2","version":"25.0.5.1","exception":{"Exception":"OCA\\Richdocuments\\Exceptions\\UnknownTokenException","Message":"Could not find token.","Code":0,"Trace":[{"file":"/var/www/html/custom_apps/richdocuments/lib/Middleware/WOPIMiddleware.php","line":76,"function":"getWopiForToken","class":"OCA\\Richdocuments\\Db\\WopiMapper","type":"->","args":["l2I6GZpMau8vtOwvqO1OvJFVzo7ilSCP"]},{"file":"/var/www/html/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php","line":97,"function":"beforeController","class":"OCA\\Richdocuments\\Middleware\\WOPIMiddleware","type":"->","args":[["OCA\\Richdocuments\\Controller\\WopiController"],"checkFileInfo"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":125,"function":"beforeController","class":"OC\\AppFramework\\Middleware\\MiddlewareDispatcher","type":"->","args":[["OCA\\Richdocuments\\Controller\\WopiController"],"checkFileInfo"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Richdocuments\\Controller\\WopiController"],"checkFileInfo"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Richdocuments\\Controller\\WopiController","checkFileInfo",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["33549_oczoq0gfi1gk","richdocuments.wopi.checkFileInfo"]]},{"file":"/var/www/html/lib/base.php","line":1047,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/richdocuments/wopi/files/33549_oczoq0gfi1gk"]},{"file":"/var/www/html/index.php","line":36,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/custom_apps/richdocuments/lib/Db/WopiMapper.php","Line":157,"message":"Failed to validate WOPI access","exception":{},"CustomMessage":"Failed to validate WOPI access"}}

The list of my installed Nextcloud Apps (I don’t think anything in the list impacts Nextcloud Office):

Activity
Auditing / Logging
Calendar
Circles
Client Push tags
Comments
Contacts
Contacts Interaction
Dashboard
Deck
Deleted files
Excalidraw integration
File sharing
First run wizard
Group folders
Log Reader
Markdown Editor
Nextcloud All In One announcements
Nextcloud Office
Notifications
Password policy
PDF viewer
Photos
Plain text editor
Recommendations
Related Resources
Right click
Share by mail
Support
Tasks
Text
Two-Factor TOTP Provider
Usage survey
User status
Versions
Weather status 

Image of Autocomplete

temp