-
-
Notifications
You must be signed in to change notification settings - Fork 196
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
Firefox Plugin - NetworkError on Sign in #23
Comments
Can you try prefixing the address with |
I'm also getting a |
Hmmm, I wonder if it has something to do with the fact that your SSL certificates are not valid (according to the first screenshot). Is it possible to try disabling SSL and trying again with the |
I think the problem in my case was just that I forgot to update the container before trying the extension. |
Perfect! |
I wouldn't close this just yet. I'm not the person who opened the ticket (@nickrallison). Their issue may turn out to be different. |
Ops, sorry. |
I've updated the docker compose stack to the most recently release and changed the url to: http://100.98.101.100:23000/ and am still encountering the original issue |
Please try removing the trailing slash from the address, this is a bug I fixed but still not released. Sorry, one last try I promise :) If you can also capture the error logs from the browser’s console I’d be grateful! |
Removing the slash didn't work and the browser console was empty for about a minute after submitting the authentication. I printed "Here" right before submitting the log in The logs from each container also seem empty, the only one with anything interesting was the worker log which only contained job info as far as I can tell |
Ok, I'm out of ideas for remote debugging :D In chrome, typically, you can open the devtools tab for the "plugin" itself and inspect the network requests the plugin itself is doing. For example, here's how I debugged the trailing slash bug: Screen.Recording.2024-03-27.at.10.06.01.PM.movI'd expect that if you open the "extension"'s dev tools (not the page's dev tools), you'd find the error in the console logs and you can actually inspect the network request in the network tab. But I don't know how to do this in firefox. I don't want to waste your time too much. If you're willing to try to repo on chrome and share the error, that would be great. Another option is to share the tailscale node with me temporarily (I can send you my tailscale email), but I'd understand if you don't want to (tbh, I personally wouldn't share my tailscale node with anyone :)). Otherwise, I'm out of ideas on how to help :) |
Even more strange, Chrome works right out of the box, firefox still fails. Is it perhaps something strange with my firefox config? I have some strict rules and protections in place: https://github.com/arkenfox/user.js/ |
Oh interesting. Unfortunately, without logs from the plugin's devtool console (or its network tab), it's very hard to figure out why the plugin's requests are failing. |
Ok, now we're talking. Are you sure you're on the latest app version? I disabled the CORS policy in v0.10.0 (e6f6873). You being on < 0.10.0 would also explain why it's working on chrome and not in firefox (chrome plugin was explicitly allowlisted. To support firefox, I dropped CORS completely). If you're using |
No dice, I pinned it in my .env file: HOARDER_VERSION=0.10.1 but I'm still getting the same error in the console after a compose down and a compose up. Is there a way in the shell of the container to explicitly check the current version to see if it matches the env var? |
For now, I think one thing that changed in 0.10.0 is that in the worker logs (
now it says:
If you're on >= 0.10.0, you should see the latter. Also, can you share the output of:
This should show the CORS headers of you server. |
Same issue as @nickrallison on latest version 0.10.1 Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource ... CORS request did not succeed. |
Can you share the result of:
where |
One thing I did notice was that I said http://ip:port but in the inspect of the extension, I'm seeing https://ip:port. I'm not sure how the http got changed to https in the request.
|
CORS headers look correct and confirm that you're on at least |
Yup, on latest. No Https everywhere, just Ublock origin, privacy badger, bitwarden, you.
|
Yeah, I mean the headers you shared confirm that you're on the latest release. So the culprit is probably something else. And your |
I've disabled all other extensions and restarted firefox. No change still the same error and still converts from http to https. Could it be some policy inside firefox? |
It seems that firefox indeed has such a thing: https://support.mozilla.org/en-US/kb/https-only-prefs EDIT: And allows you to add some exceptions which can be useful in this case. |
I checked the setting, but it's currently disabled. Content-Security-Policy has an alert about upgrading insecure request. Still looking into that "feature" Edit: Is this set in the extension or site? |
I'm going to throw a valid cert on that machine and see if it works. That way we can figure out if that really is the problem or not. |
I tried it through a reverse proxy with a valid https certificate, same CORS error and dialog error message. I could put a cert directly on the box if you think that would help but I don't think it would make much difference.
|
@dyslexicjedi Do you happen to use the Arkenfox presets for firefox? |
@MohamedBassem No sorry, it's only internal @nickrallison No, it's Firefox packaged with Arch Linux. No real customization other than a few addons. |
I got a temporary instance publicly hosted here: https://hoarder.allisontech.ca/ Strangely it doesn't have the same problem. I suspect it is something to do with my HTTPS I added. Could I add you to my tailnet perhaps @MohamedBassem? It still has the same issue, do you have an email that works? |
I'm still getting CORS issues against your public instance. |
Yeah, it sounds like some weird https issue. I expect that the plugin won't work with an invalid or self-signed cert. On the other hand, @dyslexicjedi tried with a valid cert and faced the same problem :) Anyways, sent you an email (got yours from your github profile) with my tailscale email :) |
@dyslexicjedi Any chance it's a different CORS issue? For example, are you by any chance adding a trailing slash to the URL? :) This causes a CORS issue but a different one. A one that I already fixed in the extension version 1.1.1 :) I'm not getting any CORS issues in the public instance on firefox. |
So I was messing around with my nginx reverse proxy and CORS..... and I got it to work. My config:
|
I managed to repro the issue on @nickrallison's private instance (over tailscale). Basically CORS is failing because SSL is failing with You can repro this error by opening the Now, the question remains. Why tf is firefox forcing an upgrade to https :) |
@dyslexicjedi You're kinda sending the same headers that the server is already sending :D Did you try the combo of "valid cert + no trailing slash) without this hack? |
Yes, valid cert with no trailing slash was still failing. Only the nginx hack fixed it, but then again based on what you said previously. Firefox is communicating over a valid SSL cert to nginx and nginx is communicating over standard http to hoarder. so it's possible that nginx is solving the firefox SSL upgrade problem somehow. (not sure that made sense, but it kinda does in my head.) |
Ok, I have a minimal repro that's irrelevant to
Notice, that if you use It seems that firefox addons upgrades ANY http request to https regardless of the website. I don't know why this is happening to be honest. The next suspect would be maybe something in the plugin code itself? I'll check. |
I got it working, it was not the fix i would like but I forwarded my domain to a second local Nginx instance on a VM so not publicly. After adding https it works like it's meant to. Thanks for all the support, I'm content with a band-aid fix for now |
Perhaps another band aid would be a disclaimer to firefox users and the advice to host it publicly and disable sign ups once issue #52 gets resolved |
You don't actually need to host it publicly. You just need to have a valid certificate. You can get valid certs for non public domains with DNS challenge in Lets Encrypt. Most of my homelab is non-public (only via tailscale) and has valid certs. EDIT: #52 is a misunderstanding :) DISABLE_SIGNUPS works. |
I'm facing this same issue (confirmed looking at the extension console logs) and hosting through cosmos with a custom domain. The site is publicly accessible with https. Any tips on how to fix it with this setup? |
@MohamedBassem amazing, that worked, thank you! |
Is there any plan for fixing this? Setting up SSL for just that would be a hassle? |
@lucius346346 to be honest, I'm not entirely sure if this something that can be "fixed" or if it's a firefox restriction that can't be bypassed. So far, I didn't find any reference online stating this requirement and I'm not entirely sure what needs to be fixed. |
having same issue on both chrome, edge, waterfox and firefox. ios app works fine |
added csp rule to allow firefox to connect to http endpoints
So I found the solution here: https://discourse.mozilla.org/t/mv3-default-csp-override-upgrade-insecure-requests/110443 I tried it out locally and could confirm that it works (using the published extension and modifying it) I also tried the local build but that did not work, as the build seems to output invalid manifest versions for Firefox. @MohamedBassem maybe we can talk in Discord to get this fixed? the dev build does not seem to work and the "build" target seems to not include the js file in the index.html? |
@kamtschatka this is a great find! I didn't know that firefox adds Regarding the local build, |
I've just released v1.2.1 to the mozilla store with @kamtschatka. If anyone was facing this problem, please give it a shot and let us know how it goes. |
When I try to connect to my instance of hoarder on a Tailscale IP and a non standard port, it works on a webpage but doesn't seem to work in a browser extension:
Web page:
Browser extension:
The text was updated successfully, but these errors were encountered: