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

Setting ELECTRON_NO_UPDATER=1 is not working on Mac OS #2565

Open
sso-bitwarden opened this issue Mar 24, 2022 · 4 comments
Open

Setting ELECTRON_NO_UPDATER=1 is not working on Mac OS #2565

sso-bitwarden opened this issue Mar 24, 2022 · 4 comments
Labels
bug desktop Desktop Application

Comments

@sso-bitwarden
Copy link

Steps To Reproduce

  1. Set env variable ELECTRON_NO_UPDATER=1
  2. Confirm it
  3. Start Desktop app

Expected Result

No auto-update

Actual Result

Still being asked to update.

Screenshots or Videos

No response

Additional Context

No response

Operating System

macOS

Operating System Version

High Sierra

Installation method

Direct Download (from bitwarden.com)

Build Version

1.31.3

@Hinton
Copy link
Member

Hinton commented Mar 24, 2022

@sso-bitwarden how are you setting the environment variable?

The variable needs to be visible for GUI applications which I believe is easiest done using launchctl.

launchctl setenv ELECTRON_NO_UPDATER 1

@sso-bitwarden
Copy link
Author

@Hinton

The command doesn't work either. It's still asking to update.

@Hinton
Copy link
Member

Hinton commented Mar 28, 2022

Weird it seemed to work on my machine. Another thing we could test is https://apple.stackexchange.com/a/413773, which involves setting the environment variable on launch.

@Hinton Hinton added the desktop Desktop Application label May 5, 2022
@Hinton Hinton transferred this issue from bitwarden/desktop May 5, 2022
@Deepblue99
Copy link

@Hinton, thank you for your help.

I have mac systems running OS 10.12.6 (Sierra) using Bitwarden build 1.31.3. Setting the environment variable to be visible for GUI apps as you suggest works to prevent auto-updating out of functionality.
launchctl setenv ELECTRON_NO_UPDATER 1

The problem then becomes, how to get the launchd variable set during boot or login. Apple no longer consults /etc/launchd.conf during boot, which takes away the straight forward approach. A solution I chose of the many offered by the problem solving community on stackoverflow was to use the AppleScript editor to create an app that can be run as a user Login Item.

The one single command required to get the job done is:
do shell script "launchctl setenv ELECTRON_NO_UPDATER 1"

Make sure you save the file as an Application not a script (I called it Bitwarden_No_Update.app). I put the app in the Applications folder along side the Bitwarden app and enabled it as a login item in System Preferences/Users & Groups/Login Items. Done, you're good to go.

If you want to confirm that the ELECTRON_NO_UPDATER variable is being defined and set to "1", open terminal and use the command:
launchctl getenv ELECTRON_NO_UPDATER

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