bitwarden / clients

Bitwarden client apps (web, browser extension, desktop, and cli).
https://bitwarden.com
Other
9.1k stars 1.2k forks source link

Bitwarden installed as Snap is not working #2629

Open hfluz opened 4 years ago

hfluz commented 4 years ago

When I launch Bitwarden nothing happens (no error message even when running from terminal).

I found this in Gnome Logs:

audit: type=1400 audit(1573214350.669:147): apparmor="DENIED" operation="rmdir" profile="snap.bitwarden.bitwarden" name="/mnt/Dados/Documents/" pid=6700 comm="rmdir" requested_mask="d" denied_mask="d" fsuid=1000 ouid=1000

AVC apparmor="DENIED" operation="rmdir" profile="snap.bitwarden.bitwarden" name="/mnt/Dados/Documents/" pid=6700 comm="rmdir" requested_mask="d" denied_mask="d" fsuid=1000 ouid=1000

Distribution: Ubuntu 19.10.

kspearrin commented 4 years ago

Looks like a permissions issue or something. Can you install and run any snaps?

hfluz commented 4 years ago

Yes, I'm running these snaps without issues:

I didn't get what Bitwarden is trying to do in my Documents folder (is it really trying to remove this folder?). Is it where it stores its files?

REIS0 commented 4 years ago

Same issue here, every time i try to type my password it stop working and closes

jc00ke commented 4 years ago

I just experienced this issue. When starting from the terminal I would get an exist status of 1. I uninstalled then reinstalled the snap and now it starts up fine.

REIS0 commented 4 years ago

Same

jc00ke commented 4 years ago

I can get it to run by runnng /snap/bitwarden/current/bitwarden like suggested in bitwarden/desktop#250 but that's not ideal.

archite commented 4 years ago

I'd verify that you set your connections as so and try again:

adam@dell:~$ snap connections bitwarden 
Interface                 Plug                                Slot                             Notes
browser-support           bitwarden:browser-support           :browser-support                 -
content[gnome-3-28-1804]  bitwarden:gnome-3-28-1804           gnome-3-28-1804:gnome-3-28-1804  -
content[gtk-3-themes]     bitwarden:gtk-3-themes              gtk-common-themes:gtk-3-themes   -
content[icon-themes]      bitwarden:icon-themes               gtk-common-themes:icon-themes    -
content[sound-themes]     bitwarden:sound-themes              gtk-common-themes:sound-themes   -
desktop                   bitwarden:desktop                   :desktop                         -
desktop-legacy            bitwarden:desktop-legacy            :desktop-legacy                  -
gsettings                 bitwarden:gsettings                 :gsettings                       -
home                      bitwarden:home                      :home                            -
network                   bitwarden:network                   :network                         -
opengl                    bitwarden:opengl                    :opengl                          -
password-manager-service  bitwarden:password-manager-service  :password-manager-service        manual
pulseaudio                bitwarden:pulseaudio                :pulseaudio                      -
unity7                    bitwarden:unity7                    :unity7                          -
wayland                   bitwarden:wayland                   :wayland                         -
x11                       bitwarden:x11                       :x11                             -
jc00ke commented 4 years ago
⋊> ~ snap connections bitwarden
Interface                 Plug                                Slot
browser-support           bitwarden:browser-support           :browser-support
content[gnome-3-28-1804]  bitwarden:gnome-3-28-1804           gnome-3-28-1804:gnome-3-28-1804
content[gtk-3-themes]     bitwarden:gtk-3-themes              gtk-common-themes:gtk-3-themes
content[icon-themes]      bitwarden:icon-themes               gtk-common-themes:icon-themes
content[sound-themes]     bitwarden:sound-themes              gtk-common-themes:sound-themes
desktop                   bitwarden:desktop                   :desktop
desktop-legacy            bitwarden:desktop-legacy            :desktop-legacy
gsettings                 bitwarden:gsettings                 :gsettings
home                      bitwarden:home                      :home
network                   bitwarden:network                   :network
opengl                    bitwarden:opengl                    :opengl
password-manager-service  bitwarden:password-manager-service  -
pulseaudio                bitwarden:pulseaudio                :pulseaudio
unity7                    bitwarden:unity7                    :unity7
wayland                   bitwarden:wayland                   :wayland
x11                       bitwarden:x11                       :x11
TobberH commented 4 years ago

I can get it to run by runnng /snap/bitwarden/current/bitwarden like suggested in bitwarden/desktop#250 but that's not ideal.

Same issue! And I have no issues with other snap packages.

TobberH commented 4 years ago
:~$ snap connections bitwarden
Interface                 Plug                                Slot                             Notes
audio-playback            bitwarden:audio-playback            :audio-playback                  -
browser-support           bitwarden:browser-support           :browser-support                 -
content[gnome-3-28-1804]  bitwarden:gnome-3-28-1804           gnome-3-28-1804:gnome-3-28-1804  -
content[gtk-3-themes]     bitwarden:gtk-3-themes              gtk-common-themes:gtk-3-themes   -
content[icon-themes]      bitwarden:icon-themes               gtk-common-themes:icon-themes    -
content[sound-themes]     bitwarden:sound-themes              gtk-common-themes:sound-themes   -
desktop                   bitwarden:desktop                   :desktop                         -
desktop-legacy            bitwarden:desktop-legacy            :desktop-legacy                  -
gsettings                 bitwarden:gsettings                 :gsettings                       -
home                      bitwarden:home                      :home                            -
network                   bitwarden:network                   :network                         -
opengl                    bitwarden:opengl                    :opengl                          -
password-manager-service  bitwarden:password-manager-service  -                                -
pulseaudio                bitwarden:pulseaudio                :pulseaudio                      -
unity7                    bitwarden:unity7                    :unity7                          -
wayland                   bitwarden:wayland                   :wayland                         -
x11                       bitwarden:x11                       :x11                             -
JackHack96 commented 4 years ago

Same issue here, Ubuntu 20.04. By editing the .desktop launcher, located at /var/lib/snapd/desktop/applications/bitwarden_bitwarden.desktop, you can launch it normally. The final .desktop file should be like:

[Desktop Entry]
X-SnapInstanceName=bitwarden
Name=Bitwarden
Exec=env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/bitwarden_bitwarden.desktop /snap/bitwarden/current/bitwarden
Terminal=false
Type=Application
Icon=/snap/bitwarden/25/meta/gui/icon.png
StartupWMClass=Bitwarden
GenericName=Password Manager
Comment=A secure and free password manager for all of your devices.
Categories=Utility;
sunsetsonwheels commented 4 years ago

I can confirm this issue too on Bitwarden Snap 1.18.0 (revision 25) on Ubuntu 20.04. Using /snap/bitwarden/current/bitwarden works.

sbaeurle commented 4 years ago

Can confirm too, if you adjust the .desktop file it starts fine.

Welcius commented 4 years ago

Can reproduce on Bitwarden Snap 1.19.0 on Ubuntu 20.04 LTS, it started when I made a soft link of my Documents folder to a mounted partition.

sunsetsonwheels commented 4 years ago

I have a similar issue to @Welcius when using symlinks as my Documents/Pictures/Downloads/etc. folders to another mounted partition with Standard Notes, another Snap app. I believe this is why, however, I have yet to test this theory.

Welcius commented 4 years ago

Snap fails to open when Documents/Pictures/Downloads/... are symlinks. I got it working again by doing mount binds on /etc/fstab with entries like this:

/mnt/example/Downloads /home/welcius/Downloads none defaults,bind 0 0

This is not a bitwarden issue, but a snap system one. Check this for reference https://bugs.launchpad.net/snappy/+bug/1620771

nasa42 commented 4 years ago

I've noticed that following works for me when Bitwarden snap crashes on start.

rm ~/snap/bitwarden/current/.config/user-dirs.*

(Also works for few other snaps that crash on start, so likely not a Bitwarden snap specific issue).

angelochillemix commented 4 years ago

I've noticed that following works for me when Bitwarden snap crashes on start.

rm ~/snap/bitwarden/current/.config/user-dirs.*

(Also works for few other snaps that crash on start, so likely not a Bitwarden snap specific issue).

It worked for me

zeph commented 4 years ago

@nasa42 that worked for me... indeed, my Documents;Downloads; folders are symlinks @Welcius

zeph commented 4 years ago

@Welcius that link/bug is not available anymore... any other ref?

bitwarden-bot commented 2 years ago

Hi @hfluz, We're cleaning up our repositories in preparation for a major reorganization. Issues from last year will be marked as stale and closed after two weeks. If you still need help, comment to let us know and we'll look into it. Thanks!

suside commented 2 years ago

I can confirm this on Ubuntu 22.04 LTS and

❯ snap list bitwarden
Name       Version  Rev  Tracking       Publisher   Notes
bitwarden  1.33.0   66   latest/stable  bitwarden✓  -

workaround with removing user-dirs.* works.

@zeph this is the correct link https://bugs.launchpad.net/snappy/+bug/1620771 bug is still open