Package Details: bitwarden 1.25.1-2

Git Clone URL: (read-only, click to copy)
Package Base: bitwarden
Description: Bitwarden Desktop Application
Upstream URL:
Keywords: password-manager
Licenses: GPL3
Conflicts: bitwarden-bin, bitwarden-git
Submitter: libertylocked
Maintainer: libertylocked
Last Packager: libertylocked
Votes: 78
Popularity: 7.50
First Submitted: 2018-10-11 08:37
Last Updated: 2021-04-04 19:06

Pinned Comments

libertylocked commented on 2019-11-11 02:58

If the package breaks after electron update, rebuilding bitwarden should fix it. (Unless there is a way to trigger an auto rebuild whenever electron is upgraded?)

Whenever that happens feel free to leave a comment and I'll update the pkgrel

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 7 8 Next › Last »

libertylocked commented on 2020-03-23 19:54

@yellowsquid thanks for pinpointing the issue. I've updated the pkgbuild to use expac to get installed electron version instead of electron --version

yellowsquid commented on 2020-03-23 11:46

@libertylocked I think I have found part of the problem. Here is a snippet of makepkg -risc:

==> Starting prepare()...
patching file package.json

(electron:241794): Gtk-WARNING **: 11:12:38.803: cannot open display:
==> Starting build()...
v10.19.0 is already installed.
Now using node v10.19.0 (npm v6.13.4)
Creating default alias: default -> 10.19.0 (-> v10.19.0)
Now using node v10.19.0 (npm v6.13.4)

> keytar@4.13.0 install /tmp/bitwarden/src/jslib-0a30c7eb1ecbac500e6c55a7d4024d98efa982bc/node_modules/keytar
> prebuild-install || node-gyp rebuild

> electron@6.1.7 postinstall /tmp/bitwarden/src/jslib-0a30c7eb1ecbac500e6c55a7d4024d98efa982bc/node_modules/electron
> node install.js

That Gtk-WARNING shouldn't be there. It looks like it cam from electron --version. Here's the output of that command:

(electron:242878): Gtk-WARNING **: 11:14:49.770: cannot open display:

This isn't good. I looked at how a similar AUR package ([franz]) gets the system electron version:

electron_version="`expac %v $_electron | cut -d'-' -f1`"

I patched the PKGBUILD with this way of grabbing the method (add expac to makedepends, edit line SYSTEM_ELECTRON_VERSION=...)

Final patch included below.

--- PKGBUILD    2020-03-23 11:36:24.495255690 +0000
+++    2020-03-23 11:35:00.797257605 +0000
@@ -10,7 +10,7 @@
-makedepends=('git' 'npm' 'nvm' 'jq' 'patch')
+makedepends=('expac' 'git' 'npm' 'nvm' 'jq' 'patch')
 depends=('alsa-lib' 'electron' 'gtk2' 'libnotify' 'libsecret' 'libxss' 'libxtst' 'nss')
 conflicts=('bitwarden-git' 'bitwarden-bin')
 options=('!strip' '!emptydirs')
@@ -33,7 +33,7 @@
   # Patch out postinstall routines
   patch --strip=1 package.json ${srcdir}/package.json.patch
   # Patch build to make it work with system electron
-  SYSTEM_ELECTRON_VERSION=$(electron --version | sed -r 's/v//')
+  SYSTEM_ELECTRON_VERSION=$(expac %v electron | cut -d'-' -f1)
   jq < package.json --arg ver $SYSTEM_ELECTRON_VERSION\
   '.build["electronVersion"]=$ver | .build["electronDist"]="/us/lib/electron"'\
   > package.json.patched

libertylocked commented on 2020-03-22 21:33

@yellowsquid The prepare() in PKGBUILD does patch package.json to use system electron. Do you use an AUR helper? I suspect it's either reusing a built package, or it's skipping prepare(). Can you try cloning the git repo of this package and run makepkg? Let me know if you run into any issues.

yellowsquid commented on 2020-03-21 14:48

@libertylocked I have fixed the error by modifying /usr/bin/bitwarden-desktop.

I replaced exec electron with exec electron6. This works because Bitwarden still depends on electron@6.1.7. There are probably some changes that need to made to the PKGBUILD, but I'm not exactly sure what.

You could also try modifying the package.json to replace the electron dependency, but that should probably be done upstream.

libertylocked commented on 2020-03-17 19:19

@yellowsquid Try running a clean build or clearing your AUR cache (e.g. yay -Sc). Let me know if it works for you. Otherwise maybe it's time to update pkgrel again :)

yellowsquid commented on 2020-03-16 16:49

When running I get this error:

Error: The module '/tmp/.org.chromium.Chromium.gkpCub' was compiled against a different Node.js version using NODE_MODULE_VERSION 73. This version of Node.js requires NODE_MODULE_VERSION 76.

I have tried rebuilding Bitwarden and still get the error.

Plexcon commented on 2020-03-12 00:29

npm ERR! Failed at the desktop-idle@1.1.2 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.


libertylocked commented on 2020-02-26 08:31

I added python2 to makedepends until I can find a way to build without it.

Update: I patched package.json, it should build without python2 now.

yochananmarqos commented on 2020-02-19 16:06

Aha! That's why I couldn't build it, I had removed python2. Indeed, please add it to makedepends(). Also, nss depends on nspr, no need to include it as a dependency.

jokke commented on 2020-02-19 12:25

please add python2 to build dependencies