Skip to content

M_UNKNOWN_TOKEN - Invalid Access Token Passed #1696

@ajohns92a

Description

@ajohns92a

Hi! I have reviewed the ticket that closely matches mine:
#942

However I'm still unable to resolve.

2023-04-06 08:31:41 INFO:IrcBridge Using PgDataStore for Datastore
2023-04-06 08:31:41 INFO:CryptoStore Private key loaded from passkey.pem - IRC password encryption enabled.
2023-04-06 08:31:41 INFO:PgDatastore Starting postgres database engine
2023-04-06 08:31:41 INFO:PgDatastore Database schema is at version v8
2023-04-06 08:31:41 INFO:IrcBridge Restoring last active times from DB
2023-04-06 08:31:41 INFO:IrcBridge Restored 0 last active times from DB
2023-04-06 08:31:41 INFO:IrcServer Reconfiguring <irc server redacted>
2023-04-06 08:31:41 INFO:PgDatastore storeRoom (id=!sGaNDNKUXqQzHnqdTe:localhost, addr=<redacted>, chan=#<redacted>, origin=config, type=channel)
2023-04-06 08:31:41 INFO:IrcBridge Listening on 0.0.0.0:9999
2023-04-06 08:31:41 INFO:IrcBridge Started metrics on http://127.0.0.1:7001
Apr-6 08:31:41.890 DEBUG Intent Checking if user @IRCBotz:localhost is registered
Apr-6 08:31:41.898 DEBUG Intent ensureRegistered: already registered
MatrixHttpClient (REQ-1) {
  errcode: 'M_UNKNOWN_TOKEN',
  error: 'Invalid access token passed.',
  soft_logout: false
}
2023-04-06 08:31:41 ERROR:IrcBridge Homeserver cannot reach the bridge. You probably need to adjust your configuration.
2023-04-06 08:31:41 INFO:IrcBridge Fetching Matrix rooms that are already joined to...
MatrixHttpClient (REQ-2) {
  errcode: 'M_UNKNOWN_TOKEN',
  error: 'Invalid access token passed.',
  soft_logout: false
}
2023-04-06 08:31:41 ERROR:IrcBridge Failed to fetch roomlist from joined_rooms: [object Object]. Retrying
MatrixHttpClient (REQ-3) {
  errcode: 'M_UNKNOWN_TOKEN',
  error: 'Invalid access token passed.',
  soft_logout: false

For simplicity - my appservice-registration-irc.yaml file exists in /matrix with full rw permission

hs_token: 398e8933afc147fcbd6da<redacted>
as_token: c0791700b871a19e61aa<redacted>
url: http://localhost:9999
sender_localpart: IRCBotz
de.sorunome.msc2409.push_ephemeral: true
protocols:
  - irc
namespaces:
  rooms:
    - exclusive: false
      regex: '!sGaNDNKUXqQzHnqdTe:localhost'
  aliases:
    - exclusive: true
      regex: '#irc_.*:localhost'
  users:
    - exclusive: true
      regex: '@irc_.*:localhost'
rate_limited: false

homeserver.yaml

listeners:
  - port: 8008
    tls: false
    type: http
    x_forwarded: true
    bind_addresses: ['::1', '127.0.0.1', '192.168.1.53']
    resources:
      - names: [client, federation]
        compress: false
#
database:
  name: psycopg2
  args:
    user: synapse_user
    password: <redacted>
    database: synapse
    host: localhost
    port: 5432
    cp_min: 5
    cp_max: 10
#
enable_registration: true
enable_registration_without_verification: true
registration_shared_secret: "<redacted>"
#
serve_server_wellknown: true
allow_public_rooms_over_federation: true
#
log_config: "/etc/matrix-synapse/log.yaml"
signing_key_path: "/etc/matrix-synapse/homeserver.signing.key"
trusted_key_servers:
  - server_name: "matrix.org"
#Media Retention#
media_retention:
    local_media_lifetime: 36h
    remote_media_lifetime: 36h
#
#History#
retention:
  enabled: true
  default_policy:
    min_lifetime: 6h
    max_lifetime: 35h
  allowed_lifetime_min: 6h
  allowed_lifetime_max: 35h
  purge_jobs:
    - longest_max_lifetime: 35h
      interval: 5m
#    - shortest_max_lifetime: 6h
#      interval: 5h
#URL Preview#
url_preview_enabled: true
#URL Blacklist#
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'
  - '2001:db8::/32'
  - 'ff00::/8'
  - 'fec0::/10'
#Media Storage#
media_store_path: "/mnt/storage"
#
app_service_config_files: "/matrix/appservice-registration-irc.yaml"

I've not registered any user for the bridge or invited to any room. Should registration occur automatically? Or are there steps I must follow to create a bridge user.

Any guidance would be appreciated! For what it's worth, I administer the target IRC server so I can modify both layers.

OS - Debian 11
Node Version: 18.15.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions