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

Starting gateway failed: Bridge discord.account failed to start: HTTP 401 Unauthorized #2112

Open
Arhoc opened this issue Jan 4, 2024 · 3 comments
Labels

Comments

@Arhoc
Copy link

Arhoc commented Jan 4, 2024

Describe the bug
Matterbridge cannot start

To Reproduce
Link discord to irc
Editing the matterbridge.toml with CORRECT TOKEN and running the executable

Expected behavior
Matterbridge running normally

Screenshots/debug logs
Without debug it shows:
[0001] FATAL main: Starting gateway failed: Bridge discord.account failed to start: HTTP 401 Unauthorized, {"message": "401: Unauthorized", "code": 0}

With --debug:
[0012] INFO discord: [Connect:bridge/discord/discord.go:70] Connecting
[0012] INFO discord: [Connect:bridge/discord/discord.go:83] Connection succeeded
[0012] DEBUG irc: [handleJoinPart:bridge/irc/handlers.go:117] handle girc.Event{Source:(girc.Source)(0xc000878120), Tags:girc.Tags{"time":"2024-01-04T02:49:40.138Z"}, Timestamp:time.Date(2024, time.January, 3, 20, 49, 40, 138000000, time.Local), Command:"JOIN", Params:[]string{"#gentoo", "", "Aidonee-Test"}, Sensitive:false, Echo:false}
[0012] DEBUG irc: [handleTopicWhoTime:bridge/irc/handlers.go:264] 333: Topic set by tdr [~tdr@user/tdr] [2023-12-13 20:10:08 -0600 CST]
[0013] FATAL main: [main:matterbridge.go:66] Starting gateway failed: Bridge discord.account failed to start: HTTP 401 Unauthorized, {"message": "401: Unauthorized", "code": 0}

Environment (please complete the following information):

  • OS: ArchLinux
  • Matterbridge version: version: 1.26.0 6dafebc

Additional context
[arhoc@ArchLinux matterbridge ]$ cat matterbridge.toml
[irc]
[irc.libera]
Server="irc.libera.chat:6667"
Nick="Aidonee-Test"

[discord]
[discord.account]
Token="mytoken"
Server="All Things Linux"

[general]
RemoteNickFormat="[{PROTOCOL}/{BRIDGE}] <{NICK}>"

[[gateway]]
name="Gateway"
enable=true

    [[gateway.inout]]
    account="discord.account"
    channel="general"

    [[gateway.inout]]
    account="irc.libera"
    channel="#gentoo"
@Arhoc Arhoc added the bug label Jan 4, 2024
@lcoogan
Copy link

lcoogan commented Jan 31, 2024

I'm having a similar issue, except I know what's causing mine. I'm trying to use a selfbot to create a one-way discord -> IRC bridge. What I'd like to know is are you using a selfbot and is this your discord server? The reason I'm getting a 403 is because my selfbot doesn't have the permission to read server members intent updates, at least that's the only error it's giving now. If I was able to get around that, there might be another permission that needs to be taken care of.

@BenWiederhake
Copy link
Contributor

Yup, it's usually the missing "Members intent" checkbox. See https://github.com/42wim/matterbridge/wiki/Discord-bot-setup#privileged-gateway-intents

@alsotoes
Copy link

Did you try creating a gentoo channel in your discord server? and not bridging in general?

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