signalapp / Signal-Desktop

A private messenger for Windows, macOS, and Linux.
https://signal.org/download
GNU Affero General Public License v3.0
14.5k stars 2.63k forks source link

Signal fails to update when git linux commands are in path. #5856

Open theAddict opened 2 years ago

theAddict commented 2 years ago

Official solution


Bug Description

When find.exe from C:\Program Files\Git\usr\bin is in the path, the installer will fail, indicating that Signal is running and could not be closed.

Work-around

  1. Open command prompt
  2. execute set PATH=c:\windows\system32;%PATH%
  3. run signal update from command prompt

Potential solution

Call %SYSTEMROOT%\System32\find.exe instead of find when running the tasklist command.

Steps to Reproduce

  1. Have linux version of find in path. For example, from C:\Program Files\Git\usr\bin
  2. Attempt to update Signal
  3. Update will fail

Actual Result: Signal is successfully closed, if open. The signal installer indicates that Signal is open and could not be closed.

Expected Result: Signal would update

Screenshots

Platform Info

Signal Version: 5.37.0

Operating System: Windows 10

Linked Device Version:

Link to Debug Log

indutny-signal commented 2 years ago

Oh my goodness. I think this could be a source of #5854. Thanks for tracking it down.

fattybacon commented 2 years ago

Oh my goodness. I think this could be a source of #5854. Thanks for tracking it down.

I've been following the journey, and yep I've got git's linux tools installed and I've got the same signal update issues.. I've always wondered why dir doesn't behave like a Windows tool anymore. This is why!

fattybacon commented 2 years ago

@theAddict how do you manually update signal from the command line? I've resolved my issue by running latest installer from the command line after switching the PATH as above, but it would be good to know how to run signal update.

theAddict commented 2 years ago

Oh my goodness. I think this could be a source of #5854. Thanks for tracking it down.

@indutny-signal, glad it was helpful. I saw #5854. The symptoms look pretty similar to what I experienced. I thought I'd make a separate ticket because I wasn't certain. Hopefully this fixes @TMMC's issue too.

theAddict commented 2 years ago

@theAddict how do you manually update signal from the command line? I've resolved my issue by running latest installer from the command line after switching the PATH as above, but it would be good to know how to run signal update.

@fattybacon , I ran the installer manually as described in the workaround to update my machine.

Here are a couple ideas that would probably work for invoking the installer via the in-app update mechanism:

  1. You could invoke signal.exe using the workaround above, since the environment should be copied to any child processes.
  2. You could also update the shortcut similarly to what is described here, but set set PATH as described above instead if you want the environment to persist for each execution: https://netlicensing.io/blog/2012/06/15/set-environment-variables-in-windows-shortcut/
gentlemanjohn commented 2 years ago

I had the same issue on Windows 11 with cygwin in my PATH. I couldn't update or uninstall Signal until I removed the offending item from my PATH.

colajunkie13 commented 2 years ago

For anyone finding this: it was WinAVR in my case.

indutny-signal commented 2 years ago

Posted official solution: https://github.com/signalapp/Signal-Desktop/issues/5854#issuecomment-1095298758

pschneider1968 commented 2 years ago

I was also affected by this problem. I have MSYS2 and Git for Windows installed, and their bin directories in my %PATH%. Temporarily renaming the find.exe from Git and MSYS2 /usr/bin to find.exe.BAK resolved the problem, and I could then uninstall 5.36 and newly install 5.41.