matrix-org / matrix-org/matrix-bifrost
Failed to add account: Protocol does not let you create new accounts
- Dominant language
- TypeScript
- Stars
- 187
- Forks
- 38
- PR merge metrics
- No merged PRs in 30d
Description
Using Docker + XMPP.js, spend few days and I assume it's setup correctly. I can invite bot into a room on Matrix network now.
Own a matrix homeserver and a XMPP server.
I tried to link one account so all message can be bridged, but seems like doesn't work:
```
accounts add xmpp-js xmpp_username@xmpp_server.tld
Failed to add account:Protocol does not let you create new accounts
```
Looked through entire issue and documentations, including the config file, I didn't see anywhere mention **how xmpp.js link account works?.**
Either:
- I was assume, like IRC, it need to be set in config file, but I didn't see anywhere have it.
OR
- Somewhere in this process gone wrong so it's not setup properly. If it's correct and fixed then `accounts add xmpp-js xmpp_username@xmpp_server.tld` should work. But I don't know where is incorrect, all logs (mostly INFO) don't seem incorrect.
Logs:
```
Feb-10 18:40:54.753 INFO cli Loading config file /data/config.yaml
Feb-10 18:40:54.799 INFO Program Starting appservice listener on port 9555
Feb-10 18:40:54.989 INFO Program Selecting xmpp-js as a backend
Feb-10 18:40:54.990 INFO Program Enabling metrics
Feb-10 18:40:55.000 WARN NeDBStore Starting integrity check
Feb-10 18:40:55.001 WARN NeDBStore Check WILL modify database
Feb-10 18:40:55.003 INFO NeDBStore Found 0 room entries, 0 of which are invalid
Feb-10 18:40:55.004 INFO NeDBStore Found 0 user entries, 0 of which have no type
Feb-10 18:40:55.004 INFO NeDBStore Also found 0 invalid ghosts
Feb-10 18:40:55.004 INFO Program Checking if homeserver is up
Feb-10 18:40:55.049 INFO Program Ensuring bot is registered
Feb-10 18:40:55.084 WARN bridge [-] POST https://my-matrix-server.tld/_matrix/client/r0/register (AS) HTTP 400 Error: "{\"errcode\":\"M_USER_IN_USE\",\"error\":\"User ID already taken.\"}"
Feb-10 18:40:55.227 INFO RoomAliasSet Loaded 1 regexes
Feb-10 18:40:55.228 INFO Program Bridge has started.
Feb-10 18:40:55.229 INFO XmppJsInstance Starting new XMPP component instance to xmpp://xmpp-docker-hostname-or-ip:5347 using domain my-xmpp-component-domain.tld
Feb-10 18:40:55.229 INFO XMPP-conn status: connecting
Feb-10 18:40:55.236 INFO XMPP-conn status: connect
Feb-10 18:40:55.237 INFO XMPP-conn status: opening
Feb-10 18:40:55.256 INFO XMPP-conn status: open
Feb-10 18:40:55.267 INFO XMPP-conn status: online
Feb-10 18:40:55.268 INFO XMPP-conn gone online as my-xmpp-component-domain.tld
Feb-10 18:40:55.268 INFO XmppJsInstance flushing 0 buffered messages
Feb-10 18:40:55.269 INFO RoomSync Beginning sync
Feb-10 18:40:55.269 INFO RoomSync Got 0 group rooms
Feb-10 18:40:55.270 INFO RoomSync Finished sync
Feb-10 18:40:55.271 INFO Program Initiation of bridge complete
Feb-10 18:43:11.204 INFO MatrixEventHandler Got invite from @me:homeserver-domain.tld to !random-room-id:homeserver-domain.tld
Feb-10 18:43:11.790 INFO NeDBStore Storing remote room (user-admin) !random-room-id:homeserver-domain.tld
Feb-10 18:43:11.792 INFO MatrixEventHandler Created new 1 to 1 admin room
```
----
PS: It's really good if we can provide a better docker documentations, so user need this bridge don't need (like me) search around. Here is some suggestion:
- Need your own XMPP servers that support Component Connections ([XEP-0225](https://xmpp.org/extensions/xep-0225.html)) (I know `prosody` and `ejabberd` supporting it now)
- [Example on how to enable XEP-0225 on `ejabberd`](https://github.com/processone/ejabberd/issues/3148)
- `config.yml` example can be downloaded from github, modify as you needed.
- Generate the registration file
```
docker run --rm -it \
-v `pwd`:/data \
--entrypoint /bin/sh \
matrixdotorg/matrix-bifrost:latest
# Then run following two commands to generate the file and move it to /data
node /app/lib/Program.js -r -c /data/config.yaml -u http://your-docker-ip-or-hostname:9555
mv /app/bifrost-registration.yaml /data/registration.yaml
```
(There really should an auto generate `registration.yaml` file process in docker)
Contributor guide
Research direction
Start with the `accounts add` command and the xmpp-js backend, using the reported Docker setup and `config.yaml` as the reproduction context. Review `Program.js` and the registration-file generation flow, then determine whether account creation is unsupported or misconfigured. Done means the behavior is fixed or the required XMPP setup is clearly documented, including the Docker registration process.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, typescript
- Domain
- backend, documentation
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100