Matterbridge: Discord bridge failure on restart: Error obtaining server members: HTTP 403 Forbidden, "Missing Access"

Created on 19 Oct 2020  ·  4Comments  ·  Source: 42wim/matterbridge

Describe the bug

After I restarted matterbridge, it stopped working with this issue:

[0007] ERROR discord:      [Connect:bridge/discord/discord.go:162] Error obtaining server members: HTTP 403 Forbidden, {"message": "Missing Access", "code": 50001}
[0007] FATAL main:         [main:matterbridge.go:68] Starting gateway failed: Bridge discord.unvanquished failed to start: HTTP 403 Forbidden, {"message": "Missing Access", "code": 50001}

The bridge is bridging some IRC channels to a discord “server”.

Note that before I restarted the bridge, I added one channel to the bridge. But when I restore the original configuration file, matterbridge breaks as well, so the fault does not come from the addition.

Also, before I restarted the bridge, I added a category and a channel in this category (which are public). I have not removed them since.

I regenerated a token, removed and re-authorized the “discord application”, even added a webhook, nothing fixes the issue on my end. At first we were using an older version, but after an update it breaks as well.

At this time we have 6 channels, one voice and five text ones. Among text channels, one is not public, another one is in a category.

Discord room

Until now we bridged two of them to IRC, I wanted to bridge one more I just created, and restarted the systemd unit I wrote for matterbridge, and it does nor work anymore, even if I restore the original configuration file.

Screenshots/debug logs

matterbridge -debug -conf matterbridge.toml

```
[0000] INFO main: [setupLogger:matterbridge.go:106] Enabling debug logging.
[0000] INFO main: [main:matterbridge.go:46] Running version 1.18.3 8b26e42a
[0000] INFO router: [Start:gateway/router.go:66] Parsing gateway discord-irc-bridge
[0000] INFO router: [Start:gateway/router.go:66] Parsing gateway discord-irc-bridge-dev
[0000] INFO router: [Start:gateway/router.go:75] Starting bridge: discord.unvanquished
[0000] INFO discord: [Connect:bridge/discord/discord.go:58] Connecting
[0000] INFO discord: [Connect:bridge/discord/discord.go:60] Connecting using token
[0000] INFO discord: [Connect:bridge/discord/discord.go:76] Connection succeeded
[0000] DEBUG discord: [Connect:bridge/discord/discord.go:129] found channel &discordgo.Channel{ID:"193638031478095872", GuildID:"193638031478095872", Name:"general", Topic:"website - https://unvanquished.net", Type:0, LastMessageID:"767030964668465192", LastPinTimestamp:"", NSFW:false, Icon:"", Position:0, Bitrate:0, Recipients:[]discordgo.User(nil), Messages:[]discordgo.Message(nil), PermissionOverwrites:[]discordgo.PermissionOverwrite{}, UserLimit:0, ParentID:"", RateLimitPerUser:0, OwnerID:"", ApplicationID:""}
[0000] DEBUG discord: [Connect:bridge/discord/discord.go:129] found channel &discordgo.Channel{ID:"193638031478095873", GuildID:"193638031478095872", Name:"General", Topic:"", Type:2, LastMessageID:"", LastPinTimestamp:"", NSFW:false, Icon:"", Position:0, Bitrate:64000, Recipients:[]
discordgo.User(nil), Messages:[]discordgo.Message(nil), PermissionOverwrites:[]discordgo.PermissionOverwrite{}, UserLimit:0, ParentID:"", RateLimitPerUser:0, OwnerID:"", ApplicationID:""}
[0000] DEBUG discord: [Connect:bridge/discord/discord.go:129] found channel &discordgo.Channel{ID:"193638217914908672", GuildID:"193638031478095872", Name:"gameplay", Topic:"", Type:0, LastMessageID:"763089984478511164", LastPinTimestamp:"", NSFW:false, Icon:"", Position:1, Bitrate:0, Recipients:[]discordgo.User(nil), Messages:[]discordgo.Message(nil), PermissionOverwrites:[]discordgo.PermissionOverwrite{}, UserLimit:0, ParentID:"", RateLimitPerUser:0, OwnerID:"", ApplicationID:""}
[0000] DEBUG discord: [Connect:bridge/discord/discord.go:129] found channel &discordgo.Channel{ID:"353835068139241483", GuildID:"193638031478095872", Name:"dev", Topic:"Github Repository: https://github.com/Unvanquished/Unvanquished", Type:0, LastMessageID:"767081482598350869", LastPinTimestamp:"2019-01-04T01:34:35.301000+00:00", NSFW:false, Icon:"", Position:2, Bitrate:0, Recipients:[]
discordgo.User(nil), Messages:[]discordgo.Message(nil), PermissionOverwrites:[]discordgo.PermissionOverwrite{}, UserLimit:0, ParentID:"", RateLimitPerUser:0, OwnerID:"", ApplicationID:""}
[0000] DEBUG discord: [Connect:bridge/discord/discord.go:129] found channel &discordgo.Channel{ID:"366229425508974592", GuildID:"193638031478095872", Name:"administrative", Topic:"", Type:0, LastMessageID:"767483899592704070", LastPinTimestamp:"", NSFW:false, Icon:"", Position:3, Bitrate:0, Recipients:[]discordgo.User(nil), Messages:[]discordgo.Message(nil), PermissionOverwrites:[]discordgo.PermissionOverwrite{(discordgo.PermissionOverwrite)(0xc0009e0f00), (discordgo.PermissionOverwrite)(0xc0009e0f30), (discordgo.PermissionOverwrite)(0xc0009e0f60)}, UserLimit:0, ParentID:"", RateLimitPerUser:0, OwnerID:"", ApplicationID:""}
[0000] DEBUG discord: [Connect:bridge/discord/discord.go:129] found channel &discordgo.Channel{ID:"767038746809466902", GuildID:"193638031478095872", Name:"Language Specific", Topic:"", Type:4, LastMessageID:"", LastPinTimestamp:"", NSFW:false, Icon:"", Position:1, Bitrate:0, Recipients:[]discordgo.User(nil), Messages:[]discordgo.Message(nil), PermissionOverwrites:[]discordgo.PermissionOverwrite{}, UserLimit:0, ParentID:"", RateLimitPerUser:0, OwnerID:"", ApplicationID:""}
[0000] DEBUG discord: [Connect:bridge/discord/discord.go:129] found channel &discordgo.Channel{ID:"767039302814793758", GuildID:"193638031478095872", Name:"french", Topic:"https://unvanquished.net", Type:0, LastMessageID:"767359605013479444", LastPinTimestamp:"", NSFW:false, Icon:"", Position:4, Bitrate:0, Recipients:[]
discordgo.User(nil), Messages:[]discordgo.Message(nil), PermissionOverwrites:[]discordgo.PermissionOverwrite{}, UserLimit:0, ParentID:"767038746809466902", RateLimitPerUser:0, OwnerID:"", ApplicationID:""}
[0000] ERROR discord: [Connect:bridge/discord/discord.go:162] Error obtaining server members: HTTP 403 Forbidden, {"message": "Missing Access", "code": 50001}
[0000] FATAL main: [main:matterbridge.go:68] Starting gateway failed: Bridge discord.unvanquished failed to start: HTTP 403 Forbidden, {"message": "Missing Access", "code": 50001}

**Environment (please complete the following information):**

Distributor ID: Debian
Description: Debian GNU/Linux 9.13 (stretch)
Release: 9.13
Codename: stretch


[0000] INFO main: [main:matterbridge.go:46] Running version 1.18.3 8b26e42a

**Additional context**

Configuration file that worked before and does not work anymore:

[irc]
[irc.freenode]
Server="irc.freenode.net:6697"
Nick="DiscordFlips"
NickServNick="DiscordFlips"
NickServPassword="**"
UseTLS=true
UseSASL=true
EditDisable=false
EditSuffix=" (edited)"
RemoteNickFormat="<{NICK}> "
ColorNicks=true

[discord]
[discord.unvanquished]
Token="**"
Server="ID:193638031478095872"
StripNick=true
RemoteNickFormat="<{NICK}> "

[general]

[[gateway]]
name="discord-irc-bridge"
enable=true

[[gateway.inout]]
account="discord.unvanquished"
channel="ID:193638031478095872" # general

[[gateway.inout]]
account="irc.freenode"
channel="#unvanquished"

[[gateway]]
name="discord-irc-bridge-dev"
enable=true

[[gateway.inout]]
account="discord.unvanquished"
channel="ID:353835068139241483" # dev

[[gateway.inout]]
account="irc.freenode"
channel="#unvanquished-dev"

````

bug

Most helpful comment

Added to the FAQ now too https://github.com/42wim/matterbridge/wiki/FAQ#error-obtaining-server-members-http-403-forbidden

All 4 comments

I solved this issue this morning by enabling two settings in the discordapp settings page (not the page where you chat but the other page where you create the bot, the one with the long list of settings at the bottom of the page that generates a permissions number).

The two settings are in the middle of that page. One of them allows reading the server members (Note the error says Error obtaining server members).

Maybe these settings are new? My bot was working fine until last week...

We had it on 8th, it's the server members intent and I think it was added to the wiki.

https://t.me/Matterbridge/8440 has a screenshot I cannot copy on mobile.

I confirm that when I enabled that option that was previously disabled, it works. So it looks like Discord added an opt-out option that is kept enabled for already running application to not break them (until it stops and someone can toggle it).

discord new application member option

Added to the FAQ now too https://github.com/42wim/matterbridge/wiki/FAQ#error-obtaining-server-members-http-403-forbidden

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Wouter0100 picture Wouter0100  ·  4Comments

strugee picture strugee  ·  6Comments

jurgenhaas picture jurgenhaas  ·  5Comments

Gummikavalier picture Gummikavalier  ·  4Comments

patcon picture patcon  ·  8Comments