Package Details: mx-puppet-discord-git r248.c17384a-3

Git Clone URL: https://aur.archlinux.org/mx-puppet-discord-git.git (read-only, click to copy)
Package Base: mx-puppet-discord-git
Description: This is a Matrix bridge for Discord
Upstream URL: https://github.com/matrix-discord/mx-puppet-discord
Licenses: Apache
Conflicts: mx-puppet-discord
Provides: mx-puppet-discord
Submitter: BrainDamage
Maintainer: BrainDamage
Last Packager: BrainDamage
Votes: 1
Popularity: 0.22
First Submitted: 2020-11-06 09:15
Last Updated: 2021-04-07 21:17

Latest Comments

1 2 Next › Last »

marcool04 commented on 2021-05-28 09:58

Right. I've tracked it down to the https://github.com/Sorunome/mx-puppet-bridge component. Somebody opened an issue there already: https://github.com/Sorunome/mx-puppet-bridge/issues/79

BrainDamage commented on 2021-05-09 14:07

that's a different error, unrelated to the previous unfortunately, it seems to be an upstream problem, npm pins versions of libs while archs track official releases, and arch's sqlite libs are incompatible with that version of better-sqlite in nodejs

now I'm not sure if a newer version of better-sqlite exists which fixes the issue and mx-pupppet-discord has to just point to a different version, or it doesn't exist entirely and you'll have to wait even more

I'd suggest you to report it to mx-puppet-discord bugtracker for now

marcool04 commented on 2021-05-04 20:31

Thanks for your insights and helpful suggestions @Ta180m and @BrainDamage. Unfortunately, makepkg --cleanbuild made no difference. Indeed, I even cloned the git repo from this package fresh, and that made no difference. Attempting to perform the makepkg as a brand new user failed. I spun up a local vanilla archlinux vm and still get the same error. This is not related to my "upgrade"… as it stands, the PKGBUILD doesn't build, see log from fresh VM here: https://termbin.com/7jve

BrainDamage commented on 2021-05-02 22:42

the sqlite error is because npm cache mechanism prevents a rebuild of the package against a new .so, it thinks that the lib is already compiled and working for the current version

to have it working without hassle, you can nuke the cache dir along the src files with makepkg --cleanbuild, with penalty that the rebuild will be longer since you'll be rebuilding more than just the sqlite bindings

... alternatively, just selectively delete the sqlite bindings folder in the cache and issue a rebuild as usual, but ymmv if more than just sqlite bindings broke

Ta180m commented on 2021-05-01 22:40

If you use PostgreSQL instead of SQLite, you can remove the SQLite dependencies from the relevant files, which will also fix the problem.

marcool04 commented on 2021-05-01 17:49

Hi there. After last system upgrade, mx-puppet-discord failed to start with following error:

/usr/lib/node_modules/mx-puppet-discord/node_modules/bindings/bindings.js:121
        throw e;
        ^
Error: /usr/lib/node_modules/mx-puppet-discord/node_modules/better-sqlite3/build/Release/better_sqlite3.node: undefined symbol: _ZN4node6AtExitEPFvPvES0_
    at Object.Module._extensions..node (node:internal/modules/cjs/loader:1167:18)
    at Module.load (node:internal/modules/cjs/loader:988:32)
    at Function.Module._load (node:internal/modules/cjs/loader:828:14)
    at Module.require (node:internal/modules/cjs/loader:1012:19)
    at require (node:internal/modules/cjs/helpers:93:18)
    at bindings (/usr/lib/node_modules/mx-puppet-discord/node_modules/bindings/bindings.js:112:48)
    at Object.<anonymous> (/usr/lib/node_modules/mx-puppet-discord/node_modules/better-sqlite3/lib/database.js:6:40)
    at Module._compile (node:internal/modules/cjs/loader:1108:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
    at Module.load (node:internal/modules/cjs/loader:988:32) {
  code: 'ERR_DLOPEN_FAILED'
}

The DLOPEN error points to a .so change – not sure which one, I suspect one of these:

$ rg "2021-04-30.* \[ALPM\] upgraded" /var/log/pacman.log
[SNIP]
nodejs (15.14.0-2 -> 16.0.0-1)
npm (7.10.0-1 -> 7.11.2-1)
[SNIP]

I figured that a simple rebuild should fix it, so I bumped the pkgrel in PKGBUILD, but ran into issues with this stage of building:

npm install --cache "${srcdir}/npm-cache"

This fails with a C related error, which has something to do with better-sqlite3 https://github.com/JoshuaWise/better-sqlite3. Try as I may, I can't figure out what's wrong with it. However… I did notice that this:

sudo npm install --global better-sqlite3

Actually works fine! So I then copied /usr/lib/node_modules/better-sqlite3/ over into the src/mx-puppet-discord/node_modules/ directory, ran npm install --cache "${srcdir}/npm-cache" manually from src/mx-puppet-discord/, and finally commented that line out in the PKGBUILD and ran makepkg -si to reinstall. Working! If anybody can figure out what's up with better-sqlite3 that'd be helpful… it's beyond me!

Ta180m commented on 2021-04-07 23:51

@podiki Thanks, I actually found that guide when I was first getting this set up. Unfortunately, I think something's wrong with my Node installation since the Node scripts don't seem to run as root.

podiki commented on 2021-04-07 21:36

@BrainDamage thanks again for the package, the Discord bridge has been very handy!

I do have a brief line about the shared secret module, but just pointing people to what's in the sample config and the module readme. I found that simple and easy enough when I did it, but would be easy enough to add for completeness. And that module is good to have for other bridges as well.

BrainDamage commented on 2021-04-07 21:28

I apologize for all the mistakes, normally I am not this sloppy ...

I'll try to be careful from now on

@podiki: you can avoid .well-known by using the functionality in mx-puppet-discord/config.yaml ( few other bridges also support this functionality )

# Map of homeserver URLs to their C-S API endpoint
#
# Useful for double-puppeting if .well-known is unavailable for some reason
homeserverUrlMap:
  my.host: http://localhost:8008

podiki commented on 2021-04-07 21:09

@Ta180m (and anyone else) If it is helpful, I wrote up a guide to using this: https://boilingsteam.com/how-to-bridge-discord-in-matrix/