matterbridge
matterbridge copied to clipboard
WhatsApp bridge: Rate-Overlimit
I don't know if the problem is caused by Matterbridge or WhatsApp.
Apparently there is a WhatsApp gateway entry limit of 5. If more than 5 gateways are added, the WhatsApp bridge does not start due to the following error:
Starting gateway failed: bridge whatsapp.mywhatsapp failed to join channel: info query returned status 429: rate-overlimit
Steps to reproduce the behavior:
- Add more than 5 WhatsApp gateways
- Matterbridge ends abruptly.
A clear and concise description of what you expected to happen.
- Add more than 5 WhatsApp gateways
- Matterbridge starts gateways normally.
Last lines from the output when running: matterbridge -debug
:
[0020] WARN whatsapp: [Connect:C:/Users/xx/go/pkg/mod/github.com/42wim/[email protected]/bridge/whatsappmulti/whatsapp.go:139] Could not get profile photo of [email protected]: failed to get avatar: the user has hidden their profile picture from you
[0021] INFO whatsapp: [Connect:C:/Users/xx/go/pkg/mod/github.com/42wim/[email protected]/bridge/whatsappmulti/whatsapp.go:149] Finished getting avatars..
[0021] INFO whatsapp: [joinChannels:C:/Users/xx/go/pkg/mod/github.com/42wim/[email protected]/bridge/bridge.go:77] whatsapp.mywhatsapp: joining [email protected] (ID: [email protected])
[0022] INFO whatsapp: [joinChannels:C:/Users/xx/go/pkg/mod/github.com/42wim/[email protected]/bridge/bridge.go:77] whatsapp.mywhatsapp: joining [email protected] (ID: [email protected])
[0022] INFO whatsapp: [joinChannels:C:/Users/xx/go/pkg/mod/github.com/42wim/[email protected]/bridge/bridge.go:77] whatsapp.mywhatsapp: joining [email protected] (ID: [email protected])
[0022] INFO whatsapp: [joinChannels:C:/Users/xx/go/pkg/mod/github.com/42wim/[email protected]/bridge/bridge.go:77] whatsapp.mywhatsapp: joining [email protected] (ID: [email protected])
[0023] INFO whatsapp: [joinChannels:C:/Users/xx/go/pkg/mod/github.com/42wim/[email protected]/bridge/bridge.go:77] whatsapp.mywhatsapp: joining [email protected] (ID: [email protected])
[0023] INFO whatsapp: [joinChannels:C:/Users/xx/go/pkg/mod/github.com/42wim/[email protected]/bridge/bridge.go:77] whatsapp.mywhatsapp: joining [email protected] (ID: [email protected])
[0023] FATAL main: [main:C:/Users/xx/go/pkg/mod/github.com/42wim/[email protected]/matterbridge.go:66] Starting gateway failed: Bridge whatsapp.mywhatsapp failed to join channel: info query returned status 429: rate-overlimit
Environment (please complete the following information):
- Windows 11, Ubuntu 20.04
- Version: 1.25.2-dev
-
go install -tags whatsappmulti github.com/42wim/matterbridge@master
Additional context Please add your configuration file (be sure to exclude or anonymize private data (tokens/passwords))
[[gateway]]
name="gateway1"
enable=true
[[gateway.in]] # First gateway
account="whatsapp.mywhatsapp"
channel="[email protected]"
[[anothergateway.in]]
XXXXX
XXXXX
[[gateway]]
name="gateway2"
enable=true
[[anothergateway.in]]
XXXXX
XXXXX
[[gateway.out]] # Second gateway
account="whatsapp.mywhatsapp"
channel="[email protected]"
[[gateway.out]] # Thirdgateway
account="whatsapp.mywhatsapp"
channel="[email protected]"
... and so on
ADITIONAL NOTES: It was working fine until today when I deleted the 'device' (whatsmeow) from the list of LINKED DEVICES on WhatsApp. Added it again and the error started to appear.
Same here, using the last version of matterbridge, from telegram to whatsapp multi device.
Same issue here too. We are using the latest version of matterbridge to bridge messages between Whatsapp and Mattermost
Same issue here too after restart.
Try go install -tags whatsappmulti github.com/42wim/matterbridge@master
again, I've just updated the whatsmeow library.
Doesn't work, compiled a new container with: docker build https://github.com/42wim/matterbridge.git --file Dockerfile_whatsappmulti
Same Issue: time="2022-06-11T21:32:32Z" level=fatal msg="Starting gateway failed: Bridge whatsapp.mywhatsapp failed to join channel: info query returned status 429: rate-overlimit" prefix=main
@Waldelf this is using multiple whatsapp accounts right? not with just 1 whatsapp bridge?
@42wim Just one Whatsapp Account, but 8 groups bridged to Telegram (8 Gateways)
My configuration was: 1 phone number from India, from 1 group on telegram to 9 groups on whatsapp (multi device)
*I haven't tested this new commit yet.
@42wim When I reduce the number of Gateways to 4 matterbridge with whatsapp gateway starts nomaly
@Waldelf ok, well nothing much I can do right now, whatsapp seems to be ratelimiting
The solution I found was to send from 1 group on telegram to only 1 group on whatsapp using matterbridge, then I used whatsmeaw pure library to forward to the 9 groups I need, basically the code is that I wait for the message (on message event) and then use the forward method of whatsmeaw.
@42wim
I have the same error. When Matterbridge gets started, I always get the notification "Could not get profile photo of ...". Why are these requests necessary and would it help to disable these requests? Another idea would be to wait between requests to avoid the ratelimit. Matterbridge worked for me with 6 groups, but restarting it does not work. So it seems for me that only the start is the problem.
My solution was to run two matterbridges the same time. This is not an ideal solution, but it works without problem on the same device (you have two register matterbridge for each instance on whatsapp).
Would it be possible to implement a rate-limter during the bridge startup? So that for each whatsapp group you could define to wait for 5 seconds for example before the bridge requests the information.