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

Matrix-bridge-mautrix-whatsapp fails at Ensure mautrix-whatsapp config.yaml installed #3989

Closed
Fobhep opened this issue Jan 22, 2025 · 4 comments
Labels
bug needs-info This issue is blocked awaiting information from the reporter

Comments

@Fobhep
Copy link

Fobhep commented Jan 22, 2025

Describe the bug
While trying to deploy whatsapp-bridge the followin task fails:

TASK [custom/matrix-bridge-mautrix-whatsapp : Ensure mautrix-whatsapp config.yaml installed] ************
fatal: [matrix.myserver.de]: FAILED! => 
  msg: |-
    An unhandled exception occurred while templating '{{ matrix_mautrix_whatsapp_configuration_yaml | from_yaml | combine(matrix_mautrix_whatsapp_configuration_extension, recursive=True) }}'. Error was a <class 'yaml.scanner.ScannerError'>, original message: while scanning a simple key
      in "<unicode string>", line 18, column 1
    could not find expected ':'
      in "<unicode string>", line 19, column 5

To Reproduce
The relevant part of my vars.yml file looks like this:

matrix_mautrix_whatsapp_enabled: true
matrix_mautrix_whatsapp_bridge_encryption_allow: true

Running ansible-playbook -i inventory/hosts setup.yml --tags=setup-all,ensure-matrix-users-created,start

Expected behavior
Matrix-Whatsapp-Bridge installation should run trough.

Matrix Server:

  • OS: Ubuntu 22.04 LTS
  • Architecture amd64
@Fobhep Fobhep added the bug label Jan 22, 2025
@spantaleev
Copy link
Owner

Sounds like you may be on an old version of Ansible or Jinja

@luixxiul luixxiul added the needs-info This issue is blocked awaiting information from the reporter label Jan 23, 2025
@Fobhep
Copy link
Author

Fobhep commented Jan 23, 2025

Hey - thanks for the quick reaction!

Interesting - I am currently using

ansible==9.2.0
ansible-core==2.16.3
Jinja2==3.1.2
PyYAML==6.0.1

installed via ubuntu apt-package.

I will try and user a newer version of Ansible via pip.

@Fobhep
Copy link
Author

Fobhep commented Jan 23, 2025

Hey - so same error sadly - I set up a fresh venv:

  msg: |-
    An unhandled exception occurred while templating '{{ matrix_mautrix_whatsapp_configuration_yaml | from_yaml | combine(matrix_mautrix_whatsapp_configuration_extension, recursive=True) }}'. Error was a <class 'yaml.scanner.ScannerError'>, original message: while scanning a simple key
      in "<unicode string>", line 18, column 1
    could not find expected ':'
      in "<unicode string>", line 19, column 5
pip freeze
ansible==11.1.0
ansible-core==2.18.1
cffi==1.17.1
cryptography==44.0.0
Jinja2==3.1.5
MarkupSafe==3.0.2
packaging==24.2
passlib==1.7.4
pycparser==2.22
PyYAML==6.0.2
resolvelib==1.0.1

@Fobhep
Copy link
Author

Fobhep commented Jan 23, 2025

I can't ...

I added debug tasks to the whatsapp role to see the yaml blocks before merging them only to see that I had unresolved git-merge errors in my jinja-template file, which obviously made yaml crash -.-

and surprise - after fixing that it works.

Sorry for even bothering you and thanks. I will close this

@Fobhep Fobhep closed this as completed Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug needs-info This issue is blocked awaiting information from the reporter
Projects
None yet
Development

No branches or pull requests

3 participants