jellyfin / jellyfin-android

Android Client for Jellyfin
https://jellyfin.org
GNU General Public License v2.0
1.54k stars 249 forks source link

Android APP won't connect to server when using domain #786

Closed x0Z3ro0x closed 3 months ago

x0Z3ro0x commented 2 years ago

Describe the bug

  1. Enter in my domain
  2. Get told "Tried X candidates for input, without success."

I expect the APP to connect me to my server. The domain and ports are operating properly to my knowledge as friends and myself can access it outside the network using my domain. This works on all browsers. It's only the APP in which the domain doesn't work. Trying my direct IP and port allows the APP to work, it's just the domain that doesn't work with the APP.

Logs

N/A This is on a phone. On windows everything works as intended. Would these logs still help you since the issue is on the phone and not my computer? If so I am happy to provide :)

Application version

2.4.4

Where did you install the app from?

Google Play

Device information

Samsung Galaxy S21 Ultra 5G

Android version

Android 11

Jellyfin server version

10.8.4

Which video player implementations does this bug apply to?

nielsvanvelzen commented 2 years ago

What happens when you open the exact same URL that you entered in the app in a browser? Does it show certificate warnings or something? How did you configure the networking? Did you use a reverse proxy? Do you have a VPN or anything?

We need some more details about your setup to help out.

x0Z3ro0x commented 2 years ago

When using a browser everything works correctly. Both inside and outside of the network. It shows not secured due to still trying to figure out how to add my own SSL Cert.

The networking is configured to allow remote access and both http and https ports have been forwarded.

I do not use a reverse proxy. Instead I pointed the domain to my servers IP.

Yes I own a VPN however it is NOT used for the Jellyfin server.

x0Z3ro0x commented 2 years ago

Here is a picture of the network settings to eliminate any confusion -

ImgBB Screenshot

x0Z3ro0x commented 2 years ago

What happens when you open the exact same URL that you entered in the app in a browser? Does it show certificate warnings or something? How did you configure the networking? Did you use a reverse proxy? Do you have a VPN or anything?

We need some more details about your setup to help out.

Anything else you need?

x0Z3ro0x commented 2 years ago

What happens when you open the exact same URL that you entered in the app in a browser? Does it show certificate warnings or something? How did you configure the networking? Did you use a reverse proxy? Do you have a VPN or anything?

We need some more details about your setup to help out.

You coming back anytime soon? Is this an issue with the APP, or something I can fix on my own? It would be nice to get this solved.

Maxr1998 commented 2 years ago

Patience, please. :wink: This is most likely an issue with your setup, since the app works fine for plenty of other people.

Anyhow, logs from the phone would definitely be appreciated, since we can then see which candidates it tried and the exact error messages. Feel free to do a find & replace on the log to replace your domain with something like jellyfin.example.org. If you need assistance capturing those logs, there is a guide linked in the issue template when creating a bug report ticket.

x0Z3ro0x commented 2 years ago

I thought I was being patient when I waited for 3 days before asking if @nielsvanvelzen was going to return anytime soon. That's my fault for assuming that when Neilsvanvelzen replied it meant they were actively assisting me. I must have caught them at the start of their vacation (safe travels by the way).

The three pages of reddit and google posts I've went through suggest plenty of users are having issues using domain names on your APP. Most likely due to not having clear enough instructions on what is required from a domain to work with your APP. The domain works on every platform except your APP. Suggesting that the APP isn't resolving the domain properly, according to my domain provider.

Additionally I read your guide linked in the issue template and saw that it required the use of a command prompt which I am sure you are aware, isn't present on a phone. The issue template said you wanted client logs, not server logs. The client in this case is the phone. So is there another method of which I can provide those logs from the phone or do you want the server logs instead? Either way I am happy to provide those.

At the time of writing this I have already found other solutions to meet my needs outside of jellyfin and it's APP. However I am happy to stay and help you find out why the APP is being so finicky or at the very least get better information on what is required to use domains on your APP so that other users can have an easier, better experience in the future.

Have a great day!

Y0ngg4n commented 2 years ago

I have the same issue. But i am using a traefik reverse proxy.

tr1p0p commented 1 year ago

Yeah same issues. So, yeah it's not working fine for a lots of others peoples, it seem...

x0Z3ro0x commented 1 year ago

Just use plex on a dedicated server.

On Thu, Dec 22, 2022, 8:19 AM tr1p0p @.***> wrote:

Yeah same issues. So, yeah it's not working fine for a lots of others peoples, it seem...

— Reply to this email directly, view it on GitHub https://github.com/jellyfin/jellyfin-android/issues/786#issuecomment-1362832357, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAN7OXM6K7XWHCKZZHN5NZDWORIPPANCNFSM6AAAAAAQLC67WY . You are receiving this because you authored the thread.Message ID: @.***>

hkup859 commented 1 year ago

