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

微信QR code無法獲取 #27

Open
crmado opened this issue Feb 7, 2024 · 4 comments
Open

微信QR code無法獲取 #27

crmado opened this issue Feb 7, 2024 · 4 comments

Comments

@crmado
Copy link

crmado commented Feb 7, 2024

狀況是我可以在 https://app.element.io/ 內可以找到wechatbot但頭像是空的,不會正常顯示wechat大頭貼,輸入login會發生:

Failed to upload QR code: failed to POST /_matrix/media/v3/upload: M_UNKNOWN (HTTP 500): Internal server error

螢幕擷取畫面 2024-02-07 135005

以下是synapse/homeserver.yaml

# Configuration file for Synapse.
#
# This is a YAML file: see [1] for a quick introduction. Note in particular
# that *indentation is important*: all the elements of a list or dictionary
# should have the same indentation.
#
# [1] https://docs.ansible.com/ansible/latest/reference_appendices/YAMLSyntax.html
#
# For more information on how to configure Synapse, including a complete accounting of
# each option, go to docs/usage/configuration/config_documentation.md or
# https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html
server_name: "XXXX"
public_baseurl: "https://XXXX"
server_wellknown: true
pid_file: /data/homeserver.pid

listeners:
    - port: 8008
      tls: false
      type: http
      x_forwarded: true
      resources:
          - names: [client, federation]
            compress: false
    - port: 8448
      tls: false
      tls_certificate_path: "/data/XXXX/fullchain1.pem"
      tls_private_key_path: "/data/XXXX/privkey1.pem"
      type: http
      x_forwarded: true
      resources:
        -   names: [ client, federation ]
            compress: false


database:
  name: psycopg2
  txn_limit: 10000
  allow_unsafe_locale: true
  args:
    user: XXXX
    password: XXXX
    database: XXXX
    host: XXXX
    port: 5432
    cp_min: 5
    cp_max: 10

log_config: "/data/example.com.log.config"
media_store_path: /data/media_store
uploads_path: /data/uploads

registration_shared_secret: "<your shared srcret>"
report_stats: false
macaroon_secret_key: "<your macaroon key>"
form_secret: "<your from secret>"
signing_key_path: "/data/example.com.signing.key"
trusted_key_servers:
  - server_name: "matrix.org"
suppress_key_server_warning: true

url_preview_enabled: true
url_preview_ip_range_blacklist:
  - '127.0.0.0/8'
  - '10.0.0.0/8'
  - '172.16.0.0/12'
  - '192.168.0.0/16'
  - '100.64.0.0/10'
  - '192.0.0.0/24'
  - '169.254.0.0/16'
  - '192.88.99.0/24'
  - '198.18.0.0/15'
  - '192.0.2.0/24'
  - '198.51.100.0/24'
  - '203.0.113.0/24'
  - '224.0.0.0/4'
  - '::1/128'
  - 'fe80::/10'
  - 'fc00::/7'
  - '2001:db8::/32'
  - 'ff00::/8'
  - 'fec0::/10'

url_preview_url_blacklist:
  - scheme: 'http'
  - netloc: '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$'

modules:
    - module: shared_secret_authenticator.SharedSecretAuthProvider
      config:
#          shared_secret: "XXXXX"
          shared_secret: "<your double puppeting key>"
          m_login_password_support_enabled: true

app_service_config_files:
    - /data/qq-registration.yaml
    - /data/wechat-registration.yaml


# vim:ft=yaml

以下是我docker內部網路狀況,可以發現內部網路連線是正常的。

[
    {
        "Name": "skaimatrix_skaimatrix_matrix-net",
        "Id": "edc8b1e239d973ca851706b696ddfa121e3a993a1a957503fa4a6baeee1f7b76",
        "Created": "2024-02-07T12:57:12.729872881+08:00",
        "Scope": "local",
        "Driver": "bridge",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": null,
            "Config": [
                {
                    "Subnet": "192.168.48.0/24"
                }
            ]
        },
        "Internal": false,
        "Attachable": true,
        "Ingress": false,
        "ConfigFrom": {
            "Network": ""
        },
        "ConfigOnly": false,
        "Containers": {
            "497f143e9599f4d52b5f3dcd83b47d7f1766f7a6b062a69e0e3d29316042a80b": {
                "Name": "skaimatrix_pgadmin_1",
                "EndpointID": "5681e62d1093dfcc4573ab48e19d498fcfe9655e67e93bc6845164d4b4b8bf84",
                "MacAddress": "02:42:c0:a8:30:04",
                "IPv4Address": "192.168.48.4/24",
                "IPv6Address": ""
            },
            "4d44701c755b69d0e7149f114ee9de5fa7faccbb43667082c533144c532c9599": {
                "Name": "matrix-wechat-agent",
                "EndpointID": "1c1a40393a659113bbcd1d487a8e11e528758f7093f0da485e7a095e8907cc89",
                "MacAddress": "02:42:c0:a8:30:07",
                "IPv4Address": "192.168.48.7/24",
                "IPv6Address": ""
            },
            "50dff2d1c5d7a00a9f8965b0fa664d2bb5eafbca4c114bdce55ffd98bfa2fe9b": {
                "Name": "matrix-wechat",
                "EndpointID": "2725205d16f89c82ff2cf3e98d15cdc028d7dafb1baba9545a8a7f22a5fe464b",
                "MacAddress": "02:42:c0:a8:30:06",
                "IPv4Address": "192.168.48.6/24",
                "IPv6Address": ""
            },
            "679c7ac377e3c94657aefbb4e9a7137017dbd58952f266712c4284dff84d0287": {
                "Name": "matrix-qq",
                "EndpointID": "0852c4894b847831fbd13a9aac0969539f5cf3066d198e39c983730bf792abce",
                "MacAddress": "02:42:c0:a8:30:05",
                "IPv4Address": "192.168.48.5/24",
                "IPv6Address": ""
            },
            "774dead06a64e6d1bc5d606e424b460874853b4dc09866599b494b96428f9681": {
                "Name": "synapse",
                "EndpointID": "7c4a8ccf41a821aa974dcaca3ccdac2207076bdfb63fe6726f08e675f992d2c3",
                "MacAddress": "02:42:c0:a8:30:14",
                "IPv4Address": "192.168.48.20/24",
                "IPv6Address": ""
            },
            "8a5094682aad6e6a24eabe2c5851f8db467b30730c96a615c4c51ebc65f8d212": {
                "Name": "postgres",
                "EndpointID": "7d70f6099083054a37fbc9c2438b84e1e3992e7256eb9afe893fc76935bc5409",
                "MacAddress": "02:42:c0:a8:30:02",
                "IPv4Address": "192.168.48.2/24",
                "IPv6Address": ""
            },
            "9cb7d873c4406a1f5fa402ce0848312e056b88adf8a46e2a12c8eb04f372218b": {
                "Name": "caddy",
                "EndpointID": "b194a9633442d6da937d63d21d919e57332c85bb81e820485c96c8863320a984",
                "MacAddress": "02:42:c0:a8:30:03",
                "IPv4Address": "192.168.48.3/24",
                "IPv6Address": ""
            }
        },
        "Options": {},
        "Labels": {
            "com.docker.compose.network": "skaimatrix_matrix-net",
            "com.docker.compose.project": "skaimatrix"
        }
    }
]

caddy/Caddyfile:

{
	email XXXXX
}

