Chat not working

Hi,

when trying to use chat nothing happens and in docservice/out.log we can see

[2023-09-07T13:17:59.109] [ERROR] [localhost] [27a52aa0f1537b198128ae8496870f63] [uid-16916562481852] nodeJS - error receiving response: type = message TypeError: Cannot read property 'chat' of undefined
    at onMessage (/snapshot/server/build/server/DocService/sources/DocsCoServer.js)
    at onMessage.next (<anonymous>)
    at /snapshot/server/build/server/DocService/sources/DocsCoServer.js
    at Generator.next (<anonymous>)
    at onFulfilled (/snapshot/server/build/server/DocService/node_modules/co/index.js:65:19)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)

when we send some message. Are we missing some configuration? ā€œEverythingā€ else is working fine.

Kind regards,
Rok

Hello @rjaklic
Have you integrated Document server with some storage, such as Nextcloud, Alfresco, etc. or your own self-written one? Or do you check chat feature in the integrated example?
Also please let us know:

  • your exact version of Document server and guide that you used for the installation;
  • OS version;
  • please reproduce the situation and record a video file;
  • when the situation is reproduced, please provide us with whole Document server logs folder.

ONLYOFFICE Version:
7.3.3.8 via. debian repository
OS: does not matter because every not working
Reproduce: year sure? hmm i upgraded? if you send Chat nothing happen.
If you you really have no idea how that can look like i can make a video showing nothing :slight_smile:

Log:

only things logged is this:
[2023-09-20T10:24:48.489] [ERROR] [localhost] [1695198114.4309.34325.BQZ40EdchWWkdWXCj3tg] [4] nodeJS - error receiving response: type = message TypeError: Cannot read property ā€˜chatā€™ of undefined
at onMessage (/snapshot/server/build/server/DocService/sources/DocsCoServer.js)
at onMessage.next ()
at /snapshot/server/build/server/DocService/sources/DocsCoServer.js
at Generator.next ()
at onFulfilled (/snapshot/server/build/server/DocService/node_modules/co/index.js:65:19)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
[2023-09-20T10:24:51.129] [ERROR] [localhost] [1695198114.4309.34325.BQZ40EdchWWkdWXCj3tg] [4] nodeJS - error receiving response: type = message TypeError: Cannot read property ā€˜chatā€™ of undefined
at onMessage (/snapshot/server/build/server/DocService/sources/DocsCoServer.js)
at onMessage.next ()
at /snapshot/server/build/server/DocService/sources/DocsCoServer.js
at Generator.next ()
at onFulfilled (/snapshot/server/build/server/DocService/node_modules/co/index.js:65:19)
at processTicksAndRejections (internal/process/task_queues.js:95:5)

any ideas?

also in Version 7.4.1.36

we found the problem:

onlyoffice changed API calls from chat

API defined chat per default on true, but if you dont explicitly call it with chat=ture it isnā€™t working

Hello @hahaxd
We are glad that you have managed the situation. For other users, the mentioned parameter has been changed in v.7.1: ONLYOFFICE Api Documentation - Config

@rjaklic We will keep this thread open awaiting for information from your side.

I have integrated Document server on self-written web application.
Document server: 7.4.1-36
OS: Alma Linux (Centos)

I also tried to set chat to false in permission section, but chat icon is still present.

"permissions": {
  "chat": false
}

Video.

2023-09-26 14-13-51.mkv (1.2 MB)

Hello @rjaklic

To which section of the initialization config did added this value? Please verify if it is used correctly, the example of configā€™s permission section you can find here:
https://api.onlyoffice.com/editors/config/document/permissions

My config is something like ā€¦

new DocsAPI.DocEditor("placeholder", {
    "type": windowType,
    "width": (windowType == "desktop" ? "100%" : undefined),
    "height": (windowType == "desktop" ? "100%" : undefined),
    "documentType": documentType,
    "document": {
        "fileType": fileType,
        "key": etag,
        "title": title,
        "url": presignedURL,
        "type": "embedded"
    },
    "events": {
        "onDocumentReady": oofficeToFullscreen,
    },
    "editorConfig": {
        "callbackUrl": callbackUrl,
    },
    "permissions": {
        "chat": false
    }
});

Please note that in the provided by me documentation permissions settings are the part of document array:

var docEditor = new DocsAPI.DocEditor("placeholder", {
    "document": {
        "permissions": {
            "chat": true,

Please move the section to the corresponding array and check the situation again. For the reference, here you can find the sample of complete config:
https://api.onlyoffice.com/editors/advanced

1 Like

Thank you. This solved the problem.

1 Like

Iā€™m glad to hear it.

Hello,

It seems like youā€™re encountering an issue with the chat feature, and youā€™ve identified an error message in the docservice/out.log file. The error message suggests that there might be an issue with reading the property ā€˜chatā€™ in your code.

To resolve this and ensure a clean chat experience, I recommend reviewing your code and checking if all necessary configurations are in place. Itā€™s possible that thereā€™s a missing or misconfigured element causing this error.

If you need further assistance or have specific questions about your configuration, please feel free to provide more details, and weā€™ll be happy to help.

Best regards,
Rok"