Package Details: bitwarden 1.18.0-1

Git Clone URL: https://aur.archlinux.org/bitwarden.git (read-only, click to copy)
Package Base: bitwarden
Description: Bitwarden Desktop Application
Upstream URL: https://github.com/bitwarden/desktop
Keywords: password-manager
Licenses: GPL3
Conflicts: bitwarden-bin, bitwarden-git
Submitter: libertylocked
Maintainer: libertylocked
Last Packager: libertylocked
Votes: 42
Popularity: 9.22
First Submitted: 2018-10-11 08:37
Last Updated: 2020-05-30 19:47

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

1 2 3 4 5 Next › Last »

yochananmarqos commented on 2020-05-25 17:25

@libertylocked: I just built this with Node 10.20.1 LTS, I would suggest using it since 10.19.0 is no longer supported.

zman0900 commented on 2020-05-15 17:23

This fails to build in a clean chroot. It seems adding 'python' to makedepends is enough to fix it.

When I build outside of a clean chroot, app fails to run with an error like this:

App threw an error during load
Error: The module '/tmp/.org.chromium.Chromium.FgwVCu'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 73. This version of Node.js requires
NODE_MODULE_VERSION 76. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
    at process.func (electron/js2c/asar.js:140:31)
    at process.func [as dlopen] (electron/js2c/asar.js:140:31)
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:1016:18)
    at Object.func (electron/js2c/asar.js:140:31)
    at Object.func [as .node] (electron/js2c/asar.js:149:18)
    at Module.load (internal/modules/cjs/loader.js:816:32)
    at Module._load (internal/modules/cjs/loader.js:728:14)
    at Module._load (electron/js2c/asar.js:717:26)
    at Function.Module._load (electron/js2c/asar.js:717:26)
    at Module.require (internal/modules/cjs/loader.js:853:19)

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
+++ PKGBUILD.new    2020-03-23 11:35:00.797257605 +0000
@@ -10,7 +10,7 @@
 arch=('x86_64')
 url='https://github.com/bitwarden/desktop'
 license=('GPL3')
-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.

Pastebin https://hastebin.com/xidegafero.sql

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.