Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bitwarden Desktop Fails to Launch on Startup with Username Containing Space (Windows) #11106

Open
1 task done
Nktech-Official opened this issue Sep 17, 2024 · 3 comments
Open
1 task done
Labels
bug desktop Desktop Application

Comments

@Nktech-Official
Copy link

Steps To Reproduce

prerequisite windows app installed for a user (not system-wide) . User name Should have Space so Path to User Directory has Space
Open Bitwarden Desktop.
Navigate to Settings
Enable the "Start automatically login" option
Restart the computer.

Expected Result

After restarting, Bitwarden Desktop should automatically launch in the background or foreground (depending on settings).

Actual Result

Instead of launching, a popup window appears asking me to "choose an app to open the file."

The file path displayed in the popup is C:\Users\Nitesh (only the first part of my username).
Clicking on any app or ignoring the popup doesn't seem to affect Bitwarden's functionality.

Screenshots or Videos

No response

Additional Context

Operating System

  • Edition Windows 10 Home Single Language
  • Version 22H2
  • Installed on ‎31-‎07-‎2024
  • OS build 19045.4894
  • Experience Windows Feature Experience Pack 1000.19060.1000.0

Bitwarden

  • Version 2024.8.2
  • Shell 31.3.1
  • Renderer 126.0.6478.185
  • Node 20.15.1
  • Architecture x64

Temporary Solution (Use with Caution):

Important Note: Modifying the Windows registry carries some risk. This is a temporary workaround and should only be attempted if necessary.

I was able to get Bitwarden to launch automatically on startup by following the steps outlined in a similar issue report here: #6524. This involves manually editing the Windows registry to add the path to the Bitwarden executable file in quotes within the "Start login" configuration.

After applying this workaround:

The checkbox for "Start login" within the Bitwarden app settings may appear unchecked. However, Bitwarden will still launch automatically on startup.

Operating System

Windows

Operating System Version

10 22H2

Installation method

Direct Download (from bitwarden.com)

Build Version

2024.8.2

Issue Tracking Info

  • I understand that work is tracked outside of GitHub. A PR will be linked to this issue should one be opened to address it, but Bitwarden doesn't use fields like "assigned", "milestone", or "project" to track progress.
@Nktech-Official Nktech-Official added bug desktop Desktop Application labels Sep 17, 2024
@jtodddd
Copy link

jtodddd commented Sep 18, 2024

Hi there,

I am unable to reproduce this issue, it has been escalated for further investigation. If you have more information that can help us, please add it below.

Thanks!

@Nktech-Official
Copy link
Author

You can go into (Win + R) " RegEdit " and look for "Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run"

check what is the value for this register if there are multiple enterys look for electron.app Bitwarden
on my system I Installed it for only my user Nitesh Mishra (it's the only user btw) so the executables are inside C:\Users\Nitesh Mishra\AppData\Local\Programs\Bitwarden\Bitwarden.exe this is the default value set by the Bitwarden app on turning on automatic start on login. the space the space in the path of executable is causing the issue so I changed the registry manually putting the executable path in quotes like this "C:\Users\Nitesh Mishra\AppData\Local\Programs\Bitwarden\Bitwarden.exe" .

To Reproduce

  • you need a system with 2 word user name
  • Bitwarden installed only for that user
  • so executables are in the path as described above

if you cannot reproduce kindly share the value for the registry
"Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run"
look for electron.app Bitwarden

@Kasheen
Copy link

Kasheen commented Oct 20, 2024

I have the same issue as @Nktech-Official.

Installing Bitwarden Desktop for Windows in single user mode and selecting run at startup in the settings results in the same issue.

Registry shows the same problem, the path is not quoted, and adding the quotes manually fixes it.

This all seems to be controlled by this code here:

app.setLoginItemSettings({ openAtLogin: true });

Which is a call into electron setLoginItemSettings:

path string (optional) Windows - The executable to launch at login. Defaults to process.execPath.

Which is a node API:

The process.execPath property returns the absolute pathname of the executable that started the Node.js process. Symbolic links, if any, are resolved.

Possible Root Cause:

All that to say - perhaps this is a bug in electron because it seems like setLoginItemSettings is not working as intended on Windows:

Here is the issue for that on the electron github.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug desktop Desktop Application
Projects
None yet
Development

No branches or pull requests

3 participants