mirror of
https://github.com/tubearchivist/browser-extension.git
synced 2026-03-23 20:37:07 +00:00
[GH-ISSUE #47] Cannot connect to server error #30
Labels
No labels
bug
bug
duplicate
enhancement
help wanted
invalid
not an issue
not an issue
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
tubearchivist/archived-browser-extension#30
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @tehniemer on GitHub (Oct 11, 2024).
Original GitHub issue: https://github.com/tubearchivist/browser-extension/issues/47
I'm unable to connect this to my server, every attempt ends with a
Could not connect to servererror. I've verified my URL and API are correct, even generated a new API key, nothing helps.Not sure what my next steps should be.
@Protonova commented on GitHub (Oct 15, 2024):
Just my two cents here... I had a similar problem. Are you running Traefik? Have you tried removing
https://? For example on my installation I havetubearchivist.***.***.com:70817081 being the port I have the load balancer running on (can be anything on your end).@tehniemer commented on GitHub (Oct 15, 2024):
I am running Traefik and tried your suggestion with no change in behavior.
@Protonova commented on GitHub (Oct 16, 2024):
Then there's something wrong with your traefik config. I'm not sure if this is the right place for this issue to be opened. I'm just randomly contributing since I had the same issue a few hours ago when I put TA behind the load balancer.
If the admins don't mind, sure I'll help troubleshoot the issue. You need to share the labels you're using for traefik in your docker. As well as the configs you have for your traefik instance. Please share them using code blocks and remember to remove sensitive information :)
@tehniemer commented on GitHub (Oct 16, 2024):
Thanks, I appreciate it. I've tried with and without Authelia, which has a global bypass rule for
'^/api([/?].*)?$'Here's my relevant compose stack:
Traefik config:
@Protonova commented on GitHub (Oct 16, 2024):
Nothing crazy pops out, I'll take a better look after dinner. However, I noticed that you have:
I am assuming that this is a local wildcard domain you're using? If so I suggest allowing local network access. If not, confirm that you can ping/nslookup/dig the TA server. Also ensure the path it takes is the correct network hops you expect.
As far as your labels go:
I would also add (just to ensure the headers are passed through the balancer:
@tehniemer commented on GitHub (Oct 16, 2024):
I'm not using Traefik for serving anything locally, it all goes through Cloudflare. Adding the load balancer label didn't change the behavior, and according to the Traefik docs, host headers are passed by default. I bypassed Traefik locally and the companion does connect, so you're right something is up with my reverse proxy.
I've been scouring logs and can't seem to find anywhere that indicates the companion is getting through to Traefik, I'm now wondering if it's getting stopped by Cloudflare.
@Protonova commented on GitHub (Oct 18, 2024):
Sorry it's been a crazy busy week for me. Have you had any luck in finding the issue? As I suspected it wasn't related to the TA companion. I would say just start troubleshooting 1 by 1.
@MightyDjinn commented on GitHub (Oct 24, 2024):
This is due to the proxy intercepting the request to the api (Which uses its own api keys). Add a configuration like this:
@tehniemer commented on GitHub (Oct 24, 2024):
I have that rule in my Authelia config, which is working for other services that use an API for access, furthermore the behavior here is the same whether Authelia is in the middle or not. I'm unable to see this subdomain pop up in any cloudflare or traefik logs, so I'm a bit stuck at the moment.
@bbilly1 commented on GitHub (Nov 8, 2024):
Do we have any logs? Do you see the requests coming in to TA when opening the extension popup? But that sounds mostly like a reverse proxy issue.
@tehniemer commented on GitHub (Nov 17, 2024):
I think you're probably right, if I use the host IP and port in the extension it works, I'll close this issue.
@welshtralian commented on GitHub (Nov 18, 2024):
Authelia can be a royal pain in the arse sometimes. I inspected the extension and was getting CORS errors (same with another extension, say 2FAuth). Like you have /api globally bypassed on the Authelia config but it wasn't having it.
What you have to do is create an auth bypass with Traefik. Shouldn't be much of a security risk because one still has to provide an API key for this extension to work.
This is with Traefik 2, 3 should be similar replace your Routers with:
Edit: You may also need to add a line to add the bypass router to the service like this:
- 'traefik.http.routers.tubearchivist-rtr-bypass.service=tubearchivist-svc'