zdia / gorilla

Password Gorilla manages passwords
420 stars 60 forks source link

Critical: Can't see password on macOS Mojave #190

Open asergiychuk opened 6 years ago

asergiychuk commented 6 years ago

After login i can't see window with my password tree. Its happened after upgrade to macOS Mojave. Will be it fixed?

rich123 commented 6 years ago

When you say "login" do you mean after unlocking gorilla? Because "after login" means to me "after logging into MacOS", and if you mean "after logging into MacOS" then it would be normal to not see the gorilla windows if you have the "iconify upon auto-lock" setting turned on (and have an auto-lock timeout set).

If you mean by "login" that after "unlocking" Gorilla via the unlock window, the passwords window does not appear then please (if you can) indicate which version of Gorilla you are running on your Mac.

"Will it be fixed"

I hope so, but as this is the first I've heard of the effect, I do not yet have any idea what might be going on. Compound that with the fact that I have no Mac and finding a cause will take some effort.

I see a couple possibilities. One, something about Mojave has changed (this is not uncommon, it seems every time Apple releases a new OS version they break something that previously was working fine with Gorilla) and one possibility is that the main window is not appearing at all. This is unlikely if you see the unlock window first and you mean you are "unlocking" when you say "login". But this is still possible, so a first test would be to try the "MacOSX (gorilla15372.zip)" file that is located at https://gorilla.dp100.com/downloads/. That one changed the embedded Tcl/Tk package to a version that worked with the Maverick update (again Apple breaking things) and so giving it a try would be worthwhile.

Another possibility is that something changed and MacOS is, for some reason, is positioning the main window off screen. So a first test for this is a question, does MacOS have a way to cycle through (likely a keyboard command) all open windows in a manner similar to the Alt+Tab keystroke on MS Windows? If yes, then try that to see if there is a Gorilla window available (but possibly positioned off screen). If yes, then there are may be two possibilities to fix.

First, if you can cycle to making Gorilla active in a way similar to MSWin's Alt+Tab key, then is there a way to initiate a window move by keyboard. There is a way to do so with MSWin, and the result is the window becomes "glued" to the mouse pointer, then dragging the mouse around causes the window to reappear. I use the trick on my work windows box when windows continues to position a window on a second monitor even though only one monitor is active. Unfortunately, due to the "I have no Mac" aspect, I do not know what the Mac equivalent keystrokes would be to "move a window on-screen".

Alternately, you can try renaming your preferences file (so Gorilla starts with default preferences) to see if that helps. The saved preferences file is stored in your logged in users home directory, in a file located at Library/Preferences/gorilla.rc

Rename that file to something else, then make sure you don't have a copy of gorilla running (kill off a running copy before trying to rename the file) and try starting a new session after the rename. If this fixes the issue, then you can edit the renamed file to remove all of the lines beginning with "geometry" and try restoring it to its original name and verify that Gorilla still appears.

If not, then could you try launching Gorilla from a terminal session (command window) to see if it outputs any error messages to the console when it disappears. If it does, please paste a copy of the error messages here.

