pushbits / server

A simple server for push notifications via Matrix (and a minimalistic alternative to Pushover and Gotify) 🚀📯
https://www.pushbits.io
ISC License
305 stars 18 forks source link

`/_matrix/client/v3/createRoom: M_UNKNOWN (HTTP 400): Invalid user_id` #70

Closed mrusme closed 5 months ago

mrusme commented 7 months ago

In the configuration I used the format that was documented for the admin matrixid, which is: @xyz:matrix.org. When I try to create a new app, I get this on the server side:

INFO Registering application pushover, notifications will be relayed to user xyz:matrix.org.
INFO failed to POST /_matrix/client/v3/createRoom: M_UNKNOWN (HTTP 400): Invalid user_id: xyz:matrix.org

Does pushbits require the account to be discoverable? Just fyi, I've already logged in as the account specified in matrix.username and created a room with the account specified in admin.matrixid. Could this cause an issue?

Thank you!

eikendev commented 7 months ago

Hi @mrusme, thanks for opening this issue.

In the configuration I used the format that was documented for the admin matrixid, which is: @xyz:matrix.org.

Can I ask you to provide me with the configuration you used? For redaction, feel free to set a placeholder. Specifically:

Does pushbits require the account to be discoverable?

What do you mean with that?

I've already logged in as the account specified in matrix.username and created a room with the account specified in admin.matrixid.

Pushbits will create the rooms itself. It should not be an issue to create your own rooms generally.

mrusme commented 7 months ago

Hey there @eikendev,

Here is the config:

debug: true

http:
    listenaddress: '127.0.0.1'
    port: 8030
    trustedproxies: ['127.0.0.1']
    certfile: ''
    keyfile: ''

database:
    dialect: 'sqlite3'
    connection: '/var/run/pushbits.db'

admin:
    name: 'admin'
    password: 'admin'
    matrixid: '@myuser:matrix.org'

matrix:
    homeserver: 'https://matrix.org'
    username: 'pushbitsuser'
    password: 'password123'

security:
    checkhibp: false

crypto:
    argon2:
        memory: 131072
        iterations: 4
        parallelism: 4
        saltlength: 16
        keylength: 32

formatting:
    coloredtitle: true

alertmanager:
    annotationtitle: title
    annotationmessage: message

repairbehavior:
    resetroomname: true
    resetroomtopic: true

What homeserver are you using?

Matrix.org

Are you prepending a @ to your Matrix ID?

To mine? Yes. But also tried without the @ in front -- same result. To the PushBits user? Nope.

What do you mean with that?

Matrix allows for accounts to be discoverable, either by phone number or mail. That's not the case for my user. I was wondering if that might be a reason.

Pushbits will create the rooms itself. It should not be an issue to create your own rooms generally.

Understood, thanks. I nevertheless removed the room again, but that didn't help either.

eikendev commented 7 months ago

I tried out your config using my own credentials. I realized the servers' Matrix user must be specified without @, likely because the underlying library expects so. However, I'm not able to reproduce this issue. I do not think that discoverability of a user account should play a role here, but feel free to try with a discoverable account and see if it works.

eikendev commented 5 months ago

If this issue persists, please feel free to reach out again.