@x0Z3ro0x I just setup this very thing today and all worked fine for me. Perhaps try disabling all https functionality and just use http (to troubleshoot this issue). I have not gotten https setup yet because my reverse proxy isn't playing nice with it. Another Idea, perhaps try using a reverse proxy such as nginx proxy manager to help some of these issues (such as SSL). Not sure if any of this will help, just trying to identify differences in your setup vs mine.

jellyfin-bot commented 1 year ago

This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments.

If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or master branch, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label.

This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on Matrix or Social Media.

Y0ngg4n commented 1 year ago

Maybe i can help by describing how i fixed it.

I had an A record and an AAA record but i only had ipv4 set up. But i fixed it by removing the AAA record.

ClemaX commented 1 year ago

Did someone find a workaround? The issue still persists.

tr1p0p commented 1 year ago

Yeah, still this issues. Also friends on other android tv ALSO have this issues.

So android app is barely usable for no reasons.

ClemaX commented 1 year ago

Here is a log, attempting to connect to a Jellyfin instance behind a nginx reverse-proxy with SSL certificate, using cellular network. The instance is reachable using the webbrowser using HTTPS on port 8920.

org.jellyfin.mobile.log

nielsvanvelzen commented 1 year ago

Here is a log, attempting to connect to a Jellyfin instance behind a nginx reverse-proxy with SSL certificate, using cellular network. The instance is reachable using the webbrowser using HTTPS on port 8920.

org.jellyfin.mobile.log

You're trying to connect to jellyfin.example.org which obviously is not a Jellyfin server so it will not be able to connect.

No valid servers found, invalid candidates were:
https://jellyfin.example.org/Failure(org.jellyfin.sdk.api.client.exception.TimeoutException: HTTP request timed out),
https://jellyfin.example.org:8096/Failure(org.jellyfin.sdk.api.client.exception.TimeoutException: HTTP request timed out),
https://jellyfin.example.org:8920/Failure(org.jellyfin.sdk.api.client.exception.TimeoutException: HTTP request timed out),
http://jellyfin.example.org/Failure(org.jellyfin.sdk.api.client.exception.TimeoutException: HTTP request timed out),
http://jellyfin.example.org:8096/Failure(org.jellyfin.sdk.api.client.exception.TimeoutException: HTTP request timed out)
ClemaX commented 1 year ago

Sorry for the confusion, I've replaced my real hostname by jellyfin.example.org for privacy. I double checked the hostname and that is not the problem as I reach the instance using the mobile phone's web-browser (Chrome).

ClemaX commented 1 year ago

When connecting and authenticating to the server from thr LAN using the public hostname, it worked and now it also works through the cellular network.

Maxr1998 commented 1 year ago

Might be some DNS issue possibly? It seems that it was only able to resolve the IP in the internal network, and then cached it for later.

Your issue seems like a network configuration issue, or very specific edge case. A timeout usually implies that the address isn't reachable or something a firewall prevents access. Without knowing more details, it's impossible to debug this issue.

TooGoooD1 commented 1 year ago

also having this issue,

set up is as follow:

on the DNS Server:

A record pointed to  media.myserver.com
CName  *.media.myserver.com    pointing to media.myserver.com (wildcard)

reverse proxy is set up to point jellyfin.media.myserver.com to the correct docker container that jellyfin is running in.

can connect through the phones browser using the cellular network {not connected to homes WiFi.} -> https://jellyfin.media.myserver.com cannot connect with the app using the same -> https://jellyfin.media.myserver.com

Error Messages on the app screen:


Tried 3 Candidates for input, without success.

unable to reach server:
https://jellyfin.media.myserver.com
https://jellyfin.media.myserver.com:8096
https://jellyfin.media.myserver.com:8920

No errors on Server Logs or any info in regards to the attempted failed login with the APP.

server logs show the login through browser as successful however.

Ludo444 commented 1 year ago

I hit this today with my new phone and it seems like the problem was introduced after version 2.4.4. I was getting same message with Tried 3 Candidates for input, without success. when trying to log in with v2.5.2.

My gf's phone and my old phone were logged in, so it was very odd my new phone could reach Jellyfin via browser but not app as other devices on the same network would work fine.

When installing v2.4.4 from f-droid, I was able to log in. After that, upgrading to 2.5.2 kept the login session and seems to work without issues. So that seems to be a workaround if anybody hits this.

croak9854 commented 1 year ago

I also have the same issue. The setup has not been changed from the last time I successfully used the android app. Right now I can connect using Firefox android browser but the app does not work. Error message:

Tried 2 Candidates for input, without success.

crile commented 1 year ago

I am blocked with this issue too.

In browser in https, it works. In android in https, it doesn't however, I make a test with http, and it does work too. So it seems linked to ssl.

Maxr1998 commented 1 year ago

Check if you're impacted by #571.

smac89 commented 1 year ago

I just wanted to add that I was having this issue when I had disabled the web client portion of the server component.

