502, Websocket error?

Hello,

After some fixes (described in the previous post “502 when GET internal/services/general/v1/server”), I could manage to launch Twake. I was able to create 2 accounts and 1 company. But, then, I can’t exchange messages. It seems that it is linked to a websocket error.
Here is the console log:
SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
http://localhost:8000/static/js/main.61592a2b.chunk.js

And 502 bad gateway errors with these requests:
http://localhost:8000/socket/?EIO=3&transport=polling&t=Nlk3zyr
…/internal/services/notifications/v1/preferences?websockets=1&limit=undefined
…/internal/services/notifications/v1/badges?websockets=1&company_id=030fb314-16cc-11ec-84b6-0242ac120004&all_companies=1&limit=undefined

Any help would be greatly appreciated!

It is possible that node isn’t started (but stil that’s strange). Try to do a fresh install with this changes:
You can try this changes: https://github.com/linagora/Twake/pull/1681/files

  1. Add the “- PUBSUB_URLS=amqp://guest:guest@rabbitmq:5672” line

  2. Use the 2021.Q2.505 version

The PR in the link will soon be merged for future on-premises testers. Next version coming on 22 of October will be compatible again with on-premise installation and you’ll be able to put back the “latest” tag and see the most recent features.

Merci Romaric for the answer but still I am not able to run Twake correctly:
Screenshot from 2021-10-11 17.57.23

I have a js error:
SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data main.61592a2b.chunk.js:1:847704

And 502 websocket errors:
http://localhost:8000/socket/?EIO=3&transport=polling&t=Nnm1N2V
…://localhost:8000/internal/services/channels/v1/companies/030fb314-16cc-11ec-84b6-0242ac120004/workspaces/direct/channels?websockets=1&limit=100
…://localhost:8000/internal/services/notifications/v1/preferences?websockets=1&limit=undefined

docker-compose logs node gives me this output. Anyway, I don’t think that’s the problem.

node_1 | /usr/src/app/node_modules/pino/lib/levels.js:165
node_1 | throw Error(default level:${defaultLevel} must be included in custom levels)
node_1 | ^
node_1 |
node_1 | Error: default level:undefined must be included in custom levels
node_1 | at assertDefaultLevelFound (/usr/src/app/node_modules/pino/lib/levels.js:165:11)
node_1 | at Object.pino [as default] (/usr/src/app/node_modules/pino/pino.js:159:3)
node_1 | at Object. (/usr/src/app/dist/core/platform/framework/logger.js:10:32)
node_1 | at Module._compile (internal/modules/cjs/loader.js:999:30)
node_1 | at Object.Module._extensions…js (internal/modules/cjs/loader.js:1027:10)
node_1 | at Module.load (internal/modules/cjs/loader.js:863:32)
node_1 | at Function.Module._load (internal/modules/cjs/loader.js:708:14)
node_1 | at Module.require (internal/modules/cjs/loader.js:887:19)
node_1 | at require (internal/modules/cjs/helpers.js:74:18)
node_1 | at Object. (/usr/src/app/dist/core/platform/framework/api/component.js:7:18)
node_1 | npm ERR! code ELIFECYCLE
node_1 | npm ERR! errno 1
node_1 | npm ERR! @twake/twake-backend@1.0.0 serve: node --max-http-header-size=30000 dist/server.js
node_1 | npm ERR! Exit status 1
node_1 | npm ERR!
node_1 | npm ERR! Failed at the @twake/twake-backend@1.0.0 serve script.

I’ll give a try to the next version hoping that these problems will be solved…