Also, look in your users desktop on the mac to see if there is a file named "gorilla-debug-log.txt". If yes, attaching a copy of that file would be helpful (although it is unlikely you have one, because if you did it should have meant that you never got to the "unlock" window to try to unlock a safe.

namore commented 6 years ago

Hi I can confirm the issue on Macos 10.14: the main window (with all the accounts in a list) wont open after unlocking database.

I have a second MacBook still running 10.13 (with the same database synced via resilio-sync) and it is working fine.

If you mean by "login" that after "unlocking" Gorilla via the unlock window, the passwords window does not appear then please (if you can) indicate which version of Gorilla you are running on your Mac.

Exactly, that's the issue. The version is 1.5.3.7 (installed from Homebrew Cask).

(...) so a first test would be to try the "MacOSX (gorilla15372.zip)" file that is located at https://gorilla.dp100.com/downloads/.

I can unfortunately not run this version. MacOS reports the application is damaged (tried download+unzip two times) and should be moved to trash.

Another possibility is that something changed and MacOS is, for some reason, is positioning the main window off screen.

Meta+Tab cycles through applications and indeed shows Password Gorilla (but without main window). The About- and Help-Dialogues, however, can be opened. Using the "double-multifinger-tap" gesture on mouse (or "multifinger-move-up" gesture on touchpad) usually gathers all available windows. It wont show the PW-Gorilla main window, though, so I don't think the window is just misplaced.

Alternately, you can try renaming your preferences file (...)

Tried that too, without effect. I had to re-enter the path to my password database of course.

If not, then could you try launching Gorilla from a terminal session (command window) to see if it outputs any error messages to the console when it disappears. If it does, please paste a copy of the error messages here.

Negative again, no message appears after I enter the password.

Also, look in your users desktop on the mac to see if there is a file named "gorilla-debug-log.txt".

No such file either.

Update: Also, since I renamed the configuration file, Password Gorilla wont remember the path to its password database. I have to enter it manually each time I start Password Gorilla. Not that Password Gorilla is much use without the main window anyways.

rich123 commented 6 years ago
(...) so a first test would be to try the "MacOSX (gorilla15372.zip)" file that is located at https://gorilla.dp100.com/downloads/.

I can unfortunately not run this version. MacOS reports the application is damaged (tried download+unzip two times) and should be moved to trash.

Follow the link, highlighted in red, on the download page there immediately below the MacOS downloads that says: "IMPORTANT MacOS Gatekeeper information - Please read this if using a MacOS version.".

The file is not damaged, Apple's message for a "you are not allowed to run 'unapproved' programs on your own computer" error is what is damaged in this case. The page linked to from that link gives some ways that worked with prior MacOS versions to tell Gatekeeper "it is ok, let this program run anyway".

The other parts of your message indicate it is running, just without a main window (which is very odd).

Please give the updated copy a try using the "bypass gatekeeper" details at the link on the download page. Maybe the updated Tcl/Tk runtime will help the issue.

asergiychuk commented 6 years ago

Hi, I mean by "login" that after "unlocking" Gorilla via the unlock window, the passwords window does not appear. Yes, i can, my version 1.5.3.7

namore commented 6 years ago

Follow the link, highlighted in red, on the download page there immediately below the MacOS downloads that says: "IMPORTANT MacOS Gatekeeper information - Please read this if using a MacOS version.". ...

Oh sorry I have missed that link despite containing all-caps "IMPORTANT INFORMATION" and bold letters. ^^

Please give the updated copy a try using the "bypass gatekeeper" details at the link on the download page. Maybe the updated Tcl/Tk runtime will help the issue.

Good news! The application in gorilla15372.zip does open the main window. My configuration path to the password database is also stored again with this version! Thanks for your help!

rich123 commented 6 years ago

There is another option (maybe). Prior MacOS versions shipped with a full Tcl/Tk setup already installed as part of the base OS.

So you can also try browsing to the main Github page for Gorilla (https://github.com/zdia/gorilla), then pulling down the "Branch" selector and choosing the "Master" branch (likely auto-selected by default) then pressing the big green "Clone or Download" button and choosing the "Download Zip" link in blue at the bottom of the dialog that appears.

That will give you a zip file containing all the Tcl/Tk code for Gorilla. Unpack it somewhere, then you might try launching "gorilla.tcl" from a finder window. If that does not work, then open a command window, navigate to where the "gorilla.tcl" file is located, and type "wish gorilla.tcl" (without the quotes) to launch it.

If this works, and the main window appears after unlocking, then this highly implies that something changed in the new MacOS within the GUI interface between the version of Tcl/Tk in the official package and the new MacOS. This also will mean that there is a solution, but I do not know the delay because it will depend on Roy Keene's kit creator eventually being updated to a newer Tcl/Tk version compatible with the new GUI layer in the new MacOS.

asergiychuk commented 6 years ago

The application in gorilla15372.zip work! Thanks for your help!!!

rich123 commented 6 years ago

Ah, very good to know the newer Tcl/Tk in that file works with the new MacOS. I'll update the html of that page to indicate that it is needed for Mojave as well.

And, if any MacOS user out there knows how to create an app-pack for MacOS that will launch a Tcl/Tk script using the OS built in Tcl/Tk interpreter, I'd very much like to know how to do that as well.

rich123 commented 6 years ago

You might also try the gorilla15373.zip file on the same page. It overcomes another issue (#120) that was reported that also turned out to be related to the version of the Tcl/Tk GUI library code in the non-working file.

asergiychuk commented 6 years ago

gorilla15373.zip does not work and the processor is loaded. I attach screen

screenshot at sep 25 16-04-21
rich123 commented 6 years ago

Hmm. Yes, it really should not do that. What about the 15372 file? And what happens if you try the source directly (presuming Mojave still includes a native Tcl/Tk built in to the OS)?

jaypeeds commented 5 years ago

Same issue here, just curled a 15373 revision. Looking at the system log file during startup it reads: Sep 27 07:49:13 MacMiniJP gorilla.aqua[7335]: DEPRECATED USE in libdispatch client: dispatch source activated with no event handler set; set a breakpoint on _dispatch_bug_deprecated to debug

jaypeeds commented 5 years ago

Cloned the repo. On fresh mojave update (no additional patch) "wish gorilla.tcl" displays the tree of Login groups and is fully operational: Can open login, show password etc... Just retried revision 15372, and it seems to work as expected. Not sure if the successful startup from source has contributed to this or not. Let me try 15373 again... And 15373 keeps failing so:

As mentioned elsewhere, download by clicking on the link corrupts the zip archive, instead, open a terminal and type:

curl -o password-gorilla-15372.zip http://gorilla.dp100.com/downloads/gorilla.mac.15372.zip

rich123 commented 5 years ago

As mentioned elsewhere, download by clicking on the link corrupts the zip archive

Actually it does not corrupt the archive in the least. What clicking the link does is have Safari also set an extended attribute on the file that tells Gatekeeper "this file was a download from the internet".

Then when that same file is attempted to be launched, if the extended attribute is present, the gatekeeper message that appears is written to say "file is corrupt" when in fact nothing at all is wrong (which can be proven by deleting the extended attribute (see https://github.com/zdia/gorilla/wiki/MacOS-Gatekeeper#2016-05-28--gatekeeper-round-2 for instructions) after which the file (presuming it works with Mojave at all, it seems that the .3 file had some other bad incompatibility) will launch just fine.

Also very good to know that the source will run with the system installed Tcl/Tk. Now the task is to determine how to build an app. package that will launch a Tcl script using the system installed Tcl/Tk interpreter (the current Gorilla app. packages carry along their own private Tcl/Tk interpreter, which is why they break with each MacOS upgrade [although the true root cause there is Apple changing things that ought to be more stable]).

Rolice commented 5 years ago

At last I have managed to run the older version - 15372. The important point is documented in the article about MacOS Gatekeeper but for me it was hard to find. You only have to execute: xattr -d com.apple.quarantine Password\ Gorilla.app/.

There was no need to download the zip with cURL. Once you download the zip it will be automatically extracted. You need to run the command after that and everything will be working properly. If you do not execute the command to put the app out of the quarantine - you will receive an error for invalid application with the suggestion to move it to trash.

rich123 commented 5 years ago

If you have a suggestion on how to restructure the gatekeeper page to make the information easier to find, I am open to suggestions.

Rolice commented 5 years ago

The page has all the info, but I think is related clearly with the recent issues from macOS Mojave. Maybe extra pages containing the errors should redirect to this page, in order to became move discoverable by SE (Google, Bing!, etc).

Another idea is to create separate (temp)(wiki) page for Password Gorilla on macOS Mojave, for example.

PS: I was initially unaware that macOS Gatekeeper is the source of my issues.

rich123 commented 5 years ago

Done. New wiki page created with that title, and some explanatory text. Links to the download page and the Gatekeeper pages. Hopefully it will get recognized by search engines and floated up in search results for this issue.

PS: I was initially unaware that macOS Gatekeeper is the source of my issues.

This is a direct result of Apple's gatekeeper error message being an excellent example of a dark pattern. It is not at all informative as to what is the true cause, and the only text it does provide is deliberately misleading. Given that Apple is usually good at GUI and and human interface design it is surprising that such a dark pattern message made it out into the final product.

Rolice commented 5 years ago

Totally agree!

skratchdot commented 5 years ago

I ran into this same issue on Mojave.

To fix, I ran:

brew cask uninstall password-gorilla

Then I edited the contents of my cask:

brew cask edit password-gorilla

And I entered:

cask 'password-gorilla' do
  version '1.5.3.7.2'
  sha256 '4d026a5fa088fe9622cbe00c5811da2f360949c7cfb46ce6e4899a09645cb83a'

  # gorilla.dp100.com was verified as official when first introduced to the cask
  url "https://gorilla.dp100.com/downloads/gorilla#{version.no_dots}.zip"
  appcast 'http://gorilla.dp100.com/downloads/'
  name 'Password Gorilla'
  homepage 'https://github.com/zdia/gorilla'

  app 'Password Gorilla.app'

  caveats <<~EOS
    Gatekeeper may need to be temporarily disabled for the first launch.
    See https://gorilla.dp100.com/downloads/MacOS-Gatekeeper.html
  EOS
end

Then I reinstalled 1.5.3.7.2 by running:

brew cask install password-gorilla

Then, to fix the Gatekeeper issue, I ran:

cd /Applications/
xattr -d com.apple.quarantine Password\ Gorilla.app/
vcostin commented 5 years ago

For some reason after editing the cask on install always brew triggers an update process and copy the latest version. You can do brew cask edit password-gorilla and edit the file as suggested by @skratchdot here then run brew cask reinstall password-gorilla it will use the edited cask and copy the version you require.

niallor commented 4 years ago

This problem is also evident on macOS Catalina. Version 1.5.3.7.2 is needed to make the GUI appear after the user provides the password for the database. Will this all be solved in 1.6?

rich123 commented 4 years ago

I'm not at all surprised. Given all the reports of breakage with Catalina on the internet, having Apple also break Password Gorilla is simply normal Apple ativity.

The problem is not related to the specific Gorilla version (which means 1.6 will not fix it, because it is not Gorilla causing it). The problem is Apple keeps making breaking changes to the system user interface libraries they ship with MacOS, changes that cause older software to simply break mysteriously.

There will likely be no 'fix' for Catalina until the Tcl/Tk MacOS maintainer can patch Tk to fix the incompatibility that Apple created by the changes they have made. I presume the Tcl/Tk MacOS maintainer is quite busy playing catchup with the Apple created breakage, but I have no idea of when the fixes might get pushed out, nor when they would migrate into Roy Keene's kit creator to create a MacOS TclKit executable.

Apple (at least with past MacOS versions) did ship a system provided Tcl/Tk package. Presumably if they continued to ship Tcl/Tk as a system provided tool in Catalina, they would have also fixed their own breakage, so any workaround for now on Catalina is likely going to involve running the source package for Password Gorilla using the system provided Tcl/Tk interpreter on MacOS. And if you do have to run the source package to get it to work on Catilina, you might as well run the 1.6.0 beta2 version while you are at it.

Also, if you have any way to complain at Apple, directing complaints in their direction about the breakage they keep causing can not hurt. Doing so will likely not help, but at least they would know they are causing unnecessary problems for their users.