Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
illwieckz opened this issue Oct 19, 2020 · 4 comments
Labels

Comments

@illwieckz
Copy link

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"
@hamoid
Copy link

hamoid commented Oct 19, 2020

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...

@Mikaela
Copy link

Mikaela commented Oct 19, 2020

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.

@illwieckz
Copy link
Author

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

@42wim
Copy link
Owner

42wim commented Oct 19, 2020

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

@42wim 42wim pinned this issue Oct 19, 2020
@42wim 42wim unpinned this issue Oct 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants