I’m having issues launching Bitwarden on my desktop running on KDE Neon 20.04. It only runs once, but after that it fails.
$ snap run --trace-exec bitwarden
Gtk-Message: 04:18:11.242: Failed to load module "colorreload-gtk-module"
Gtk-Message: 04:18:11.243: Failed to load module "window-decorations-gtk-module"
Gtk-Message: 04:18:11.244: Failed to load module "appmenu-gtk-module"
Error org.freedesktop.DBus.Error.Failed: cannot set "default-url-scheme-handler" setting to invalid value "bitwarden"
** Message: 04:18:17.565: Remote error from secret service: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.secrets was not provided by any .service files
(node:72947) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'setContextMenu' of undefined
at tray_main_TrayMain.updateContextMenu (/snap/bitwarden/40/resources/app.asar/main.js:19231:23)
at messaging_main_MessagingMain.updateTrayMenu (/snap/bitwarden/40/resources/app.asar/main.js:18762:28)
at messaging_main_MessagingMain.onMessage (/snap/bitwarden/40/resources/app.asar/main.js:18703:22)
at messaging_main_MessagingMain.<anonymous> (/snap/bitwarden/40/resources/app.asar/main.js:18694:154)
at Generator.next (<anonymous>)
at /snap/bitwarden/40/resources/app.asar/main.js:18672:71
at new Promise (<anonymous>)
at messaging_main_awaiter (/snap/bitwarden/40/resources/app.asar/main.js:18668:12)
at EventEmitter.<anonymous> (/snap/bitwarden/40/resources/app.asar/main.js:18694:82)
at EventEmitter.emit (events.js:200:13)
(node:72947) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'setContextMenu' of undefined
at tray_main_TrayMain.updateContextMenu (/snap/bitwarden/40/resources/app.asar/main.js:19231:23)
at messaging_main_MessagingMain.updateTrayMenu (/snap/bitwarden/40/resources/app.asar/main.js:18762:28)
at messaging_main_MessagingMain.onMessage (/snap/bitwarden/40/resources/app.asar/main.js:18703:22)
at messaging_main_MessagingMain.<anonymous> (/snap/bitwarden/40/resources/app.asar/main.js:18694:154)
at Generator.next (<anonymous>)
at /snap/bitwarden/40/resources/app.asar/main.js:18672:71
at new Promise (<anonymous>)
at messaging_main_awaiter (/snap/bitwarden/40/resources/app.asar/main.js:18668:12)
at EventEmitter.<anonymous> (/snap/bitwarden/40/resources/app.asar/main.js:18694:82)
at EventEmitter.emit (events.js:200:13)
(node:72947) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:72947) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:72947) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:72947) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:72947) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'setContextMenu' of undefined
at tray_main_TrayMain.updateContextMenu (/snap/bitwarden/40/resources/app.asar/main.js:19231:23)
at messaging_main_MessagingMain.updateTrayMenu (/snap/bitwarden/40/resources/app.asar/main.js:18762:28)
at messaging_main_MessagingMain.onMessage (/snap/bitwarden/40/resources/app.asar/main.js:18703:22)
at messaging_main_MessagingMain.<anonymous> (/snap/bitwarden/40/resources/app.asar/main.js:18694:154)
at Generator.next (<anonymous>)
at /snap/bitwarden/40/resources/app.asar/main.js:18672:71
at new Promise (<anonymous>)
at messaging_main_awaiter (/snap/bitwarden/40/resources/app.asar/main.js:18668:12)
at EventEmitter.<anonymous> (/snap/bitwarden/40/resources/app.asar/main.js:18694:82)
at EventEmitter.emit (events.js:200:13)
(node:72947) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'setContextMenu' of undefined
at tray_main_TrayMain.updateContextMenu (/snap/bitwarden/40/resources/app.asar/main.js:19231:23)
at messaging_main_MessagingMain.updateTrayMenu (/snap/bitwarden/40/resources/app.asar/main.js:18762:28)
at messaging_main_MessagingMain.onMessage (/snap/bitwarden/40/resources/app.asar/main.js:18703:22)
at messaging_main_MessagingMain.<anonymous> (/snap/bitwarden/40/resources/app.asar/main.js:18694:154)
at Generator.next (<anonymous>)
at /snap/bitwarden/40/resources/app.asar/main.js:18672:71
at new Promise (<anonymous>)
at messaging_main_awaiter (/snap/bitwarden/40/resources/app.asar/main.js:18668:12)
at EventEmitter.<anonymous> (/snap/bitwarden/40/resources/app.asar/main.js:18694:82)
at EventEmitter.emit (events.js:200:13)
(node:72947) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:72947) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
[04:18:44.109] [info] search indexing: 3.9442143ms
Slowest 10 exec calls during snap run:
0.105s snap-update-ns
0.333s /snap/snapd/10707/usr/lib/snapd/snap-confine
0.063s /snap/bitwarden/40/gnome-platform/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders
0.058s /snap/bitwarden/40/gnome-platform/usr/bin/gtk-update-icon-cache
0.065s /snap/bitwarden/40/gnome-platform/usr/sbin/update-icon-caches
1.244s /snap/bitwarden/40/desktop-common.sh
0.056s /snap/bitwarden/40/gnome-platform/usr/lib/x86_64-linux-gnu/libgtk-3-0/gtk-query-immodules-3.0
0.093s /snap/bitwarden/40/desktop-gnome-specific.sh
38.610s /proc/self/exe
42.176s /snap/bitwarden/40/bitwarden
Total time: 43.920s
After exiting it, here’s the output when I try to launch again:
$ snap run --trace-exec bitwarden
Slowest 10 exec calls during snap run:
0.083s /snap/snapd/10707/usr/lib/snapd/snap-confine
0.014s /snap/bitwarden/40/desktop-init.sh
0.011s /bin/mkdir
0.008s /usr/bin/head
0.007s /usr/bin/head
0.014s /usr/bin/head
0.017s /usr/bin/head
0.008s /usr/bin/head
0.008s /usr/bin/head
0.023s /bin/mv
Total time: 0.284s
error: exit status 1
If you remove the snap with snap remove bitwarden, then re-install it, and before launching it do snap save bitwarden and then launch it does it work? If it works the first time again but doesn’t work the second time same as you currently are seeing, does it work if you do snap restore <id-from-save-cmd-above> ?
I tested on a newly installed Kubuntu on T510, and that actually seems to be the case. What’s causing this issue to happen? I mean, I get the why, but not the reason why.