turt2live / matrix-sticker-manager

A service to help people create their own sticker packs (for Dimension)
GNU General Public License v3.0
46 stars 11 forks source link

Account data not found #23

Open arslancharyev31 opened 3 years ago

arslancharyev31 commented 3 years ago

Good day.

I'm running a private unfederated matrix server in docker environment and was looking for a way to enable private custom stickers when I stumbled upon the Dimension integration manager and this matrix sticker manager. I was able to successfully configure the Dimension manager, and access it through Element client. However the Sticker Bot account that I've made and configured for this sticker manager doesn't seem to respond to any of the commands. Upon viewing the logs from its docker container I noticed several lines of interest (the real hostname was replaced with my.domain):

MatrixLiteClient (REQ-1) GET https://matrix.my.domain/_matrix/client/r0/account/whoami
MatrixLiteClient (REQ-1 RESP-H200) {"user_id":"@stickers:matrix.my.domain"}
MatrixLiteClient (REQ-2) GET https://matrix.my.domain/_matrix/client/r0/user/%40stickers%3Amatrix.my.domain/account_data/io.t2bot.stickers.cache
index Sticker bot started!
MatrixLiteClient (REQ-2) {"errcode":"M_NOT_FOUND","error":"Account data not found"}
StickerStore No account data or error retrieving store - returning
MatrixLiteClient (REQ-2 RESP-H404) {"errcode":"M_NOT_FOUND","error":"Account data not found"}

The 3rd line from the top caught my attention, as it seemed to reference io.t2bot.stickers.cache while making a request to my matrix server. I made sure to replace all references to the t2bot.io with corresponding references to my services in all config files (except for avatar URLs for integrations that I do not intend to use), but it would seem that it wasn't enough. Hence, I would appreciate any help with this issue.

