koel / docker

A minimal docker image for the koel music streaming server.
https://hub.docker.com/r/phanan/koel/
MIT License
166 stars 54 forks source link

Can't login on mobile or with an app on my desktop added from my Koel website via the external URL. #167

Open SolninjaA opened 1 year ago

SolninjaA commented 1 year ago

Describe the bug Hi, I've noticed something strange with Koel recently, when I try to login via mobile or with an app on my desktop added from my Koel website via the external URL I can't login. It works fine when using the internal URL.

To reproduce Steps to reproduce the behavior:

Note: I'm unsure whether this behavior happens to other instances.

  1. Go to your Koel instance via mobile or through your PWA / desktop app from your Koel instance and use the external URL.
  2. Try to login.
  3. For me, you can't login.

Expected behavior You should be able to login on mobile and through a PWA / desktop app from your Koel instance via the external URL.

Environment

Additional context I use the official Docker image with Docker Compose.

andreknieriem commented 8 months ago

Same for me!

SolninjaA commented 7 months ago

It’s been a while since I last dealt with this problem, but I do remember some things. For starters, I remember there being some errors in the console regarding Cloudflare’s HTTPS redirect feature. Or at least some error in the console, as I said it’s been a while since I last dealt with this problem.

I realised a workaround that I’m still using. On a computer, I made a script that opens a browser with the Koel domain and then full-screens it. On mobile, I realised the error only happened on Firefox and not Safari (that’s all that I tested it on). So, I just used Safari. That is, until I purchased the Koel app.

If you are also using Cloudflare @andreknieriem, then that might shed some insight into this problem.

andreknieriem commented 7 months ago

I have fixed it now for me. In Desktop or mobile Chrome it worked, but not from the google. My logs told me nothing. But after several hours I find out, that my reverse proxy said something like tls handshake error eol and I could fix it, with a new lets ecrypt certificate exactly for my domain, not a wildcard domain certificate. Don't know why, but now everything works! And I am setting force_https to true.

SolninjaA commented 7 months ago

I’m glad to hear that it is working for you! I tried again with an Electron web app (or something of the like) and it mostly worked. I got past the login screen (which was as far as I got previously), but I had to refresh otherwise it was stuck on the dashboard. Then, I could play music.

What do you mean by:

In Desktop or mobile Chrome it worked, but not from the google.

Also, which reverse proxy do you use?

I do think I also had to set “force_https” to true, that definitely rings a bell. That was probably how I more or less fixed it.

luoluoqixi commented 1 month ago

How do I make koel support both http and https

  1. http://192.168.2.199:9003
  2. https://music.xxx.com