notes icon indicating copy to clipboard operation
notes copied to clipboard

On web editor, notes loading forever and impossible to show/edit

Open CelianGdfrd opened this issue 1 year ago • 14 comments

Steps to reproduce

  1. Open a note

Expected behaviour

Note should open and be editable.

Actual behaviour

Note loading takes forever, impossible to access content.

Server

Please complete the following information.

  • Notes app version: 4.11.0
  • Nextcloud version: 30.0.1
  • OS: Ubuntu
  • Web server: Nginx
  • PHP version: 8.1
  • Database: Mariasql

Nextcloud configuration:

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "cloud.kalytis.gg"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "30.0.1.2",
        "overwrite.cli.url": "https:\/\/cloud.kalytis.gg",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "587",
        "maintenance": false,
        "loglevel": 2,
        "filelocking.enabled": true,
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6379,
            "timeout": 0,
            "password": "***REMOVED SENSITIVE VALUE***"
        },
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "default_phone_region": "FR",
        "app_install_overwrite": [
            "cms_pico",
            "files_rightclick"
        ]
    }
}

Client

Please complete the following information.

  • Browser (incl. version): Firefox
  • OS: Ubuntu

Log files

Add relevant parts of your nextcloud.log and/or your browser's JavaScript console here.

CelianGdfrd avatar Oct 29 '24 14:10 CelianGdfrd

We're going to need more information since this isn't readily reproducible.

Please open your browser inspector and monitor the Network tab as well as the Console while reproducing the problem.

When did this behavior start?

joshtrichards avatar Oct 30 '24 20:10 joshtrichards

I observe issues with window.OCA.text

Uncaught (in promise) TypeError: window.OCA.Text is undefined
    loadTextEditor NoteRich.vue:89
    fetchData NoteRich.vue:79
    mounted NoteRich.vue:56
    VueJS 18
    setSettings app.js:16
    _ vuex.esm.js:844
    commit vuex.esm.js:466
    commit vuex.esm.js:465
    _withCommit vuex.esm.js:624
    commit vuex.esm.js:464
    commit vuex.esm.js:409
    g NotesService.js:84
    promise callback*g NotesService.js:83
    loadNotes App.vue:129
    created App.vue:119
    VueJS 17
    <anonymous> main.js:12
    <anonymous> main.js:16
    <anonymous> main.js:16
[NoteRich.vue:89](webpack:///notes/src/components/NoteRich.vue)
    fetchData NoteRich.vue:79
    AsyncFunctionThrow self-hosted:811
    (Async: async)
    mounted NoteRich.vue:56
    VueJS 18
    setSettings app.js:16
    _ vuex.esm.js:844
    commit vuex.esm.js:466
    forEach self-hosted:160
    commit vuex.esm.js:465
    _withCommit vuex.esm.js:624
    commit vuex.esm.js:464
    commit vuex.esm.js:409
    g NotesService.js:84
    (Async: promise callback)
    g NotesService.js:83
    loadNotes App.vue:129
    created App.vue:119
    VueJS 17
    <anonym> main.js:12
    <anonym> main.js:16
    <anonym> main.js:16

ghagl avatar Oct 30 '24 20:10 ghagl

I observe the same error in my logs.

CelianGdfrd avatar Oct 31 '24 11:10 CelianGdfrd

When did this problem start?

Any errors on the Network tab when reloading the page and reproducing the problem?

Also please check Admin settings->Overview for any errors or warnings.

joshtrichards avatar Oct 31 '24 13:10 joshtrichards

I first witnessed it just before posting this -- but then again, I don't use the web viewer that much.

Nothing in the Network tab or in logs.

CelianGdfrd avatar Oct 31 '24 13:10 CelianGdfrd

When did this problem start?

Any errors on the Network tab when reloading the page and reproducing the problem?

Also please check Admin settings->Overview for any errors or warnings.

For me these errors started appearing when I did the upgrade to the very latest Nextcloud stable release

No other errors present in the instance, neither in the network tab nor system logs.

ghagl avatar Nov 01 '24 12:11 ghagl

@joshtrichards Any specific logs you would like to see, not covered by the network tab or Admin settings->Overview?

ghagl avatar Nov 06 '24 21:11 ghagl

Uncaught (in promise) TypeError: window.OCA.Text is undefined

Are you able to create/edit markdown files using the Text app outside of Notes? e.g. via Files in the Web UI?

Please take a close look at the Network tab in your browser then do a full refresh/reload of the problematic page.

joshtrichards avatar Nov 06 '24 22:11 joshtrichards

I got the same issue after the upgrade : "Uncaught (in promise) TypeError: window.OCA.Text is undefined" Finally I found a trick to fix it : go to "Notes settings" then click on "display mode" and select "open in edition mode" On my side, the display mode was empty, maybe that can explain why I wasn't able to display the notes in the browser.

jlighty8 avatar Nov 10 '24 19:11 jlighty8

Selecting an option in "Notes settings" does indeed work, I haven't yet checked whether editing outside of Notes works though

ghagl avatar Nov 10 '24 22:11 ghagl

Finally I found a trick to fix it : go to "Notes settings" then click on "display mode" and select "open in edition mode" On my side, the display mode was empty, maybe that can explain why I wasn't able to display the notes in the browser.

If you then set it to "Open in rich text mode" does it continue to function?

Do you perhaps not have the text app installed?

joshtrichards avatar Nov 10 '24 22:11 joshtrichards

If you then set it to "Open in rich text mode" does it continue to function?

Do you perhaps not have the text app installed?

Yes, it works. I guess after the Note upgrade the setting was empty.

jlighty8 avatar Nov 11 '24 10:11 jlighty8

Dear @CelianGdfrd,

Thanks for your report! Please check "Text" app too, and if app will be enabled and this will solve your problem, please close the issue. Otherwise will will have a look deeper.

JuliaKirschenheuter avatar Nov 21 '24 10:11 JuliaKirschenheuter

Do you perhaps not have the text app installed?

If the notes app is not enabled, then we should not have rich text mode open by default and switch to edit or preview mode instead. We have a check for Text existing at https://github.com/nextcloud/notes/blob/0bb7b5d1d9a489b347c90b48d49b2ecce2dac581/src/components/Note.vue#L33, but maybe it's not be robust enough

enjeck avatar Apr 27 '25 09:04 enjeck