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

The socket is not connected #68

Closed
HarHarLinks opened this issue Jan 20, 2021 · 8 comments
Closed

The socket is not connected #68

HarHarLinks opened this issue Jan 20, 2021 · 8 comments
Assignees
Labels

Comments

@HarHarLinks
Copy link

HarHarLinks commented Jan 20, 2021

I just installed keepass-natmsg from AUR and connected it to KeePassXC-Browser. After a short time (presumably the auto-lock time I configured in keepass hit), I got an error popup: The socket is not connected. Further info was copied to the clipboard:

System
  at System.Net.Sockets.Socket.Send (System.Byte[] buffer, System.Int32 offset, System.Int32 size, System.Net.Sockets.SocketFlags socketFlags) [0x00016] in <1af2426e91d1474d92e5d471c4ca8f95>:0 
  at System.Net.Sockets.Socket.Send (System.Byte[] buffer) [0x00000] in <1af2426e91d1474d92e5d471c4ca8f95>:0 
  at KeePassNatMsg.Protocol.Listener.SocketWriter.Send (System.String msg) [0x0000d] in <d64bd96a42c544e693ab1b295d35bc98>:0 
  at KeePassNatMsg.Protocol.Listener.UnixSocketListener.Write (System.String msg) [0x0000b] in <d64bd96a42c544e693ab1b295d35bc98>:0 
  at KeePassNatMsg.KeePassNatMsgExt.MainWindow_FileClosingPre (System.Object sender, KeePass.Forms.FileClosingEventArgs e) [0x00027] in <d64bd96a42c544e693ab1b295d35bc98>:0 
  at KeePass.Forms.MainForm.CloseDocument (KeePass.UI.PwDocument dsToClose, System.Boolean bLocking, System.Boolean bExiting, System.Boolean bEcas, System.Boolean bUpdateUI) [0x00063] in <e85355a0d0fa4c46a9a81e38a08fe566>:0 
  at KeePass.Forms.MainForm.LockAllDocuments () [0x00076] in <e85355a0d0fa4c46a9a81e38a08fe566>:0 
  at KeePass.Forms.MainForm.OnTimerMainTick (System.Object sender, System.EventArgs e) [0x000fe] in <e85355a0d0fa4c46a9a81e38a08fe566>:0 
  at System.Windows.Forms.Timer.OnTick (System.EventArgs e) [0x00008] in <4b6c441381804088ab0fff508a3fbabf>:0 
  at System.Windows.Forms.Timer.FireTick () [0x00000] in <4b6c441381804088ab0fff508a3fbabf>:0 
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.Timer.FireTick()
  at System.Windows.Forms.XplatUIX11.CheckTimers (System.Collections.ArrayList timers, System.DateTime now) [0x00083] in <4b6c441381804088ab0fff508a3fbabf>:0 
  at System.Windows.Forms.XplatUIX11.UpdateMessageQueue (System.Windows.Forms.XEventQueue queue, System.Boolean allowIdle) [0x00180] in <4b6c441381804088ab0fff508a3fbabf>:0 
  at System.Windows.Forms.XplatUIX11.UpdateMessageQueue (System.Windows.Forms.XEventQueue queue) [0x00000] in <4b6c441381804088ab0fff508a3fbabf>:0 
  at System.Windows.Forms.XplatUIX11.GetMessage (System.Object queue_id, System.Windows.Forms.MSG& msg, System.IntPtr handle, System.Int32 wFilterMin, System.Int32 wFilterMax) [0x0001c] in <4b6c441381804088ab0fff508a3fbabf>:0 
  at System.Windows.Forms.XplatUI.GetMessage (System.Object queue_id, System.Windows.Forms.MSG& msg, System.IntPtr hWnd, System.Int32 wFilterMin, System.Int32 wFilterMax) [0x00000] in <4b6c441381804088ab0fff508a3fbabf>:0 
  at System.Windows.Forms.Application.RunLoop (System.Boolean Modal, System.Windows.Forms.ApplicationContext context) [0x0034e] in <4b6c441381804088ab0fff508a3fbabf>:0 
  at System.Windows.Forms.Application.Run (System.Windows.Forms.ApplicationContext context) [0x00011] in <4b6c441381804088ab0fff508a3fbabf>:0 
  at System.Windows.Forms.Application.Run (System.Windows.Forms.Form mainForm) [0x00006] in <4b6c441381804088ab0fff508a3fbabf>:0 
  at KeePass.Program.MainPriv (System.String[] args) [0x0060e] in <e85355a0d0fa4c46a9a81e38a08fe566>:0 
Int32 Send(Byte[], Int32, Int32, System.Net.Sockets.SocketFlags)

Keepass didn't close, but was stuck in a non interactive state. I checked $XDG_RUNTIME_DIR/KeePass, which was empty. After a restart, the same directory contains KeePassIPC-9Bcig1wF-BC-P-61504.act and KeePassIPC-9Bcig1wF-Mutex-KeePassAppMutex.tmp.

The issue repeats when locking the DB per timeout or manually. I am using Arch Linux 5.10.8-arch1-1 with wayland/wlroots/sway/xwayland (stable non-git versions).

@smorks
Copy link
Owner

smorks commented Feb 5, 2021

sorry for taking so long to get back to you one this issue!

does this only happen after you have closed the browser? or does it not matter if the browser is closed or not? regardless, i believe i know what the problem is and will fix it when i have some free time.

thanks for the detailed report!

@smorks smorks self-assigned this Feb 5, 2021
@smorks smorks added the bug label Feb 5, 2021
@HarHarLinks
Copy link
Author

No worries :) Doesn't matter whether the browser is running. Thank you for supporting this plugin!

@HarHarLinks
Copy link
Author

This continues to be an issue.

@smorks
Copy link
Owner

smorks commented Aug 3, 2021

do you see a file called $XDG_RUNTIME_DIR/kpxc_server ?
or possibly /tmp/kpxc_server ?

@HarHarLinks
Copy link
Author

I currently have the browser extension "KeePassXC-Browser" Version 1.7.9.1 installed as well as keepass 2.48.1-1.
I don't have keepassnatmsg currently since it crashes my keepass, but I can install it if you need me to for debugging.

Currently neither of the kpxc_server files exist.

"/run/user/1000/kpxc_server": No such file or directory (os error 2)
"/tmp/kpxc_server": No such file or directory (os error 2)

@smorks
Copy link
Owner

smorks commented Aug 3, 2021

ok, understandable. i'll do some testing myself on linux, and i'll let you know what i find.

@smorks smorks closed this as completed in 6fdfc12 Aug 3, 2021
@HarHarLinks
Copy link
Author

Sounds like you fixed it 👍
Will you provide a (pre-)release binary with the fix?

@smorks
Copy link
Owner

smorks commented Aug 4, 2021

i should have a release out in the next few days. if i get too busy to finish what i want in it, i'll put out a pre-release binary for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants