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

issue generating slack-registration.yaml #89

Open
Jasper-Ben opened this issue Jun 26, 2019 · 4 comments
Open

issue generating slack-registration.yaml #89

Jasper-Ben opened this issue Jun 26, 2019 · 4 comments

Comments

@Jasper-Ben
Copy link

Jasper-Ben commented Jun 26, 2019

Issue

When running the generating part of the install process the program prompts for user's localpart but exits without an error and without generating the registration.yaml after I provide this information. I am not sure if this is due to a mistake in the setup, or if this is a bug. Thus, attached my setup. Any help would be much appreciated!

Setup

setup_docker

config.json

URL uses Dockers local DNS system.

{
  "slack": [{
    "team_name": "XYZ",
    "user_access_token": "abcd",
    "notify": "only_active"
  }],
  "registrationPath": "slack-registration.yaml",
  "port": 8090,
  "bridge": {
    "homeserverUrl":"http://matrix-synapse:8008",
    "domain": "matrix-synapse",
    "registration": "slack-registration.yaml"
  }
}

Dockerfile

FROM node:12.4-alpine
RUN apk --no-cache add git \
  && git clone https://github.com/matrix-hacks/matrix-puppet-slack.git /app \
  && cd /app \
  && npm install
WORKDIR /app
CMD node index.js

Registration

For the registration conf generating process I use following command after building docker_image:

docker run --expose 8090 --name matrix-puppet-slack -it --rm --network=matrix-synapse_matrix-bridges -v /opt/matrix-synapse/data/matrix-puppet-slack/config.json:/app/config.json:ro docker_image node index.js -r -u "http://matrix-puppet-slack:8090"

Things tried so far

  • use external domain in config file
  • use combination of external and internal in homeserverUrl and Domain
  • checked if auth token works
  • checked that matrix-puppet-slack can access matrix-synapse
@ghost
Copy link

ghost commented Jul 22, 2019

I was able to check out 1.12, create the registration file. 1.12 wasn't working for my synapse 1.0 from Debian's buster backports, so I then checked out master, re-installed node stuff and then ran successfully.

@michaelnew
Copy link
Contributor

Should be fixed with #90

@dreamflasher
Copy link

Doesn't work for me either. I use the default configuration from: https://github.com/spantaleev/matrix-docker-ansible-deploy/ and in the documentation of matrix-puppet-slack the naming is unclear to me. While readme.md speaks about http://your-bridge-server:8090, config.sample.json uses https://synapse.keyvan.pw.

None of these are standard matrix terminology, I can offer synapse, mxisd, exim-relay, coturn, riot and dimension. Which of these do you mean?

Currently node index.js -r -u "http://127.0.0.1:8091" (tried a bunch of different domains and IPs, all the same) yields:

module.js:675
    throw err;
    ^

SyntaxError: /home/git/matrix-puppet-slack/config.json: Unexpected token ] in JSON at position 707
    at JSON.parse (<anonymous>)
    at Object.Module._extensions..json (module.js:672:27)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/home/git/matrix-puppet-slack/config_migrations.js:2:16)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)

@gonzalloe
Copy link

gonzalloe commented Mar 4, 2020

Was facing same issue with you when I tried to generate slack-registration.yaml file using this code node index.js -r -u "http://your-bridge-server:8090".

Try use this instead, npm start -- -r -c config.yaml -u "http://your-bridge-server:8090".
You should see the log in success message on the cli after enter your localpart and password.
This works fine for me anyhow. Good luck.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants