KeeAnywhere
KeeAnywhere copied to clipboard
[Windows <10 only?] System.Exception: No unused port found!
KeePass 2.48.1 KeyAnywhere 2.0.3 Windows 7 x64
In KeyAnywhere Settings, Accounts,
When I attempt to add an account of type Dropbox, Dropbox-Restricted, Google Drive, HiDrive, and OneDrive, there is an error message "System.Exception: No unused port found!"
There is also a hang for a few seconds before the error message displays, for all of those except the two Dropbox options. The two Dropbox options instantly display the error.
Thanks !!
Same happens to me
Which Windows Version are you using? Do you have any user or firewall restrictions?
Could you try to start KeePass with admin/elevated permissions? The ports are only required for authentication. Once authenticated you can use KeeAnywhere without any elevated permissions.
Am Fr., 2. Juli 2021 um 00:18 Uhr schrieb Onur Uslu < @.***>:
Same happens to me
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Kyrodan/KeeAnywhere/issues/301#issuecomment-872584538, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACWW2SN2HMMY45JCVONOK3TVTSTFANCNFSM47ODOLWA .
Which Windows Version are you using? Do you have any user or firewall restrictions? Could you try to start KeePass with admin/elevated permissions? The ports are only required for authentication. Once authenticated you can use KeeAnywhere without any elevated permissions. Am Fr., 2. Juli 2021 um 00:18 Uhr schrieb Onur Uslu < @.***>: … Same happens to me — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#301 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACWW2SN2HMMY45JCVONOK3TVTSTFANCNFSM47ODOLWA .
Hi @Kyrodan,
I'm so sorry for the late response.
-
Which Windows Version are you using? I'm using Windows 8.1.
-
Do you have any user or firewall restrictions? I'm the admin user on the computer. I don't have any restrictions. I'm getting the error even if I deactivate all protection functionalities of my antivirus (including antimalware, firewall, etc.).
-
Could you try to start KeePass with admin/elevated permissions? I started using the "Run as administrator" button on the context menu, but it did not solve the problem.
By the way, I'm using "Keepass 2.47" and "KeeAnywhere 2.0.3".
Thank you
I confirm that 2.0.3 fails authentication (on Windows 8.1) unless KeePass is Run as Administrator. This is a serious issue that urgently needs to be fixed. Otherwise I will have to stop recommending it. Thank you.
Hi John,
thank you for your feedback. I know this is an issue and maybe someone would even stop using it. That's okay for me. But please do not demand something from an author of a free software in this kind of manner. I develop it in my spare time and this not my main job. I release it and you can use it or not. If you file a bug, maybe I take a look into it. Treat it like a gift or free beer, but never ever explain about it that way.
If you would like to fix this issue you are welcome to file a pull request. If you are not a programmer then maybe you could find the reason for the different behavior between Windows 8.1 and 10.
Thanks and regards, Daniel
John Navas @.***> schrieb am Mo., 19. Juli 2021, 18:51:
I confirm that 2.0.3 fails authentication (on Windows 8.1) unless KeePass is Run as Administrator. This is a serious issue that urgently needs to be fixed. Otherwise I will have to stop recommending it. Thank you.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Kyrodan/KeeAnywhere/issues/301#issuecomment-882701828, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACWW2V27TYPKDMAOOLSPY3TYRJ2JANCNFSM47ODOLWA .
@Kyrodan
Please don't presume to tell me what to do.
I'm an experienced, expert software professional with both FOSS and non-FOSS to my credit. When I offer software to the public, I make a commitment, because those who use it deserve my best work and to not be harmed. Making it free does not relieve me of that responsibility. You may not care about your reputation, but I care about mine, deeply.
When I recommend software to colleagues, clients, and the public, I likewise put my reputation on the line, because they expect me to carefully vet my recommendations and to stand behind them. That's why I cannot recommend unsupported software.
Lastly, if you do want help, then you might not want to start with criticism.
"If you can't stand the heat, get out of the kitchen."
@JNavas2
I'm an experienced, expert software professional with both FOSS and non-FOSS to my credit.
If you are a FOSS-Developer, I'm sure you wouldn't discuss topics the way you do. Take a look to your reported issues in other repositories, it's often the same. Maybe you have FOSS activities, maybe not - none a filed in your GitHub Profile.
When I offer software to the public, I make a commitment, because those who use it deserve my best work and to not be harmed. Making it free does not relieve me of that responsibility. You may not care about your reputation, but I care about mine, deeply.
You can do it that way in your projects. But that's not my understanding and I always make this clear.
That's why I cannot recommend unsupported software.
Come on, stop dreaming! In FOSS there is no support you can rely on unless you pay for it or a company is supporting the project. I'm a single developer - like many others - that is doing it in their spare time. Help is appreciated but your kind of comments are clearly unwanted by me.
I think we should stop this discussion here, we put all our arguments in this issue.
If you find a proper way to support Windows 8.1, please file a PR. Otherwise I don't think this issue will be fixed by me: I don't have the proper ressources for this.
Can someone with this problem please post the output of
netsh int ipv4 show dynamicport tcp
On windows 10 it looks like
Protokoll tcp Dynamischer Portbereich
---------------------------------
Startport : 49152
Anzahl von Ports : 16384
Can someone with this problem please post the output of
netsh int ipv4 show dynamicport tcp
On windows 10 it looks like
Protokoll tcp Dynamischer Portbereich --------------------------------- Startport : 49152 Anzahl von Ports : 16384
@Kyrodan It looks like the same on Windows 8.1
Protocol tcp Dynamic Port Range
---------------------------------
Start Port : 49152
Number of Ports : 16384
Note: When I see the new messages in the issue, I tried to use the "Run as administrator" button again. It worked, and I don't get errors anymore. I have no idea why it didn't work before.
@Kyrodan I don't appreciate your comments, and as I warned, I don't use or recommend unsupported software, so I'm not going to invest any more time here. We'll just have to agree to disagree (on pretty much all counts it seems). But I do appreciate you pushing me to step back and take a hard look at why I was using a plugin in the first place.
The basic reason is that KeePass lacks cloud support, but, as the saying goes, "there's more than one way to skin a cat," and virtual drive is a better way (for a number of reasons) to access the cloud. Since I use Google Drive, which has virtual drive capability, it was a no brainer: I simply moved my KeePass files from OneDrive to Google Drive, where KeePass now accesses them via virtual drive without any plugin.
I also use Keepass2Android, and it has cloud support, so that was just a simple reconfiguration.
KeePass is now working better than before, with no plugin needed. So I thank you, and bid you a heartfelt farewell. (Feel free to have the last word.)
p.s. For those who prefer to use a cloud service other than Google Drive, it's easiest to use one with virtual drive capability, but you can otherwise use Mountain Duck. (It's also possible to use OneDrive with Windows native Network Drive functionality, but it's a hassle to set up properly.)
KeePass 2.48.1 KeyAnywhere 2.0.3 Windows 7 x64
Same issue, but if I run it as Administrator, it works fine.
Can someone with this problem please post the output of
netsh int ipv4 show dynamicport tcp
Windows 7 x64:
Protocol tcp Dynamic Port Range
---------------------------------
Start Port : 49152
Number of Ports : 16384
Hi, I too am having this issue. In my case, with Google Drive.
KeePass 2.48.1 KeeAnywhere 2.0.3
Windows 7 x64
Protocol tcp Dynamic Port Range
---------------------------------
Start Port : 1025
Number of Ports : 64510
For me, starting KeePass as administrator got it to work, but that defeats the point. When I launched KeePass as a regular user, the account was missing from the account list again. This makes sense; presumably the KeeAnywhere account details are stored in the user's AppData.
Interestingly, this very same laptop was previously using KeeAnywhere 2.0.3 successfully. This didn't just appear when I updated. To my knowledge there's no user limitations or firewall restrictions (that I've put in place) that would cause a problem. Temporarily disabling antivirus did not help.
Here's the full error message details, if it's helpful. ka error output.txt
I'm afraid I'm not much of a C# programmer, but I would like to get this fixed and I'm happy to help however I can. Please let me know anything I can do.
@Kyrodan
Could you test localhost
, not 127.0.0.1
?
// KeeAnywhere.OAuth2.OidcSystemBrowser
private static string CreateRedirectUri(int port)
{
return "http://localhost:" + port + "/";
}
It sounds ridiculous, however windows denies http://127.0.0.1:49215/
without administrator privileges but it allows http://localhost:49215/
.
attached gist to test this problem. paste into test project. https://gist.github.com/finejustice/908e63d5b7e57cf69039f10ad21d8095
tested in Windows 7 x64.
@finejustice @Kyrodan It works! I tried changing the Oidc URI to localhost and it fixed the problem at least for Google Drive on Windows 7 x64.
More background on this bug: It seems like this might be due to an undocumented ~bug~ feature in HttpListener (actually down in HTTP.sys). You have to "reserve" the URL you intend to listen on if you're not Admin, which is even more problematic for dynamic ports. Google turns up a whole family of results. One random comment suggests that @finejustice 's workaround succeeds because "localhost" is somehow treated differently. Seems like basing off of something called tcplistener can also avoid the problem?
Completely Unanswered Questions
- Why doesn't this appear to matter on Win10?
- Why was my laptop working previously? It could be instructive to try netsh http show urlacl to view these "reservations" on different systems that have and don't have this issue.
I just tried it in Windows 10 and it seems to work here too.
Faced this issue too. In my case, with Google Drive
All works just fine on my home laptop with Win 11, but it doesn't on work desktop with Win 8.1.
Win 8.1, KeePass 2.51.1, KeeAnywhere 2.0.3 "Run as administrator" has solved that problem. Saved settings to KeePass configuration just in case. But I do wait for fix of this bug, moreover the solution is one-line change (thx to Jackabomb).