dlech/Keebuntu

With any of the tray plugins installed, keefox does not recognize keepass

ernstblaauw opened this issue · 15 comments

Hi,

First, thanks for all your hard work!
I'm running galliumos 2.0 beta (based on xubuntu) on my chromebook and I wanted to add a tray icon. Therefore, I tried your plugins:
keepass2-plugin-application-indicator
keepass2-plugin-status-notifier
keepass2-plugin-tray-icon

However, if any of those plugins is installed, keefox does not see the keepass database anymore. So, I cannot use that extension to fill in my passwords automatically.
As soon as I uninstall the extension, it works again.

Could you look into this issue?
Many thanks,
Ernst

dlech commented

I use keefox as well and have not had a problem with this. Do you install the keepass2-plugin-rpc from ppa or do you manually install the KeePassRPC.plgx plugin? Is there any stack trace printed if you run keepass2 from the command line?

I did install the plugin manually, but I just tested with the ppa version and then I have the same behavior.
In the terminal with your indicator plugin installed, I see multiple SendMessage lines.
If I uninstall the indicator plugin, then I see only one line.

dlech commented

The SendMessage lines are normal. Do you have any other plugins installed? Have you tried with a new database?

I do not have other plugins installed. I'll try with a new database this weekend.

I discovered the bug is co-existing with the inability to copy passwords to the clipboard: as soon as I double click on a password, Keepass2 freezes. This only happens when using a plugin of your ppa, without plugin this copying to clipboard just works. I can only quit Keepass2 by pressing ctrl-c on the command line.

Do you know if there is a command line option to show more verbose output?

dlech commented

I should have asked long ago, which versions of the plugins are you using? Which version of Ubuntu is your OS based on?

You can try keepass2 --debug, but I don't expect that it will turn up anything useful.

Hi,

  • I'm running GalliumOS 2.0 beta. That's a derivate of Xubuntu 16.04 and tailored for Chromebooks.
  • What's interesting: I had version 2.33 installed from jtaylor's ppa (https://launchpad.net/~jtaylor/+archive/ubuntu/keepass). So, I downgraded to 2.32 from Xenial's repositories.
    It looks like 2.32 has a little bit more verbose output. If I double click an entry in the database, I get an error in the console:
System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: x
  at System.Windows.Forms.ListView.HitTest (Int32 x, Int32 y) <0x421981a0 + 0x0045f> in <filename unknown>:0 
  at System.Windows.Forms.ListView.HitTest (Point point) <0x42198170 + 0x0001f> in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.ListView:HitTest (System.Drawing.Point)
  at KeePass.Forms.MainForm.OnPwListMouseDoubleClick (System.Object sender, System.Windows.Forms.MouseEventArgs e) <0x42197d00 + 0x00087> in <filename unknown>:0 
  at System.Windows.Forms.Control.OnMouseDoubleClick (System.Windows.Forms.MouseEventArgs e) <0x42197c70 + 0x00065> in <filename unknown>:0 
  at System.Windows.Forms.ListView+ItemControl.HandleClicks (System.Windows.Forms.MouseEventArgs me) <0x42196d80 + 0x00053> in <filename unknown>:0 
  at System.Windows.Forms.ListView+ItemControl.ItemsMouseUp (System.Object sender, System.Windows.Forms.MouseEventArgs me) <0x42196830 + 0x00067> in <filename unknown>:0 
  at System.Windows.Forms.Control.OnMouseUp (System.Windows.Forms.MouseEventArgs e) <0x421967a0 + 0x00065> in <filename unknown>:0 
  at System.Windows.Forms.Control.WmLButtonUp (System.Windows.Forms.Message& m) <0x421964c0 + 0x00118> in <filename unknown>:0 
  at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m) <0x41f999f0 + 0x00217> in <filename unknown>:0 
  at System.Windows.Forms.ListView+ItemControl.WndProc (System.Windows.Forms.Message& m) <0x42048510 + 0x000ff> in <filename unknown>:0 
  at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.Forms.Message& m) <0x41f999c0 + 0x00024> in <filename unknown>:0 
  at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) <0x41f99980 + 0x00036> in <filename unknown>:0 
  at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr wParam, IntPtr lParam) <0x41f982c0 + 0x0031c> in <filename unknown>:0 

Sometimes it looks a little bit different:
 SendMessage (46137372, 0x444, 0x1, 0x1fbdc10)
