Closed fabio841 closed 2 weeks ago
solve incredible need update go!!!!!! First check version. send command go version if is old need update.
command is sudo snap install go --classic
if not work or have other bersion need remove before use: sudo apt-get purge golang-go sudo apt-get autoremove $ rm -rf /usr/lib/go $ rm -rf /usr/lib/go-1.13 $ rm -rf /usr/share/go $ rm -rf /usr/share/go-1.13 git clone https://github.com/udhos/update-golang cd update-golang sudo ./update-golang.sh
restart ubuntu now verify if version is update by command "go version"
later send command: sudo CGO_ENABLED=0 go install -tags nomsteams,whatsappmulti,nozulip github.com/42wim/matterbridge@master
if continue have problem with go module (go: command not found) need add this line in 2 file: profile and bash.bashrc:
write in terminal:
sudo nano /etc/profile
and add in bottom line
export PATH=$PATH:/usr/local/go/bin
CTRL+X save
later
sudo nano /etc/bash.bashrc
and add in bottom line
export PATH=$PATH:/usr/local/go/bin
CTRL+X save
now reboot: sudo reboot
send command:
sudo CGO_ENABLED=0 go install -tags whatsappmulti github.com/42wim/matterbridge@master
enter in folder home/go/bin
start command: ./matterbridge -debug -conf matterbridge.toml
QR CODE IS OK!!!!!
i updated everything but still getting error.
10:50:11.337 [Client/Socket ERROR] Error reading from websocket: websocket: close 1006 (abnormal closure): unexpected EOF
[0002] INFO whatsapp: [Connect:/home/nivadaily/go/pkg/mod/github.com/42wim/matterbridge@v1.26.1-0.20240524210809-d16645c9527a/bridge/whatsappmulti/whatsapp.go:106] QR channel result: timeout
10:50:11.338 [Client ERROR] Client outdated (405) connect failure (client version: 2.2412.50)
[0003] INFO whatsapp: [Connect:/home/nivadaily/go/pkg/mod/github.com/42wim/matterbridge@v1.26.1-0.20240524210809-d16645c9527a/bridge/whatsappmulti/whatsapp.go:123] WhatsApp connection successful
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x1477e66]
goroutine 1 [running]:
github.com/42wim/matterbridge/bridge/whatsappmulti.(*Bwhatsapp).Connect(0xc0000b0cc0)
/home/nivadaily/go/pkg/mod/github.com/42wim/matterbridge@v1.26.1-0.20240524210809-d16645c9527a/bridge/whatsappmulti/whatsapp.go:125 +0x5e6
github.com/42wim/matterbridge/gateway.(*Router).Start(0xc00040ccd0)
/home/nivadaily/go/pkg/mod/github.com/42wim/matterbridge@v1.26.1-0.20240524210809-d16645c9527a/gateway/router.go:76 +0x345
main.main()
/home/nivadaily/go/pkg/mod/github.com/42wim/matterbridge@v1.26.1-0.20240524210809-d16645c9527a/matterbridge.go:65 +0x394
Have restart linux ? send sudo reboot command Try use this format into matterbridge.toml (change XXXXXXXXX with your data)
[telegram.mytelegram] Token="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
RemoteNickFormat="<{NICK}> " MessageFormat="HTMLNick >"
[whatsapp.mywhatsapp] Number="+XXXXXXXX" #insert mobile number in IDC format SessionFile="session-XXXXXXX.gob" ###insert mobile number in IDC format QrOnWhiteTerminal=false
[[gateway]] name="gateway1" enable=true
[[gateway.inout]] account="whatsapp.mywhatsapp" channel="XXXXXXXXXXXXX@g.us"
[[gateway.inout]] account="telegram.mytelegram" channel="-XXXXXXXXXXXX" #TG Group Chat ID. You will need to create a new Group Chat, assign the TG BOT created above to it and make it an admin of that group too.
same problem here. go update not solved the problem
[Client/Socket ERROR] Error reading from websocket: websocket: close 1006 (abnormal closure): unexpected EOF
first restart, send:
$sudo reboot later check version. send command: $ go version If no have 1.23 there is a problem
If no have 1.23 there is a problem
I did exactly as you told, used version 1.23.0, to no success.
I guess this is a dirty fix, the actual solution would be to bump the whatsmeow version. If you need a working binary asap, just clone my fork, and run go install -tags whatsappmulti,nomsteams,nozulip
Thanks for your effort! But a problem with the path occurs:
go install -tags nomsteams,nozulip,whatsappmulti github.com/IntGrah/matterbridge@master go: downloading github.com/IntGrah/matterbridge v0.0.0-20240823131055-5a0dade4652c go: github.com/IntGrah/matterbridge@master: version constraints conflict: github.com/IntGrah/matterbridge@v0.0.0-20240823131055-5a0dade4652c: parsing go.mod: module declares its path as: github.com/42wim/matterbridge but was required as: github.com/IntGrah/matterbridge
Maybe you could change that as well?
Thanks for your effort! But a problem with the path occurs:
go install -tags nomsteams,nozulip,whatsappmulti github.com/IntGrah/matterbridge@master go: downloading github.com/IntGrah/matterbridge v0.0.0-20240823131055-5a0dade4652c go: github.com/IntGrah/matterbridge@master: version constraints conflict: github.com/IntGrah/matterbridge@v0.0.0-20240823131055-5a0dade4652c: parsing go.mod: module declares its path as: github.com/42wim/matterbridge but was required as: github.com/IntGrah/matterbridge
Maybe you could change that as well?
go install -tags <tags> <remote repo>
doesn't seem to work with forks. You have to clone the repo first, and then run go install -tags <tags>
without any additional args. Hope this helps.
@IntGrah Getting import lookup disabled error while installing post cloning the repo
@IntGrah Getting import lookup disabled error while installing post cloning the repo
My bad, I was messing around with changing the module name. It should work now.
My bad, I was messing around with changing the module name. It should work now.
And it does!! Many thanks for your efforts. :+1:
@IntGrah Getting import lookup disabled error while installing post cloning the repo
My bad, I was messing around with changing the module name. It should work now.
Its working now, thank you :)
@fabio841 Happy to see you are suggesting to view a video made by me :smile: ibcomputing is my channel and i made that tutorial
thanks @mujeebcpy Guys, if you have any concerns, the possibility of forwarding messages between a WhatsApp channel instead of a group should be implemented. In this regard, if it can be useful, I found this interesting discussion which allows you to extract the channel JID: https://github.com/WhiskeySockets/Baileys/issues/549
essentially the channel has an ID that can be easily searched via developer console and WhatsApp web and ends with @newslatter.
Do you think this feature could be added? This would make it possible to use a channel instead of a group. I tried replacing the "TG Group Chat ID" of the group that ends in @g.us with ID @newslatter in the matterbridge.toml file but it doesn't work.
@fabio841 ya. sending to channel is must now. i manage telegram channel so if i can use matterbridge to update my whatsapp channel in realtime it will be excellent.
only @42wim can help
I have the exact same problem using Windows with go 1.23 Is there any solution by now?
I have the exact same problem using Windows with go 1.23 Is there any solution by now?
My fork has a temporary fix. Clone it and then run go install -tags whatsappmulti
in the directory
Thank you. It works now...
@IntGrah you think it's possible adding feature for bridge channel ? (no group) I tried replacing the "TG Group Chat ID" of the group that ends in @g.us with ID @newslatter in the matterbridge.toml file but it doesn't work.
it's possible usa https://github.com/pedroslopez/whatsapp-web.js for adding bridge with channel instead whatsmeow ?
Fixed in master now
0000] INFO main: Running version 1.26.0 [0000] INFO router: Parsing gateway gateway1 [0000] INFO router: Starting bridge: whatsapp.mywhatsapp 13:36:59.744 [Client ERROR] Client outdated (405) connect failure [0003] INFO whatsapp: QR channel result: err-client-outdated [0005] INFO whatsapp: WhatsApp connection successful panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x12f5042]
goroutine 1 [running]: github.com/42wim/matterbridge/bridge/whatsappmulti.(Bwhatsapp).Connect(0xc000358fc0) /root/go/pkg/mod/github.com/42wim/matterbridge@v1.26.0/bridge/whatsappmulti/whatsapp.go:119 +0x622 github.com/42wim/matterbridge/gateway.(Router).Start(0xc000108780) /root/go/pkg/mod/github.com/42wim/matterbridge@v1.26.0/gateway/router.go:76 +0x35f main.main() /root/go/pkg/mod/github.com/42wim/matterbridge@v1.26.0/matterbridge.go:65 +0x39e
Why have this error ? I have launch command ./matterbridge -conf matterbridge.toml