My setup is using nginx as a reverse proxy, so I followed the instructions found here. In my initial setup, I had disabled all parts of the nginx configuration, which involved the web client, and I had also configured the server to run without requiring the web component (--service --nowebclient). With these initial settings, I couldn't connect from the jellyfin mobile app, nor could I connect from my Roku. Only the desktop app worked.

After I removed those options and enabled the web component and settings in nginx, everything started working again.

I'm just glad I found this, rather than going down the SSL and nginx rabbit hole that I would have otherwise.

Maxr1998 commented 1 year ago

That makes sense, since the Android app simply wraps and thus requires the web client provided by the server. It doesn't bundle it's own web client anymore.

cjax82 commented 1 year ago

Adding to this as this seems to be an ongoing issue. Perhaps the app is doing everything it is supposed to and it's the actual docker image itself.

Initial set back up, I was not able to connect to my server via the JF app on android phone or other tablets when using mobile data off my personal home network.

----delete containter----

Redeploy, pulled image agin, and worked with no issues. Only while setting itself up completely and scanning media folders. When done, tried adding another device from outside network...same error others are receiving.

-----delete container, republican and deploy---- Same error.

During each attempt, clean docker and the initial support folders built. Ports have been directly forwarded to confirm if it was a porting issue.

Note. While in my personal network, able to connect through the android app with no issues. UPNP/DLNA is not on as it doesn't always work. All setup, deployments were the same.

I've attempt this using the beta JF version of the app and official, installed through the Play Store. Web interface works with no issues anywhere you're at.

RobotRoss commented 1 year ago

+1, I too am getting this on my server

darkkhaine commented 1 year ago

+1, also has this issue, does anybody has found a workaround ?

melon-ruet commented 1 year ago

Still facing this issue Screenshot_20231011-213638

TIMCSS commented 1 year ago

Same issue here. The server is viewable through other devices such as an LG tv on the same network but cannot use that moving forward as it doesnt support MKV DV. Installed the Android TV app on my Zidoo player, it finds the server in the top right, click on it and it spins then brings the same error messages as above which is odd considering it finds it. Tried beta and release builds no luck!!!!! PLEASE HELP Should add im using a Linux server on Unraid.

TIMCSS commented 1 year ago

Fixed it. Ran it on a none linux based server and worked fine. So logged in fine. Went back to log in via the linux server and it's an issue in the search function. just write the IP dont include HTTP//. So 198.168.1.105:XXXX. Worked first time. Added the user by quick connect and all sorted.

netranger512 commented 11 months ago

Same issue here.

App version: 2.5.3 on Android Things tried:

Trying either IP or hostname in browser on the phone works.

Environment: docker container on linux VM. Jellyin Server version: 10.8.10

If I can provide any more info I will be happy to do so.

Cheers

Gendron5000 commented 10 months ago

I also have this issue using a nginx reverse proxy. But can't use the jellyfin client, get an immediate error about can't connect (both linux desktop and android). Can access the web UI through both devices fine, locally and through my home VPN.

The only way to get it to work in the client is by exposing 8096 in my jellyfin container (via docker-compose.yml) and connecting directly to :8096. Even using jellyfin.xxx.xxx:8096 doesn't work with the clients. My nginx config is from (https://jellyfin.org/docs/general/networking/nginx/), with lines changed to enable ssl and set the DOMAIN_NAME. Jellyfin has ipv6 disabled and https disabled in all cases.

Nginx logs show no entries when trying to access jellyfin through the clients. (but I can't seem to be able to get nginx-debug working for more info)

Ideally I wouldn't have to expose 8096 through docker and let nginx route everything (as it does fine for my other domains/containers without issue).

I have also tried nginx/jellyfin with using port 80 and no SSL, but got the exact same results - ie doesn't seem like a certificate issue (I'm using a self-signed cert).

PercyJW-2 commented 9 months ago

I hit this today with my new phone and it seems like the problem was introduced after version 2.4.4. I was getting same message with Tried 3 Candidates for input, without success. when trying to log in with v2.5.2.

My gf's phone and my old phone were logged in, so it was very odd my new phone could reach Jellyfin via browser but not app as other devices on the same network would work fine.

When installing v2.4.4 from f-droid, I was able to log in. After that, upgrading to 2.5.2 kept the login session and seems to work without issues. So that seems to be a workaround if anybody hits this.

I have a basic Nginx reverse proxy setup and this workaround is working for me

Julian-1-2-3-4-5 commented 8 months ago

I still have the same issue on 2.6.0

schrock commented 7 months ago

I'm experiencing this issue, too. Just to be specific:

HTTP with IP address: works ✅ HTTP with domain name: does not work ❌ HTTPS with domain name: works ✅

All of the above work when using a browser. It just appears that the Android app doesn't like HTTP with a domain name.

jellyfin-bot commented 3 months ago

This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments.

If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or master branch, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label.

This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on Matrix or Social Media.