XXXXX {
	header /.well-known/matrix/* Content-Type application/json
	header /.well-known/matrix/* Access-Control-Allow-Origin *

	respond /.well-known/matrix/server `{"m.server": "XXXXX:443"}`
	respond /.well-known/matrix/client `{"m.homeserver":{"base_url":"https://XXXX"}}`

	log {
		level INFO
		output file /data/access.log {
			roll_size 512MB
			roll_local_time
			roll_keep 10
		}
	}


	reverse_proxy /_matrix/* synapse:8008
	reverse_proxy /_synapse/client/* synapse:8008
	reverse_proxy /_wechat/* matrix-wechat:20002
}

這個是matrix-wechat的log檔案:

user@gpu:~/Desktop/skai_matrix$ docker logs -t matrix-wechat
2024-02-07T04:57:15.308244868Z Ignoring incorrect config field type !!null at bridge->hs_proxy
2024-02-07T04:57:15.310773048Z 2024-02-07T12:57:15+08:00 INF Initializing bridge built_at=unknown go_version=go1.21.5 name=matrix-wechat version=0.2.3+dev.unknown
2024-02-07T04:57:15.310806994Z 2024-02-07T12:57:15+08:00 DBG Initializing database connection
2024-02-07T04:57:15.310823109Z 2024-02-07T12:57:15+08:00 DBG Initializing state store
2024-02-07T04:57:15.311377061Z 2024-02-07T12:57:15+08:00 DBG Initializing Matrix event processor
2024-02-07T04:57:15.311393531Z 2024-02-07T12:57:15+08:00 DBG Initializing Matrix event handler
2024-02-07T04:57:15.311450572Z 2024-02-07T12:57:15+08:00 DBG Bridge built with end-to-bridge encryption, but disabled in config
2024-02-07T04:57:15.311508901Z 2024-02-07T12:57:15+08:00 INF Bridge initialization complete, starting...
2024-02-07T04:57:15.311578006Z 2024-02-07T12:57:15+08:00 DBG Running database upgrades
2024-02-07T04:57:15.343075199Z 2024-02-07T12:57:15+08:00 INF Database is up to date current_version=1 db_section=main latest_known_version=1 oldest_compatible_version=1
2024-02-07T04:57:15.347109023Z 2024-02-07T12:57:15+08:00 INF Database is up to date current_version=5 db_section=matrix_state latest_known_version=5 oldest_compatible_version=5
2024-02-07T04:57:15.347123754Z 2024-02-07T12:57:15+08:00 DBG Starting application service HTTP server
2024-02-07T04:57:15.347205530Z 2024-02-07T12:57:15+08:00 DBG Checking connection to homeserver
2024-02-07T04:57:15.347435292Z 2024-02-07T12:57:15+08:00 INF Starting HTTP listener address=0.0.0.0:17778
2024-02-07T04:57:15.349551290Z 2024-02-07T12:57:15+08:00 WRN Request failed, retrying error="Get \"http://synapse:8008/_matrix/client/versions?user_id=%40wechatbot%3Askaiqwenapi.skaispace.com\": dial tcp 192.168.48.20:8008: connect: connection refused" as_user_id=@wechatbot:skaiqwenapi.skaispace.com req_id=1 retry_in_seconds=4
2024-02-07T04:57:19.353845458Z 2024-02-07T12:57:19+08:00 DBG Request completed as_user_id=@wechatbot:skaiqwenapi.skaispace.com duration=3.784955 method=GET req_id=1 response_length=932 response_mime=application/json status_code=200 url=http://synapse:8008/_matrix/client/versions?user_id=%40wechatbot%3Askaiqwenapi.skaispace.com
2024-02-07T04:57:19.359937664Z 2024-02-07T12:57:19+08:00 DBG Request completed as_user_id=@wechatbot:skaiqwenapi.skaispace.com duration=4.715812 method=GET req_id=2 response_length=67 response_mime=application/json status_code=200 url=http://synapse:8008/_matrix/client/v3/account/whoami?user_id=%40wechatbot%3Askaiqwenapi.skaispace.com
2024-02-07T04:57:19.375937954Z 2024-02-07T12:57:19+08:00 DBG Received ping from homeserver txn_id=mautrix-go_1707281839359779575_1
2024-02-07T04:57:19.378808520Z 2024-02-07T12:57:19+08:00 DBG Request completed as_user_id=@wechatbot:skaiqwenapi.skaispace.com duration=18.701622 method=POST req_body={"transaction_id":"mautrix-go_1707281839359779575_1"} req_id=3 response_length=18 response_mime=application/json status_code=200 url=http://synapse:8008/_matrix/client/v1/appservice/wechat/ping?user_id=%40wechatbot%3Askaiqwenapi.skaispace.com
2024-02-07T04:57:19.378838572Z 2024-02-07T12:57:19+08:00 DBG Homeserver -> bridge connection works duration_ms=15 txn_id=mautrix-go_1707281839359779575_1
2024-02-07T04:57:19.378849624Z 2024-02-07T12:57:19+08:00 DBG Starting event processor
2024-02-07T04:57:19.378857693Z 2024-02-07T12:57:19+08:00 INF Bridge started!
2024-02-07T04:57:19.378871595Z 2024-02-07T12:57:19+08:00 DBG Updating bot profile
2024-02-07T04:57:19.378998724Z 2024-02-07T12:57:19+08:00 DBG Starting custom puppets
2024-02-07T04:57:19.379009144Z 2024-02-07T12:57:19+08:00 INF WechatService starting to listen on 0.0.0.0:20002 service=WeChat
2024-02-07T04:57:19.381771220Z 2024-02-07T12:57:19+08:00 DBG Request completed as_user_id=@wechatbot:skaiqwenapi.skaispace.com duration=2.717139 method=GET req_id=4 response_length=26 response_mime=application/json status_code=200 url=http://synapse:8008/_matrix/media/v3/config?user_id=%40wechatbot%3Askaiqwenapi.skaispace.com
2024-02-07T04:57:19.388530761Z 2024-02-07T12:57:19+08:00 DBG Request completed as_user_id=@wechatbot:skaiqwenapi.skaispace.com duration=8.77669 method=GET req_id=5 response_length=58 response_mime=application/json status_code=200 url=http://synapse:8008/_matrix/client/v3/profile/@wechatbot:skaiqwenapi.skaispace.com/avatar_url?user_id=%40wechatbot%3Askaiqwenapi.skaispace.com
2024-02-07T04:57:19.392326409Z 2024-02-07T12:57:19+08:00 DBG Request completed as_user_id=@wechatbot:skaiqwenapi.skaispace.com duration=3.109287 method=GET req_id=6 response_length=35 response_mime=application/json status_code=200 url=http://synapse:8008/_matrix/client/v3/profile/@wechatbot:skaiqwenapi.skaispace.com/displayname?user_id=%40wechatbot%3Askaiqwenapi.skaispace.com
2024-02-07T04:57:26.144310300Z 2024-02-07T12:57:26+08:00 INF Agent connected from 192.168.48.7:33653 service=WeChat
2024-02-07T04:57:39.228633491Z 2024-02-07T12:57:39+08:00 DBG Starting handling of transaction content={"pdu":0,"unstable_edu":1,"unstable_to_device":0} transaction_id=155
2024-02-07T04:57:39.228670277Z 2024-02-07T12:57:39+08:00 DBG Finished dispatching events from transaction transaction_id=155
2024-02-07T04:57:51.208242587Z 2024-02-07T12:57:51+08:00 DBG Starting handling of transaction content={"pdu":0,"unstable_edu":1,"unstable_to_device":0} transaction_id=156
2024-02-07T04:57:51.208289342Z 2024-02-07T12:57:51+08:00 DBG Finished dispatching events from transaction transaction_id=156
2024-02-07T04:57:53.972943883Z 2024-02-07T12:57:53+08:00 DBG Starting handling of transaction content={"pdu":0,"unstable_edu":1,"unstable_to_device":0} transaction_id=157
2024-02-07T04:57:53.973014221Z 2024-02-07T12:57:53+08:00 DBG Finished dispatching events from transaction transaction_id=157
2024-02-07T04:57:54.108931434Z 2024-02-07T12:57:54+08:00 DBG Starting handling of transaction content={"pdu":1,"unstable_edu":0,"unstable_to_device":0} transaction_id=158
2024-02-07T04:57:54.109560473Z 2024-02-07T12:57:54+08:00 DBG Finished dispatching events from transaction transaction_id=158
2024-02-07T04:57:54.110002528Z 2024-02-07T12:57:54+08:00 DBG Sent message checkpoint message_checkpoint={"event_id":"$6eblY8CVHAVQlp4EqVC8abI_V3E6AZoRLf5zGvxKamg","event_type":"m.room.message","message_type":"m.text","reported_by":"BRIDGE","retry_num":0,"room_id":"!cQRAkffLbnqGJQnEAA:skaiqwenapi.skaispace.com","status":"SUCCESS","step":"BRIDGE","timestamp":1707281874109}
2024-02-07T04:57:54.111090029Z 2024-02-07T12:57:54+08:00 INF Checker for @crmado:skaiqwenapi.skaispace.com started, interval: 1m0s
2024-02-07T04:57:54.111186429Z 2024-02-07T12:57:54+08:00 DBG Send request message #1 is_login service=WeChat
2024-02-07T04:57:54.111202526Z 2024-02-07T12:57:54+08:00 DBG Sent message checkpoint message_checkpoint={"event_id":"$6eblY8CVHAVQlp4EqVC8abI_V3E6AZoRLf5zGvxKamg","event_type":"m.room.message","message_type":"m.text","reported_by":"BRIDGE","retry_num":0,"room_id":"!cQRAkffLbnqGJQnEAA:skaiqwenapi.skaispace.com","status":"SUCCESS","step":"COMMAND","timestamp":1707281874110}
2024-02-07T04:57:54.111774069Z 2024-02-07T12:57:54+08:00 DBG Received command event_id=$6eblY8CVHAVQlp4EqVC8abI_V3E6AZoRLf5zGvxKamg mx_command=login room_id=!cQRAkffLbnqGJQnEAA:skaiqwenapi.skaispace.com user_id=@crmado:skaiqwenapi.skaispace.com
2024-02-07T04:57:54.111823547Z 2024-02-07T12:57:54+08:00 DBG Send request message #2 is_login service=WeChat
2024-02-07T04:57:54.112946976Z 2024-02-07T12:57:54+08:00 DBG Receive response message #1 is_login service=WeChat
2024-02-07T04:57:54.112999989Z 2024-02-07T12:57:54+08:00 WRN Failed to get login status: PROCESS_FAILED: client not found client=@crmado:skaiqwenapi.skaispace.com service=WeChat
2024-02-07T04:57:54.113177882Z 2024-02-07T12:57:54+08:00 DBG Receive response message #2 is_login service=WeChat
2024-02-07T04:57:54.113195580Z 2024-02-07T12:57:54+08:00 WRN Failed to get login status: PROCESS_FAILED: client not found client=@crmado:skaiqwenapi.skaispace.com service=WeChat
2024-02-07T04:57:54.113248998Z 2024-02-07T12:57:54+08:00 DBG Send request message #3 is_login service=WeChat
2024-02-07T04:57:54.113952479Z 2024-02-07T12:57:54+08:00 DBG Receive response message #3 is_login service=WeChat
2024-02-07T04:57:54.113962639Z 2024-02-07T12:57:54+08:00 WRN Failed to get login status: PROCESS_FAILED: client not found client=@crmado:skaiqwenapi.skaispace.com service=WeChat
2024-02-07T04:57:54.114041116Z 2024-02-07T12:57:54+08:00 DBG Send request message #4 connect service=WeChat
2024-02-07T04:57:56.481146231Z 2024-02-07T12:57:56+08:00 DBG Receive response message #4 connect service=WeChat
2024-02-07T04:57:56.481226400Z 2024-02-07T12:57:56+08:00 DBG Send request message #5 login_qr service=WeChat
2024-02-07T04:57:59.705154985Z 2024-02-07T12:57:59+08:00 DBG Receive response message #5 login_qr service=WeChat
2024-02-07T04:57:59.712339203Z 2024-02-07T12:57:59+08:00 DBG Request completed as_user_id=@wechatbot:skaiqwenapi.skaispace.com duration=6.892559 method=POST req_body="<3652 bytes>" req_id=7 response_length=55 response_mime=application/json status_code=500 url=http://synapse:8008/_matrix/media/v3/upload?user_id=%40wechatbot%3Askaiqwenapi.skaispace.com
2024-02-07T04:57:59.712397669Z 2024-02-07T12:57:59+08:00 ERR Failed to upload QR code: failed to POST /_matrix/media/v3/upload: M_UNKNOWN (HTTP 500): Internal server error user_id=@crmado:skaiqwenapi.skaispace.com
2024-02-07T04:57:59.793515590Z 2024-02-07T12:57:59+08:00 DBG Request completed as_user_id=@wechatbot:skaiqwenapi.skaispace.com duration=79.047175 method=PUT req_body={"body":"Failed to upload QR code: failed to POST /_matrix/media/v3/upload: M_UNKNOWN (HTTP
 500): Internal server error","msgtype":"m.notice"} req_id=8 response_length=59 response_mime=application/json status_code=200 url=http://synapse:8008/_matrix/client/v3/rooms/%21cQRAkffLbnqGJQnEAA:skaiqwenapi.skaispace.com/send/m.room.message/mautrix-go_1707281879714004578_2?user_id=%40wechatbot%3Askaiqwenapi.skaispace.com
2024-02-07T04:57:59.808478230Z 2024-02-07T12:57:59+08:00 DBG Starting handling of transaction content={"pdu":1,"unstable_edu":0,"unstable_to_device":0} transaction_id=159
2024-02-07T04:57:59.808553219Z 2024-02-07T12:57:59+08:00 DBG Finished dispatching events from transaction transaction_id=159
2024-02-07T04:57:59.808858854Z 2024-02-07T12:57:59+08:00 DBG Sent message checkpoint message_checkpoint={"event_id":"$fJB3tNuE06u1p_OODTc2ufx_rLs2HX5M57MSaQMRZqg","event_type":"m.room.message","message_type":"m.notice","reported_by":"BRIDGE","retry_num":0,"room_id":"!cQRAkffLbnqGJQnEAA:skaiqwenapi.skaispace.com","status":"SUCCESS","step":"BRIDGE","timestamp":1707281879808}
2024-02-07T04:57:59.839745713Z 2024-02-07T12:57:59+08:00 DBG Starting handling of transaction content={"pdu":0,"unstable_edu":1,"unstable_to_device":0} transaction_id=160
2024-02-07T04:57:59.839782589Z 2024-02-07T12:57:59+08:00 DBG Finished dispatching events from transaction transaction_id=160
2024-02-07T04:58:03.663604001Z 2024-02-07T12:58:03+08:00 DBG Starting handling of transaction content={"pdu":0,"unstable_edu":1,"unstable_to_device":0} transaction_id=161
2024-02-07T04:58:03.663648380Z 2024-02-07T12:58:03+08:00 DBG Finished dispatching events from transaction transaction_id=161
2024-02-07T04:58:54.118118226Z 2024-02-07T12:58:54+08:00 DBG Send request message #6 is_login service=WeChat
2024-02-07T04:58:54.119935275Z 2024-02-07T12:58:54+08:00 DBG Receive response message #6 is_login service=WeChat
2024-02-07T04:59:54.118321641Z 2024-02-07T12:59:54+08:00 DBG Send request message #7 is_login service=WeChat
2024-02-07T04:59:54.120018545Z 2024-02-07T12:59:54+08:00 DBG Receive response message #7 is_login service=WeChat
2024-02-07T05:00:54.137333826Z 2024-02-07T13:00:54+08:00 DBG Send request message #8 is_login service=WeChat
2024-02-07T05:00:54.138824960Z 2024-02-07T13:00:54+08:00 DBG Receive response message #8 is_login service=WeChat
2024-02-07T05:01:34.096439611Z 2024-02-07T13:01:34+08:00 DBG Starting handling of transaction content={"pdu":0,"unstable_edu":1,"unstable_to_device":0} transaction_id=163
2024-02-07T05:01:34.096493767Z 2024-02-07T13:01:34+08:00 DBG Finished dispatching events from transaction transaction_id=163
2024-02-07T05:01:54.129419199Z 2024-02-07T13:01:54+08:00 DBG Send request message #9 is_login service=WeChat
2024-02-07T05:01:54.131270571Z 2024-02-07T13:01:54+08:00 DBG Receive response message #9 is_login service=WeChat
2024-02-07T05:02:54.129433198Z 2024-02-07T13:02:54+08:00 DBG Send request message #10 is_login service=WeChat
2024-02-07T05:02:54.131209420Z 2024-02-07T13:02:54+08:00 DBG Receive response message #10 is_login service=WeChat
2024-02-07T05:03:54.111723653Z 2024-02-07T13:03:54+08:00 DBG Send request message #11 is_login service=WeChat
2024-02-07T05:03:54.113376258Z 2024-02-07T13:03:54+08:00 DBG Receive response message #11 is_login service=WeChat
..........

這邊是matrix-wechat-agent在容器內的log檔:

user@gpu:~/Desktop/skai_matrix$ docker logs -t matrix-wechat-agent 
2024-02-07T04:57:15.638603599Z Start agent manager...
2024-02-07T04:57:15.638688717Z Start vnc...
2024-02-07T04:57:15.641542826Z Start agent...
2024-02-07T04:57:15.697883394Z /usr/bin/xauth:  file /home/user/.Xauthority does not exist
2024-02-07T04:57:15.802826561Z
2024-02-07T04:57:15.802858619Z New Xtigervnc server 'matrix-wechat-agent:5 (user)' on port 5905 for display :5.
2024-02-07T04:57:15.802866040Z Use xtigervncviewer -SecurityTypes VncAuth,TLSVnc -passwd /home/user/.vnc/passwd matrix-wechat-agent:5 to connect to the VNC server.
2024-02-07T04:57:15.802872650Z
2024-02-07T04:57:16.141638055Z time="2024-02-07 12:57:16" level=info msg="Failed to connect, sleeping for 10s and retry, error: dial tcp 192.168.48.6:20002: connectex: Connection refused."
2024-02-07T04:57:26.144514411Z time="2024-02-07 12:57:26" level=info msg="Manager starting to listen on 127.0.0.1:22222"
2024-02-07T04:57:55.418302643Z time="2024-02-07 12:57:55" level=info msg="No more files."
2024-02-07T04:57:55.461399645Z Could not create log file: No such file or directory
2024-02-07T04:57:56.480881556Z time="2024-02-07 12:57:56" level=info msg="Set wechat version to 3.8.1.26"
2024-02-07T04:57:57.015194620Z ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
2024-02-07T04:57:57.015229783Z ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_card_driver returned error: 没有那个文件或目录
2024-02-07T04:57:57.015239143Z ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
2024-02-07T04:57:57.015245617Z ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_concat returned error: 没有那个文件或目录
2024-02-07T04:57:57.015253038Z ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
2024-02-07T04:57:57.015259734Z ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_refer returned error: 没有那个文件或目录
2024-02-07T04:57:57.015266324Z ALSA lib conf.c:5233:(snd_config_expand) Evaluate error: 没有那个文件或目录
2024-02-07T04:57:57.015272661Z ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM default
2024-02-07T04:57:57.015305996Z ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
2024-02-07T04:57:57.015313637Z ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_card_driver returned error: 没有那个文件或目录
2024-02-07T04:57:57.015320737Z ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
2024-02-07T04:57:57.015327087Z ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_concat returned error: 没有那个文件或目录
2024-02-07T04:57:57.015333597Z ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
2024-02-07T04:57:57.015339668Z ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_refer returned error: 没有那个文件或目录
2024-02-07T04:57:57.015345850Z ALSA lib conf.c:5233:(snd_config_expand) Evaluate error: 没有那个文件或目录
2024-02-07T04:57:57.015352018Z ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM default
@duo
Copy link
Owner

duo commented Feb 7, 2024

像是 Matrix server 的配置问题呐...
看看 synapse 的日志有没有报错,以及试试在 Matrix 客户端聊天中上传个图片之类的看能否成功

@crmado
Copy link
Author

crmado commented Feb 7, 2024

先感謝您抽空回我,先跟你說一聲: 新年快樂

synapse日志:

user@gpu:~/Desktop/skai_matrix$ docker logs -t synapse
2024-02-07T07:09:08.516039442Z Starting synapse with args -m synapse.app.homeserver --config-path /data/homeserver.yaml

圖片上傳畫面:
螢幕擷取畫面 2024-02-07 202710

@duo
Copy link
Owner

duo commented Feb 8, 2024

谢谢,也祝你新年快乐 :)

看到你的 Synapse 日志相关配置在 log_config: "/data/example.com.log.config",检查下这里具体的日志输出到了哪里吧,里面应该有对应上传失败的报错信息
盲猜估计是 /data/media_store/data/uploads 的权限不对 (Ref: https://unix.stackexchange.com/questions/652045/synapse-matrix-server-container-config-permission-file-denied or https://www.reddit.com/r/matrixdotorg/comments/12shulv/unable_to_upload_media_permission_denied_in/)

@crmado
Copy link
Author

crmado commented Feb 13, 2024

我測試確實是權限問題,我改了兩個目錄權限後就可以顯示QR code和上傳照片了,非常感謝您。

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

2 participants