If it is of any help, here are the redacted versions of my config files (the exact names aren't specified because they are mounted as volumes in docker):

App service for Synapse config ```yml # An ID which is unique across all application services on your homeserver. This should never be changed once set. id: sticker-manager # this is the base URL of the application service url: https://stickers.my.domain # This is the token that the AS should use as its access_token when using the Client-Server API # This can be anything you want. as_token: "" # This is the token that the HS will use when sending requests to the AS. # This can be anything you want. hs_token: "" # this is the local part of the desired user ID for this AS (in this case @logging:localhost) sender_localpart: "stickers" namespaces: users: [] rooms: [] aliases: - exclusive: true regex: "#_stickerpack_.+:matrix.my.domain" ```
Dimension config ```yml # The web settings for the service (API and UI). # It is best to have this run on localhost and use a reverse proxy to access Dimension. web: port: 8184 address: '0.0.0.0' # Homeserver configuration homeserver: # The domain name of the homeserver. This is used in many places, such as with go-neb # setups, to identify the homeserver. name: "matrix.my.domain" # The URL that Dimension, go-neb, and other services provisioned by Dimension should # use to access the homeserver with. clientServerUrl: "https://matrix.my.domain" # The URL that Dimension should use when trying to communicate with federated APIs on # the homeserver. If not supplied or left empty Dimension will try to resolve the address # through the normal federation process. # federationUrl: "http://matrix_synapse:8008" federationUrl: "https://matrix.my.domain" # The URL that Dimension will redirect media requests to for downloading media such as # stickers. If not supplied or left empty Dimension will use the clientServerUrl. #mediaUrl: "https://t2bot.io" # The access token Dimension should use for miscellaneous access to the homeserver, and # for tracking custom sticker pack updates. This should be a user configured on the homeserver # and be dedicated to Dimension (create a user named "dimension" on your homeserver). For # information on how to acquire an access token, visit https://t2bot.io/docs/access_tokens accessToken: "" # These users can modify the integrations this Dimension supports. # To access the admin interface, open Dimension in Element and click the settings icon. admins: - "@admin:matrix.my.domain" # IPs and CIDR ranges listed here will be blocked from being widgets. # Note: Widgets may still be embedded with restricted content, although not through Dimension directly. widgetBlacklist: - 10.0.0.0/8 - 172.16.0.0/12 - 192.168.0.0/16 - 127.0.0.0/8 database: # Where the database for Dimension is file: "/data/dimension.db" # Where to store misc information for the utility bot account. botData: "/data/dimension.bot.json" # Display settings that apply to self-hosted go-neb instances goneb: # The avatars to set for each bot. Usually these don't need to be changed, however if your homeserver # is not able to reach t2bot.io then you should specify your own here. To not use an avatar for a bot, # make the bot's avatar an empty string. avatars: giphy: "mxc://t2bot.io/c5eaab3ef0133c1a61d3c849026deb27" imgur: "mxc://t2bot.io/6749eaf2b302bb2188ae931b2eeb1513" github: "mxc://t2bot.io/905b64b3cd8e2347f91a60c5eb0832e1" wikipedia: "mxc://t2bot.io/7edfb54e9ad9e13fec0df22636feedf1" travisci: "mxc://t2bot.io/7f4703126906fab8bb27df34a17707a8" rss: "mxc://t2bot.io/aace4fcbd045f30afc1b4e5f0928f2f3" google: "mxc://t2bot.io/636ad10742b66c4729bf89881a505142" guggy: "mxc://t2bot.io/e7ef0ed0ba651aaf907655704f9a7526" echo: "mxc://t2bot.io/3407ff2db96b4e954fcbf2c6c0415a13" circleci: "mxc://t2bot.io/cf7d875845a82a6b21f5f66de78f6bee" jira: "mxc://t2bot.io/f4a38ebcc4280ba5b950163ca3e7c329" # Settings for interacting with Telegram. Currently only applies for importing # sticker packs from Telegram. telegram: # Talk to @BotFather on Telegram to get a token botToken: "YourTokenHere" # Custom sticker pack options. # Largely based on https://github.com/turt2live/matrix-sticker-manager stickers: # Whether or not to allow people to add custom sticker packs enabled: true # The sticker manager bot to promote stickerBot: "@stickers:matrix.my.domain" # The sticker manager URL to promote managerUrl: "https://stickers.my.domain" # Settings for how Dimension is represented to the public dimension: # This is where Dimension is accessible from clients. Be sure to set this # to your own Dimension instance. publicUrl: "https://dimension.my.domain" bigbluebutton: # The full base URL of the API of your BigBlueButton instance. The API is # used to create and join meetings. apiBaseUrl: "https://bbb.example.org/bigbluebutton/api" # The "shared secret" of your BigBlueButton instance. This is used to # authenticate to the API above. sharedSecret: "YourSharedSecretHere" # The title for BigBlueButton widgets that are generated by Dimension. widgetName: "BigBlueButton Conference" # The subtitle for BigBlueButton widgets that are generated by Dimension. widgetTitle: "Join the conference" # The avatar for BigBlueButton widgets that are generated by Dimension. # Usually this doen't need to be changed, however if your homeserver # is not able to reach t2bot.io then you should specify your own here. widgetAvatarUrl: "mxc://t2bot.io/be1650140620d8bb61a8cf5baeb05f24a734434c" # Settings for controlling how logging works logging: file: logs/dimension.log console: true consoleLevel: info fileLevel: verbose rotate: size: 52428800 # bytes, default is 50mb count: 5 ```
Sticker manager config ```yml # The application service settings appservice: domainName: "matrix.my.domain" homeserverUrl: "https://matrix.my.domain" asToken: "" hsToken: "" # The webserver settings webserver: port: 8082 bind: 0.0.0.0 # The public URL is used to provide links to users who generate sticker packs publicUrl: 'https://stickers.my.domain/' # Media repository settings media: # Set to true to clone uploaded media on your media repository. # Requires turt2live/matrix-media-repo useLocalCopy: false # Set to true to use the server-side media info to check the images. # Requires turt2live/matrix-media-repo useMediaInfo: false # Where to store misc files dataPath: "/etc/stickerbot/data" ```
alesandar commented 2 years ago

I am experiencing exactly the same issue. @arslancharyev31, have you had any success so far?