System.NullReferenceException: Object reference not set to an instance of an object
  at KeePass.Forms.MainForm.OnPwListMouseDoubleClick (System.Object sender, System.Windows.Forms.MouseEventArgs e) <0x403cf5e0 + 0x0030d> in <filename unknown>:0 
  at System.Windows.Forms.Control.OnMouseDoubleClick (System.Windows.Forms.MouseEventArgs e) <0x403cf550 + 0x00065> in <filename unknown>:0 
  at System.Windows.Forms.ListView+ItemControl.HandleClicks (System.Windows.Forms.MouseEventArgs me) <0x403cec40 + 0x00053> in <filename unknown>:0 
  at System.Windows.Forms.ListView+ItemControl.ItemsMouseUp (System.Object sender, System.Windows.Forms.MouseEventArgs me) <0x403ce6f0 + 0x00067> in <filename unknown>:0 
  at System.Windows.Forms.Control.OnMouseUp (System.Windows.Forms.MouseEventArgs e) <0x403ce660 + 0x00065> in <filename unknown>:0 
  at System.Windows.Forms.Control.WmLButtonUp (System.Windows.Forms.Message& m) <0x403ce380 + 0x00118> in <filename unknown>:0 
  at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m) <0x401d44c0 + 0x00217> in <filename unknown>:0 
  at System.Windows.Forms.ListView+ItemControl.WndProc (System.Windows.Forms.Message& m) <0x402844f0 + 0x000ff> in <filename unknown>:0 
  at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.Forms.Message& m) <0x401d4490 + 0x00024> in <filename unknown>:0 
  at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) <0x401d4450 + 0x00036> in <filename unknown>:0 
  at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr wParam, IntPtr lParam) <0x401d2d90 + 0x0031c> in <filename unknown>:0 

I do not have this without plugin. I only tested this with the keepass2-plugin-application-indicator

$ sudo apt-cache policy keepass2-plugin-application-indicator 
keepass2-plugin-application-indicator:
  Installed: 0.4.9+0.6.0
  Candidate: 0.4.9+0.6.0
  Version table:
 *** 0.4.9+0.6.0 500
        500 http://ppa.launchpad.net/dlech/keepass2-plugins-beta/ubuntu xenial/main amd64 Packages
        500 http://ppa.launchpad.net/dlech/keepass2-plugins-beta/ubuntu xenial/main i386 Packages
        100 /var/lib/dpkg/status
     0.4.7+0.5.7 500
        500 http://ppa.launchpad.net/dlech/keepass2-plugins/ubuntu xenial/main amd64 Packages
        500 http://ppa.launchpad.net/dlech/keepass2-plugins/ubuntu xenial/main i386 Packages
  • With a new database, I got the same behavior.
    What can I do to help you?
dlech commented

I can't think of how the Keebutu plugins could affect any of the code shown in the stack traces. There must be some kind of race condition(s) or other Mono bug(s) exposed by running on the chromebook. I don't have a chromebook to test with. You could try installing monodevelop and clone this repository and run it that way.

Also, I don't know if this works outside of the debugger, but you can try setting the environment variable MONO_TRACE_LISTENER=Console.Error when running KeePass.

Hi,
Maybe I will try cloning the directory later. Setting the variable doesn't work.
Currently, I just let Keepass hide (I disabled Keepass2 in the task bar) en just press the shortcut to open Keepass2. Thanks for all your help, maybe it will be solved in the future by some mono bugfix.

dlech commented

One more thing to try:

MONO_TRACE_LISTENER=Console.Error mono --debug --trace /usr/lib/keepass2/KeePass.exe --debug

maybe it will be solved in the future by some mono bugfix.

The windows forms code has been unmaintained in mono for many years. It is unlikely that it will ever be fixed unless you fix it yourself.

Hello,
i have something like that how looks bad !
with the plugin-indicator or plugin-tray-icon
make a copy of pasword or login in keepass2 freezes keepass2 if one of these plugin are installed.

with ubuntu xenial and keepass2.33 (i tried with manual copy of keepass2.34 too)
i tried too with your beta repository , this seems to be a misuse with mono :-(

hello,
installing mono 4.4.0 beta3 fix my copy freezing with keepass2
see http://www.mono-project.com/docs/getting-started/install/linux/#debian-ubuntu-and-derivatives
to add it

Works here too :-). Thanks!

Hi there. So, in order to avoid the appindicator plugin both (1) freezing KeePass and (2) not integrating with KeeFox, we should do the following, yes?

echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
sudo apt-get update && sudo apt-get upgade

OK, well that's installing a load of mono updates . . I'll report back on whether they fix the two problems.

Well, goodness! It actually works. Both problems seem fixed!

dlech commented

Closing since this looks like a mono bug that has been fixed in mono.