-
Notifications
You must be signed in to change notification settings - Fork 42
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
Failed authenticating: Background task failed: Desktop request failed: 403 Forbidden #488
Comments
What desktop version are you using? |
Latest and couple previous version after major update. |
Ok, I'm not exactly sure what issue you're having. Your initial steps don't actually mention what's wrong. Please include a detailed description of what's not working, and add a screenshot or copy the error message if something is displayed to you. |
My trouble is that I can't connect extension to program. Title of this tread is error what I get always when I trying to connect. Error is: Failed authenticating: Background task failed: Desktop request failed: 403 Forbidden And if you tell me where I can find logs, I can give it for you. I have Windows 10 right now. |
You'd want to go into your extensions (assuming you're running chrome - it's a similar process on other browsers): And open the background page debugger: And then try connecting again. Please check the console and the network for any failed requests. Screenshots are valuable but please blur any |
Hmm, that error makes it sound like the client code used to authenticate the browser extension is not present in the desktop config. Have you reset or edited the desktop app's config in any way? Have you tried resetting the data in the extension and reconnecting? You can do this via the settings tab in the popup menu. |
I haven't touched any files either desktop or extension. |
@DawrFromUa About 403 error specifically: could you please have a look at your firewall settings to be sure Buttercup Desktop is allowed to communicate? I've encountered this error on two different setups at work and in both cases the firewall was preventing Buttercup Desktop from going through the firewall (even if it is on the same host). |
Seems that this could be a bigger problem that I'd have thought. I'm biased of course as I use Linux/Mac primarily and don't have firewall issues. I wonder if an alternative like this would be better suited than a proxy + port. That would negate some other issues where they'd like to have Buttercup listening on another logical machine, but I think this outweighs such issues. |
Under Windows, I can't remember if it's at launch the first time Buttercup desktop is launched or if it is after selecting Enable browser connectivity, but a window appears asking if we want to allow the application communicate through the firewall. Someone who doesn't allow it for whatever reason (not knowingly or thinking it doesn't need to communicate through internet or because they don't have the administrative rights) will never be asked again about this change, since a rule will have been written in Windows Defender firewall (I can't tell for other firewall application). A hint to this solution should at least be suggested to the user. @perry-mitchell I can't say if an alternative as proposed would fix the issue completely, but I'm willing to try it. |
Thanks a lot for your help @Oxalin. @perry-mitchell |
@la-pieuvre in this case I think you just don't start Buttercup or don't Enable browser access in Connections (on top of the desktop app in menu). |
Failed to fetch is usually when there's nothing listening - no port open, no desktop app running. I suspect the firewall is a big problem but it annoys me that showing some kind of helpful indicator to fix it is one of the only ways forward right now. |
I've rollback version to 2.XX for using on windows. |
@la-pieuvre if Buttercup Desktop is not running or if Enable browser access is disabled, the error I get is very similar, but not exactly the same (difference related to the OS maybe): So I would be inclined to think DawrFromUa's comment is right (Buttercup Desktop not running): #488 (comment) |
@DawrFromUa Under Windows Defender Firewall, when you say you've switched the two lines off, do you mean you unchecked them at the far left? And were you under Control panel > System and Security > Windows Defender Firewall > Allow an app or feature through Windows Defender Firewall? Because there is a second way to access the Windows Defender Firewall's settings, and it's through the Advanced settings under Control panel > System and Security > Windows Defender Firewall. There, you have better control of rules for both TCP and UDP. Rules must be enabled (checked) and they must be applied to the right network profile: if the rules are enabled on Private network, but yours is configured as a public network (Windows often sets networks as public even when they are private. You must then change the profile manually). That being said, I saw that even when the firewall is not properly set and an 403 error is returned, the extension may have been able to make a connection with Buttercup Desktop. In that case, the extension will first throw a 403 error, BUT if you close the tab and you click on the extension's icon, the "connect" button will have disappeared. You will even be able to see the vaults under the submenu icon and unlock them. Once it is done, you are able to see and search through your entries. I have to confirm if this scenario holds when the extension is fresh (after a fresh reboot). Update: it holds. I wonder why we receive a 403, when obviously the connection is active. |
I think I understand why the 403 error happens, why however the connection is active and we should be looking for. "netstat -anob" returns: It shows us that Buttercup is listening on any nework interface ([::] | 0.0.0.0), not just localhost (127.0.0.1). So Windows Defender Firewall (WDF) is first triggered because we are asking to listen to any interface, which supposes we may have incoming connections from "outside" the firewall. Whatever we answer to WDF to add or not a specific inbound rule, Buttercup Desktop will still listen and be able to catch connections coming from "inside" through localhost. So the extension sends a call (DESKTOP_URL_BASE = localhost:12822), Buttercup Desktop catches the call through 127.0.0.1 and answers correctly. Now this part is my interpretation of what must be happening: but somewhere along the way, the call from the extension is "blocked" by WDF because of Buttercup Desktop is listening at any interface. When the extension looks at the answers, it is able to establish a connection with Buttercup Desktop, but it still have to deal with the 403 produced by WDF. I had a look at Buttercup Desktop's code and I see we use "express" to communicate. On listen(), a port is set, but hostname is omitted, which tells express to listen to "any" interface. If we are to allow incoming connections from any interface on Buttercup Desktop side (which is a viable option, see FR #491), the extension has to be able to correctly determine that the connection has been established and discard the 403. |
So, when I told "switched the two lines off" I meant about Windows Defender Firewall with Advanced Security in Inbound Rules section. And answer for your question: Yes, buttercup is checked in this "Allow an app or feature through Windows Defender Firewall" as Private and Publick (true and true).
Yes, there is all as True (Enabled)
|
Just a side note: windows firewall won't return a 403.. this would involve the firewall setting up an intercepting HTTP server to respond with such a code. If the firewall rejects a connection it just stops it - there'd be no error response code if it was the firewall. 403 most likely came from the desktop application for some reason. We'd need to see the full desktop logs in that case. |
How to grub logs? Is app saving this? |
Yes of course, I may not have worded things correctly, but that's what I meant. While Buttercup Desktop can return a 403, I thought that the extension could interprete a ressource/port being blocked by a firewall as a 403. |
You need to enable secure file host in Desktop App. Then, restart browser and desktop app. Tested in:
|
Hi. |
I will try to replicate your environment. Please, let me know the versions of:
|
Hi, thanks a lot.
|
Hey, I saw the same issue and unchecked and then rechecked the checkbox and it fixed the issue for me |
i have the same issue. i get this error every time i open the extension. the desktop app is running and the enable browser access is checked. i can see my vault in the extension though. browser: firefox 126 |
@flying-pizza-69 404 not found is due to a resource not being present. Please try to reset the browser connection and try re-authenticating. Something is missing on the desktop side, it sounds like. |
perry-mitchell, it seems like it was a version mismatch issue, i was using the package from AUR. i downloaded the binary from github and it worked. thanks. |
@DawrFromUa Is this still occurring? @marcovidero Did you manage to replicate? If the desktop is installed from an up-to-date source and the extension too - then I suppose it could come down to Brave potentially. I don't have the resources to personally add it to the testing regime but I see no reason why it wouldn't work. |
I just experienced this issue too: after an app crash completely nulled the desktop.config.json to 0 byte...first got "No API client ID set" error in the browser extension...then after clearing browser extension cache "403 forbidden" and then after reset turning off/on secure file host in the desktop app and then an additional desktop client restart it works again. |
Unfortunately not. |
thanks! |
Same error for me, on Chrome 129.0.6668.101 on Win10. I tried turning off-then-on the secure file host option, but that didn't help. The connection works despite the error, and I can unlock/lock the vault from the extension, but the 403 error is concerning. What I can't seem to do is see any entries in the browser - it just says "No entries", so I think the 403 error is not benign. |
Hi there. I've got some problem after update.
I've made next steps:
What's wrong?
The text was updated successfully, but these errors were encountered: