Spreed: Starting gateway failed: Bridge nctalk.1 failed to join channel

Created on 4 Oct 2020  路  15Comments  路  Source: nextcloud/spreed

Hello,

I would test the new Talk App. Create an Telegram Bot and copied the ID to the Bridge. I got this error at Matterbridge.

time="2020-10-04T19:55:48+02:00" level=fatal msg="Starting gateway failed: Bridge nctalk.1 failed to join channel: json: cannot unmarshal array into Go struct field RoomInfo.ocs.data.lastMessage of type ocs.TalkRoomMessageData" prefix=main

I added the Bot ID and the ID from the Chat. But would not connect.

Ubuntu 20.04.1 lts
Php 7.4.3
Nextcloud 20.0.0
Mysql

0. Needs triage bug integration 馃摝

All 15 comments

Did you use the talk_matterbridge app or configure matterbridge yourself?

Talk_matterbridge

Mit der richtigen chatid dasselbe

time="2020-10-04T20:32:53+02:00" level=fatal msg="Starting gateway failed: Bridge nctalk.1 failed to join channel: json: cannot unmarshal array into Go struct field RoomInfo.ocs.data.lastMessage of type ocs.TalkRoomMessageData" prefix=main

cc @gary-kim @eneiluj

The same message when I try to add discord

Maybe RoomInfo.ocs.data.lastMessage contains something that NCTalk Matterbridge backend is not expecting. Any clue @gary-kim?

@Happyfeet01 is the Talk room empty (no messages) when you enable the bridge?

@eneiluj yes is empty

Could you post messages in it and try to enable the bridge again?

New created Screenshot_20201005_130749_org.mozilla.firefox.jpg

time="2020-10-05T13:06:40+02:00" level=info msg="Running version 1.18.3 8b26e42a" prefix=main time="2020-10-05T13:06:40+02:00" level=info msg="Parsing gateway myGateway" prefix=router time="2020-10-05T13:06:40+02:00" level=info msg="Starting bridge: telegram.0 " prefix=router time="2020-10-05T13:06:40+02:00" level=info msg=Connecting prefix=telegram time="2020-10-05T13:06:40+02:00" level=info msg="Connection succeeded" prefix=telegram time="2020-10-05T13:06:40+02:00" level=info msg="telegram.0: joining (ID: telegram.0)" prefix=telegram time="2020-10-05T13:06:40+02:00" level=info msg="Starting bridge: nctalk.1 " prefix=router time="2020-10-05T13:06:40+02:00" level=info msg=Connecting prefix=nctalk time="2020-10-05T13:06:40+02:00" level=info msg=Connected prefix=nctalk time="2020-10-05T13:06:40+02:00" level=info msg="nctalk.1: joining jcojm63y (ID: jcojm63ynctalk.1)" prefix=nctalk time="2020-10-05T13:06:41+02:00" level=fatal msg="Starting gateway failed: Bridge nctalk.1 failed to join channel: json: cannot unmarshal array into Go struct field RoomInfo.ocs.data.lastMessage of type ocs.TalkRoomMessageData" prefix=main

According to your screenshot you enabled the bridge before posting a message inside. Could you disable the bridge and reenable it so that there is an existing message when it tries connecting to Talk?

I tried it, but no luck

Then let's wait for @gary-kim 's expertise :smile:.

From the error message, it seems like the issue is that the rooms endpoint is expected to return a lastMessage response but the documentation does say that it is possible for it to be empty if no message was sent before in the room. That will need a fix upstream. Otherwise, it should work when restarted with at least one message sent already so I'm not sure why that's not working.

https://github.com/gary-kim/go-nc-talk/issues/27

https://github.com/gary-kim/go-nc-talk/blob/af034cd7167c9af90c52ad3ff7081bd7b1fe21ac/user/user.go#L114

Okay I will start the Bridge again and join the Bot to existing chat with messages. And post the log entry again.

I'm trying to recreate this but I don't seem to be able to find a situation in which lastMessage is not set. Just creating a conversation is a message in and of itself.

Will still fix it but it is a bit confusing.

Create a conversation and execute a command that is not visible to everyone.

Was this page helpful?
0 / 5 - 0 ratings