zdia / gorilla

Password Gorilla manages passwords
420 stars 60 forks source link

Getting Black Window After Opening PWG #224

Open francisd91 opened 2 years ago

francisd91 commented 2 years ago

Hi

First of all, I would like to say how good the product is, and excellent documentation and articles have helped me to resolve previous issues.

I have just upgraded from MacOS Catalina to MacOS Monterey and when I try to open PWG I now just get a black window appear instead of the log in window

On MacOS Catalina, I had already had previous issues which I managed to resolve: After downloading and unzipping both 15371 and 15372 I got the error message ''Password Gorilla' is damaged and can't be opened'. I managed to resolve this by downloading using curl. However, after logging into PWG, no window appeared so I used the command 'wish gorilla.tcl' which then worked perfectly! But now after upgrading to MacOS Monterey, this no longer works and instead of seeing the log in window, I just see a black window.

I would appreciate any help with this, thanks!!

rich123 commented 2 years ago

Ugh, I suspect Apple's made some additional change in Monterey that is now causing additional troubles.

Are you seeing the all black window when you do "wish gorilla.tcl" or when running one of the "app" packages? Your description sounds like you are seeing it after running "wish gorilla.tcl", and if this is so, this implies Apple possibly having made some change that has broken their own factory install of Tcl/Tk.

If you are seeing the all black after trying to run one of the packaged zip files then give the "wish gorilla.tcl" method a try and see if the factory installed Tcl/Tk works (which would still imply a change, just one that broke the Tcl/Tk that is part of the packaged file).

If you get the black window after running "wish gorilla.tcl" then please try just running "wish" in a terminal and report what you see.

If I do just 'wish' on my Linux system, then this is the window that opens. If you get a similar window (just with MacOS style borders) then that is helpful (as it means that maybe the factory install of Tcl/Tk is not completely broken).

wish

acidjunk commented 2 years ago

On a M1 mac: Screenshot 2022-09-23 at 12 16 52

But for me Gorilla (on a M1) works only with a zsh alias:

alias gorilla="cd Apps/gorilla;./tclkit-8.6.6-MacOSX-amd64-mk-tk gorilla-15372.kit"

francisd91 commented 2 years ago

Hi Rich123

Thank you for the quick response!

Yeh, to confirm I am seeing the black window when I do "wish gorilla.tcl" (I still see no GUI at all when run the 'app' package).

I tried 'wish' from the command line and just get a black window with MacOS style boarders

Thanks Francis

rich123 commented 2 years ago

Ok, next item to try. I extracted out just the initial windowing code for the "open a database" window that first pops up where you would normally enter you password. I am going to try to attach it here. If that works, can you save the file, then do "wish file" (where "file" is the name you used when saving it to your mac).

cut-gorilla.zip

On my Linux system when I run it the same way, I get these two windows (two is expected, as this is just the minimum code to draw the 'enter your password' lock window):

screen-shot

What I'm testing with this is to see if you also get a black window. If yes, then next I'll add some explicit colors to see if that changes anything. I'm wondering here if Apple changed the default colors somewhere and the result is a 'working UI' but with both foreground and background in black, making everything effectively invisible.

francisd91 commented 1 year ago

I have been able to try this now - I can see the two windows but unfortunately they are both still black!

acidjunk commented 1 year ago

Regarding the colors: I suppose it would help to know if @francisd91 is a DARK_MODE mac OS user.

francisd91 commented 1 year ago

Hi acidjunk

I am LIGHT_MODE Mac OS user

rich123 commented 1 year ago

I was wondering if maybe a 'dark mode' had been overdone by Apple, but since @francisd91 is in light mode, that is not the cause.

Ok, next to try setting some explicit colors.

cut-gorilla.v2.zip

Running the above on my Linux system results in this garish result:

screen-shot

francisd91 commented 1 year ago

Still get black windows but now see some buttons - I will attach what I see

Screenshot 2022-09-27 at 09 30 42
rich123 commented 1 year ago

Hmm, that is interesting. I expected either still all black, or a mostly yellow, window. But not white buttons and nothing else.

Lets try something very much simpler. From a terminal window, type just 'wish' and up should pop that little 2inx2in or so window, and the terminal should then display a % prompt.

Then type in the following:

label .l -text Label
button .b -text Button
grid .l .b

On my linux system, I get this window appearing after entering the 'grid' line:

screen-shot-1

I have a suspicion you'll continue to see "all black". If so, then try typing this in the terminal:

tk_bisque

I get this after typing that in:

screen-shot-2

If that does not help, then try:

tk_setPalette red

Which for me, gives this:

screen-shot-3

My fear is that you will report "all black" for every option. And if that is so, then what this means is that Apple has massively messed up something somewhere with their factory installed Tcl/Tk, and if that is the case, we can't make use of the factory Tk to work around the 'all black' issue anymore. If this is so, then the last think I can try is generating a new TclKit with Roy Keene's Kit Creator, and using it to wrap up a new Mac package, to see if not using the Apple factory Tcl/Tk install works any better.

rich123 commented 1 year ago

As a further test, here is a plain macos executable (inside a zip, as github only allows a limited number of file extensions to be attached) of the tip of the pre160 branch with a new 8.6.12 Tcl interpreter from Roy Keene's Kit Creator webpage.

gorilla-pre160-3dd07148dbe6b0bf3ae2599aad1f584a9defcedc-macos.zip

You will need to unzip, and may need to set the executable bit on the file [1] to make it executable. Then, to launch it, you will need to, from a terminal, type:

./gorilla-pre160-3dd07148dbe6b0bf3ae2599aad1f584a9defcedc-macos

Note, you can likely type "./gor" and then hit tab to get most of the filename completed, then type the remainder that may not complete.

[1] From a terminal, in the same directory as the executable, type:

chmod +x gorilla-pre160-3dd07148dbe6b0bf3ae2599aad1f584a9defcedc-macos

You can most likely use the same 'tab trick', type out part of "gorilla" then hit the tab key and most of the rest of the filename will be inserted by the shell for you.

francisd91 commented 1 year ago

As you predicted, I got a black screen for every option.

But thanks so much for the executable! That has done the trick - I can now see the GUI!

I did get an interesting error after entering the password and trying to open my current database:

Can not open password database "-errorstack {INNER {returnImm {unknown preference type: C} {}} CALL {my setPreferencesFromString CÒú‚º} CALL {::pwsafe::db4 setHeaderField 2 CÒú‚º} CALL {my readHeaderFields} CALL {::pwsafe::reader4 readFile pcv} CALL {pwsafe::createFromStream ::pwsafe::streamreader4 **** 3 pcv} CALL {pwsafe::createFromFile [path/Pass] ***** junk} CALL {OpenDatabase {Open Password Database} {} 1}} -errorcode NONE -errorinfo {unknown preference type: C while executing "error [ mc "unknown preference type: %s" $prefType ]" (object "::pwsafe::db4" method "::pwsafe::db::setPreferencesFromString" body line 21) invoked from within "setPreferencesFromString $value" (object "::pwsafe::db4" method "::pwsafe::db::setHeaderField" body line 7) invoked from within "$db setHeaderField $fieldType $fieldValue" (object "::pwsafe::reader4" method "::pwsafe::v3::reader::readHeaderFields" body line 58) invoked from within "readHeaderFields" (object "::pwsafe::reader4" method "::pwsafe::v3::reader::readFile" body line 123) invoked from within "$reader readFile $pcvp" (procedure "pwsafe::createFromStream" line 17) invoked from within "pwsafe::createFromStream $stream $password 3 $pcvp" (procedure "pwsafe::createFromFile" line 28) invoked from within "pwsafe::createFromFile $fileName $password $pvar "} -errorline 177 -code 1 -level 0": [Path]/Pass

But I am not too worried about this as I was able to create a new database and add back in the passwords I needed! Thank you very much for your help and persistence with this!

rich123 commented 1 year ago

Ah, glad to hear the updated executable fixed the issue (which again somewhat points a finger to Apple breaking their own Tcl/Tk factory install). As a MacOS user, if you have any way to report bugs in Catalina to Apple, you might consider reporting this "black screen" bug that Apple seems to have created.

rich123 commented 1 year ago

I've also now put the executable that is here on the gorilla downloads page at https://gorilla.dp100.com/downloads/.