-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
Error reading from websocket: websocket: close 1006 (abnormal closure): unexpected EOF #5
Comments
Hello, I'm fairly new to Matrix, and have it set up as a personal hub currently with the Facebook, Instagram, and iMessage bridges. The former two are working pretty well at this point. I'm trying to use wsproxy to run mautrix-imessage with the (Beeper) Android SMS bridge, and it works great for syncing incoming messages, but I have had very little success with outgoing messages. I just rebuilt the bridge app and pulled the latest wsproxy/syncproxy images. After syncing up the messages, I stopped the bridge app, stopped wsproxy with I'm not sure where to start digging in here, so I've just attached all the logs and configs that seemed relevant. Configs
SMS Bridge
My nginx config for mautrix-proxy:
LogsHere are the logs from the wsproxy docker:
And the adb logs from the bridge app:
I didn't see anything that looked relevant in the Synapse logs, but I can include those too if useful. |
Were you able to get your stuff working? I noticed the error Also, I would strongly suggest removing any references to ipv6 such as |
I experience this problem as well. Incoming messages seem ok so far, but when I try to send a message from Element in a bridge-controlled channel, I get the error in the report above. wsproxy logs
appservice registration# appservice -> id from the config
id: imessage
# appservice -> as_token and hs_token from the config
as_token: "redacted"
hs_token: "redacted"
namespaces:
users:
# The localpart here is username_template from the config, but .+ instead of {{.}}
- regex: '@sms_.+:intuitiveexplanations\.com'
exclusive: true
# Localpart here is appservice -> bot -> username from the config
- regex: '@smsbot:intuitiveexplanations\.com'
exclusive: true
# Address that Synapse uses to contact mautrix-wsproxy
url: "http://localhost:29331"
# Put a new random string here, it doesn't affect anything else
sender_localpart: redacted
rate_limited: false wsproxy and syncproxy docker-compose fileversion: "3.7"
services:
mautrix-wsproxy:
container_name: mautrix-wsproxy
image: dock.mau.dev/mautrix/wsproxy
restart: unless-stopped
ports:
- 29331
environment:
LISTEN_ADDRESS: ":29331"
APPSERVICE_ID: imessage
AS_TOKEN: "redacted"
HS_TOKEN: "redacted"
# These URLs will work as-is with docker networking
SYNC_PROXY_URL: http://mautrix-syncproxy:29332
SYNC_PROXY_WSPROXY_URL: http://mautrix-wsproxy:29331
SYNC_PROXY_SHARED_SECRET: "redacted"
mautrix-syncproxy:
container_name: mautrix-syncproxy
image: dock.mau.dev/mautrix/syncproxy
restart: unless-stopped
environment:
LISTEN_ADDRESS: ":29332"
DATABASE_URL: postgres://syncproxy:redacted@matrix-postgres:5432/syncproxy
HOMESERVER_URL: http://localhost:8008
SHARED_SECRET: "redacted"
networks:
default:
name: matrix
external: true Ansible configurationmatrix_domain: intuitiveexplanations.com
matrix_homeserver_implementation: synapse
matrix_homeserver_generic_secret_key: 'redacted'
matrix_ssl_lets_encrypt_support_email: '[email protected]'
matrix_postgres_connection_password: 'redacted'
matrix_synapse_container_extra_arguments:
["-v", "/etc/synapse-custom:/etc/synapse-custom:ro"]
matrix_synapse_app_service_config_files:
- /etc/synapse-custom/mautrix-imessage-registration.yaml
matrix_postgres_additional_databases:
- name: syncproxy
username: syncproxy
password: "redacted"
matrix_synapse_ext_password_provider_shared_secret_auth_enabled: true
matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret: "redacted"
matrix_nginx_proxy_container_extra_arguments:
["-p", "29333:29333"]
matrix_nginx_proxy_proxy_http_additional_server_configuration_blocks:
- |
server {
listen 29333 ssl http2;
server_name matrix.intuitiveexplanations.com;
server_tokens off;
root /dev/null;
ssl_certificate /matrix/ssl/config/live/matrix.intuitiveexplanations.com/fullchain.pem;
ssl_certificate_key /matrix/ssl/config/live/matrix.intuitiveexplanations.com/privkey.pem;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
ssl_prefer_server_ciphers off;
ssl_stapling on;
ssl_stapling_verify on;
ssl_trusted_certificate /matrix/ssl/config/live/matrix.intuitiveexplanations.com/chain.pem;
ssl_session_tickets off;
ssl_session_cache shared:MozSSL:10m;
ssl_session_timeout 1d;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
location / {
set $backend "mautrix-wsproxy:29331";
proxy_pass http://$backend;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
}
} android-sms confighomeserver:
address: https://matrix.intuitiveexplanations.com
websocket_proxy: wss://matrix.intuitiveexplanations.com:29333
domain: intuitiveexplanations.com
async_media: false
appservice:
database: /data/user/0/com.beeper.sms.app/mautrix-imessage.db
id: imessage
bot:
username: smsbot
displayname: Android SMS bridge bot
avatar: mxc://maunium.net/tManJEpANASZvDVzvRvhILdX
ephemeral_events: false
as_token: "redacted"
hs_token: "redacted"
imessage:
platform: android
bridge:
user: "@raxod502:intuitiveexplanations.com"
username_template: sms_{{.}}
displayname_template: "{{.}} (iMessage)"
personal_filtering_spaces: false
delivery_receipts: false
message_status_events: true
send_error_notices: true
max_handle_seconds: 0
sync_with_custom_puppets: false
sync_direct_chat_list: false
login_shared_secret: "redacted"
double_puppet_server_url: null
chat_sync_max_age: 0.5
initial_backfill_limit: 100
initial_backfill_disable_notifications: true
periodic_sync: true
find_portals_if_db_empty: false
media_viewer_url: null
media_viewer_sms_min_size: 409600
media_viewer_imessage_min_size: 52428800
convert_heif: true
convert_video:
enabled: false
ffmpeg_args: ["-c:v", "libx264", "-preset", "faster", "-crf", "22", "-c:a", "copy"]
extension: "mp4"
mime_type: "video/mp4"
command_prefix: "!im"
federate_rooms: true
encryption:
allow: true
default: true
appservice: false
key_sharing:
allow: false
require_cross_signing: false
require_verification: true
relay:
enabled: false
whitelist: []
message_formats:
m.text: "{{ .Sender.Displayname }}: {{ .Message }}"
m.notice: "{{ .Sender.Displayname }}: {{ .Message }}"
m.emote: "* {{ .Sender.Displayname }} {{ .Message }}"
m.file: "{{ .Sender.Displayname }} sent a file: {{ .FileName }}"
m.image: "{{ .Sender.Displayname }} sent an image: {{ .FileName }}"
m.audio: "{{ .Sender.Displayname }} sent an audio file: {{ .FileName }}"
m.video: "{{ .Sender.Displayname }} sent a video: {{ .FileName }}"
logging:
directory: /data/user/0/com.beeper.sms.app/logs
file_name_format: "{{.Date}}-{{.Index}}.log"
file_date_format: 2006-01-02
file_mode: 0600
timestamp_format: Jan _2, 2006 15:04:05
print_level: debug adb logs when attempting to send messageMessage is sent a few seconds after
I'll update this thread if I find a resolution. (I already went through the suggestions in #5 (comment) and no luck.) |
Solved, the following appservice registration config was wrong: # Address that Synapse uses to contact mautrix-wsproxy
url: "http://localhost:29331" As can be verified by attempting to reach the address from within the synapse container:
While based on my docker-compose configuration, I should be using the following instead: # Address that Synapse uses to contact mautrix-wsproxy
url: "http://mautrix-wsproxy:29331" Which does work:
After making the change to that config file (which I have bind-mounted into the synapse container via This will likely resolve your issue as well @cincodenada |
I've filed a PR at mautrix/imessage#90 to improve the documentation and avoid future confusion around this issue. |
I have this issue too, and have not been able to resolve it... It seems to be working despite the errors. If I try to enable end to end encryption, I have 502 errors like this issue: mautrix/imessage#93 I get repeating errors:
Any ideas? I am not using docker. |
[Ignore or delete this, I missed some redactions and didn't know about the "delete revision" functionality until after I posted a new message]
The text was updated successfully, but these errors were encountered: