jellyfin / jellyfin-webos

WebOS Client for Jellyfin
https://jellyfin.org
Mozilla Public License 2.0
638 stars 65 forks source link

Check Network Connection (Error -27) #60

Open finn0000 opened 2 years ago

finn0000 commented 2 years ago

Good day! I entered the wrong address jellyfin checked the automatic login box. Now I can't fix it. When reinstalling the application, it still tries to enter the old address

в сети я использую nginx proxy

image

image

anthonylavado commented 2 years ago

Another report: https://github.com/jellyfin/jellyfin-webos/issues/62#issue-1047100540

modelName : OLED55G1PTA
sdkVersion : 6.2.0
firmwareVersion : 03.20.45
boardType : O20N_DVB_AJ
otaId : HE_DTV_W21O_AFABATAA

I installed org.jellyfin.webos successfully in developer mode.

The app was working well on the TV, however it has stopped working when I enabled "remember this server".

Now, whenever I launch the App, it displays the Error message, despite my server being up and functional (can browse jellyfin DLNA for instance on same TV) :

Error Code : -27
UNABLE TO LOAD
This may be a temporary issue.
Please try again later.
<Retry> <Exit App>

clicking either option brings up the error again.

I have tried, rebooting, uninstalling the App and reinstalling and looked around the file tree for a settings file to reset, but cannot find anyway to clear the application settings.

I think it's possible that the saved server URL may be invalid but it doesn't allow me to change it.

How can I reset the stored application settings? I think that will allow the Jellyfin client to start again properly.

anthonylavado commented 2 years ago

So the LG Developer docs say that uninstalling and re-installing an app should clear local storage (which is where we save the server info).

You mentioned reinstalling, but it looks like it actually has to be deleted/removed first.

Are you able to try removing and reinstalling?

MagicLegend commented 2 years ago

@anthonylavado I just installed Jellyfin from the homebrew channel, and also have a -27 error code. I can confirm that deleting the app and reinstalling it does not allow me to re-enter the URL again. I'm going to assume that for approval in the LG Store this needs to be fixed :smile:

If you have a guide on how to get more detailed info from my TV then I'd be happy to provide so.

Edit:

Adding on to that, I am able to easily see the web requests made to the Nginx proxy:

1.2.3.4 - - [10/Feb/2022:18:13:30 +0100] "GET /System/Info/Public HTTP/2.0" 200 216 "-" "Mozilla/5.0 (Web0S; Linux/SmartTV) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.79 Safari/537.36 WebAppManager"
1.2.3.4 - - [10/Feb/2022:18:13:30 +0100] "GET /web/manifest.json HTTP/2.0" 200 313 "-" "Mozilla/5.0 (Web0S; Linux/SmartTV) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.79 Safari/537.36 WebAppManager"
1.2.3.4 - - [10/Feb/2022:18:13:30 +0100] "GET /web/index.html HTTP/2.0" 200 1527 "-" "Mozilla/5.0 (Web0S; Linux/SmartTV) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.79 Safari/537.36 WebAppManager"
anthonylavado commented 2 years ago

@MagicLegend That's strange, as another person in a different issue was indeed able to reset it (they also had a rooted TV).

Do the steps in this comment reset it for you? https://github.com/jellyfin/jellyfin-webos/issues/74#issuecomment-1013806240

MagicLegend commented 2 years ago

@anthonylavado Yes, these are the steps I took as well. Note that the comment speaks of an X, but for me it is a trash can (version difference?) like in this image from LG:

WebOS delete app view

Is there a way to hard-reset it through SSH perhaps?


I see that in that issue there is talk about issues with Nginx configs, so I'll verify the config I'm using (which is the one from Jellyfin's site).

MagicLegend commented 2 years ago

Ah yes, the other issue was truly what I was looking for. Removing the X-Frame-Options: SAMEORIGIN and adding the Access-Control-Allow-Origin "*" always; headers resolved the crash. Now I get to the login screen like I was expecting :-) That should probably be a note in the README somewhere.

This does still leave the issue that the server url was not reset upon deletion of the app though.

Fyb3roptik commented 2 years ago

Is this on a device only? Not seeing this issue in the Emulator

MagicLegend commented 2 years ago

Yes, I only tried this on my actual LG tv :)

Fyb3roptik commented 2 years ago

I guess I dont know how you got it to save a bad url? It just kicks me out if its bad. Removing it and re-installing it also cleared it out for me

MagicLegend commented 2 years ago

No, my issue really was with the nginx reverse proxy that I was using. So the URL was correct, but the reverse proxy had X-Frame-Options: SAMEORIGIN set (as per the Jellyfin default configs). And removing it and re-installing it did not prompt me for a new URL, perhaps because it was sortof valid? Or was it supposed to clear out the stored URL upon reinstalling?

If you want I can probably replicate the issue pretty easily. Are there extra logs you'd be interested in?

Fyb3roptik commented 2 years ago

Each time I tried to uninstall and reinstall it always prompted me for the URL. If you could try to replicate then yes please do. Just standard logs would be good

MagicLegend commented 2 years ago

Are there logs on the TV itself you'd be interested in; or just NGINX conf + logs and Jellyfin's? I'll probably get to this on Wednesday if that's okay.

Fyb3roptik commented 2 years ago

Yeah any logs from the TV and/or nginx will be great. I'll just look here for them. Thanks!

solid-pixel commented 2 years ago

hello, has this ever been looked into? I'm facing the same issue, after installing it for the first time I put my server's info and I'm now stuck in this error -27 loop. Removing the app and reinstalling it doesn't fix it, first time I launch it I'm prompted with the error again instead of the server URL input box :(

the logs folder in my TV is empty, do I need root to see logs in there?

I'm also running Jellyfin on a remote linux machine through nginx reverse proxy.

This is all I have in my nginx log file, which I doubt is related to this issue:

[2022-06-17 20:54:57.723 +00:00] [INF] [44] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "SERVER-IP-REDACTED" request
[2022-06-17 20:54:58.132 +00:00] [WRN] [17] Jellyfin.Server.Middleware.ResponseTimeMiddleware: Slow HTTP Response from "http://REDACTED/jellyfin/Items/e829097c2ee3ff79fa9c77f77e30930e/Images/Primary?fillHeight=428&fillWidth=285&quality=96&tag=1130dfda813039679b8416a903dc495f" to "SERVER-IP-REDACTED" in 0:00:00.5821077 with Status Code 200
[2022-06-17 20:55:46.378 +00:00] [INF] [54] Emby.Server.Implementations.Session.SessionWebSocketListener: Sending ForceKeepAlive message to 1 inactive WebSockets.
[2022-06-17 20:55:58.379 +00:00] [INF] [10] Emby.Server.Implementations.Session.SessionWebSocketListener: Lost 1 WebSockets.
[2022-06-17 20:56:46.386 +00:00] [WRN] [41] Emby.Server.Implementations.HttpServer.WebSocketConnection: WS "SERVER-IP-REDACTED" error receiving data: "The remote party closed the WebSocket connection without completing the close handshake."
[2022-06-17 20:56:46.632 +00:00] [INF] [41] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "SERVER-IP-REDACTED" closed
MagicLegend commented 2 years ago

@solid-pixel For me the issue was solved after I made a small edit to my Nginx configs, can you verify you have done the same?

solid-pixel commented 2 years ago

@MagicLegend thanks, I have no X-Frame-Options set in my nginx.conf file. After reading the other issue mentioned above, I did try to add add_header Access-Control-Allow-Origin "*" always; to my /proxy.d/jellyfin.conf file, restarted nginx, removed and reinstalled Jellyfin on my TV, and as soon as I launch the app I'm again stuck in that Error 27 loop :(

solid-pixel commented 2 years ago

I still don't get how the app doesn't clear the data once I remove it. It might be that nginx is set up fine and I've typed in the wrong address or something, but I have no way to test with different ones since I'm stuck in this annoying loop.

MagicLegend commented 2 years ago

Well, you'd know if it's the wrong address, since it's in your logs :)

solid-pixel commented 2 years ago

what logs?

I'm lost!

solid-pixel commented 2 years ago

Update: apparently the address was correct because I took nginx offline and the jellyfin app on my tv now says it can't connect and shows the URL input field again!

The problem still exists but at least I know the address was correct on my end.

Also it turns out my nginx logs were disabled and now that I turned them on I see the app connecting "successfully":

IP_REDACTED - - [19/Jun/2022:16:02:54 +0200] "GET /jellyfin/System/Info/Public HTTP/1.1" 200 225 "-" "Mozilla/5.0 (Web0S; Linux/SmartTV) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36 WebAppManager"
IP_REDACTED - - [19/Jun/2022:16:02:54 +0200] "GET /jellyfin/web/manifest.json HTTP/1.1" 200 309 "-" "Mozilla/5.0 (Web0S; Linux/SmartTV) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36 WebAppManager"
IP_REDACTED - - [19/Jun/2022:16:02:54 +0200] "GET /jellyfin/web/index.html HTTP/1.1" 200 1511 "-" "Mozilla/5.0 (Web0S; Linux/SmartTV) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36 WebAppManager"

Although on my TV it keeps showing that Error -27.

edit: it works with https://demo.jellyfin.org/stable, but not with my own Jellyfin server (https://xxx.yyyyy.zz/jellyfin)

Sveske-Juice commented 2 years ago

@solid-pixel Can you connect via. a web browser or the desktop application, to your own Jellyfin server, or is this only happening when you are trying to connect from the TV?

solid-pixel commented 2 years ago

@Sveske-Juice hi, yeah absolutely, I'm already using it via web and android phone and TV apps, all through the same exact URL I'm trying to use on my TV.

So yes to answer your question, the problem only happens when trying from my TV (works with the TV's browser though, it's just the app that won't work).

Sveske-Juice commented 2 years ago

Hmm, I really don't know why this happens then, but a guess I have is that maybe its because the error has happened previous with that specific URL in the past, and now that URL just always results in that Error -27, since it works when you connect to a different Jellyfin server.

Can you try connecting using a different address like for example the local IP address if you are using a domain, that still resolves to the Jellyfin server?

MagicLegend commented 2 years ago

@solid-pixel In the logs you censored here?

image

And if you don't have Nginx access logs, you can easily enable them.

Anyhow, could you please share your full Nginx configuration? Right now it's just guessing in the dark what might be wrong with them. These are my configs, that I know work:

# Uncomment the commented sections after you have acquired a SSL Certificate
server {
    listen 80;
    listen [::]:80;
    server_name <SUBDOMAIN>;

    return 301 https://$host$request_uri;
}

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;
    server_name <SUBDOMAIN>;

    # use a variable to store the upstream proxy
    # in this example we are using a hostname which is resolved via DNS
    # (if you aren't using DNS remove the resolver line and change the variable to point to an IP address e.g `set $jellyfin 127.0.0.1`)
    set $jellyfin <INTERNAL_IP>;
    # resolver 127.0.0.1 valid=30;

    # Logs
    error_log /config/log/nginx/jellyfin-error.log;
    access_log /config/log/nginx/jellyfin-access.log;

    ssl_certificate /certs/<SUBDOMAIN>.crt;
    ssl_certificate_key /certs/<SUBDOMAIN>.key;
    #include /etc/letsencrypt/options-ssl-nginx.conf;
    #ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
    add_header Strict-Transport-Security "max-age=31536000" always;
    #ssl_trusted_certificate /etc/letsencrypt/live/DOMAIN_NAME/chain.pem;
    ssl_stapling on;
    ssl_stapling_verify on;

    # Security / XSS Mitigation Headers
    #add_header X-Frame-Options "SAMEORIGIN";
    add_header X-XSS-Protection "1; mode=block";
    add_header X-Content-Type-Options "nosniff";
    add_header Access-Control-Allow-Origin "*" always;

    # Content Security Policy
    # See: https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP
    # Enforces https content and restricts JS/CSS to origin
    # External Javascript (such as cast_sender.js for Chromecast) must be whitelisted.
    #add_header Content-Security-Policy "default-src https: data: blob: http://image.tmdb.org; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' https://www.gstatic.com/cv/js/sender/v1/cast_sender.js https://www.gstatic.com/eureka/clank/95/cast_sender.js https://www.gstatic.com/eureka/clank/96/cast_sender.js https://www.gstatic.com/eureka/clank/97/cast_sender.js https://www.youtube.com blob:; worker-src 'self' blob:; connect-src 'self'; object-src 'none'; frame-ancestors 'self'";

    location = / {
        #return 302 http://$host/web/;
        return 302 https://$host/web/;
    }

    location / {
        # Proxy main Jellyfin traffic
        proxy_pass http://$jellyfin:8096;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Forwarded-Protocol $scheme;
        proxy_set_header X-Forwarded-Host $http_host;

        # Disable buffering when the nginx proxy gets very resource heavy upon streaming
        proxy_buffering off;
    }

    # location block for /web - This is purely for aesthetics so /web/#!/ works instead of having to go to /web/index.html/#!/
    location = /web/ {
        # Proxy main Jellyfin traffic
        proxy_pass http://$jellyfin:8096/web/index.html;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Forwarded-Protocol $scheme;
        proxy_set_header X-Forwarded-Host $http_host;
    }

    location /socket {
        # Proxy Jellyfin Websockets traffic
        proxy_pass http://$jellyfin:8096;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Forwarded-Protocol $scheme;
        proxy_set_header X-Forwarded-Host $http_host;
    }
}
solid-pixel commented 2 years ago

Hi, yeah I posted another comment to tell you that I did manage to enable the logs, and that made me realise that the app is indeed connecting to the right URL.

This is my main nginx.conf:

# Even doing this, Nginx will still try to create the default error file, and
# log a non-fatal error when it fails. After that things will work, however.
error_log logs/error.log;

worker_processes  1;

events {
    worker_connections 256;
    use epoll;
    multi_accept on;
}

pid nginx_user.pid;

http {

    # Set an array of temp and cache file options that will otherwise default to
    # restricted locations accessible only to root.
    client_body_temp_path   tmp/client_body;
    fastcgi_temp_path       tmp/fastcgi_temp;
    proxy_temp_path         tmp/proxy_temp;
    scgi_temp_path          tmp/scgi_temp;
    uwsgi_temp_path         tmp/uwsgi_temp;

    access_log  logs/access.log;
    error_log   logs/error.log info;

    log_format   main '$remote_addr - $remote_user [$time_local] $status '
        '"$request" $body_bytes_sent "$http_referer" '
        '"$http_user_agent" "$http_x_forwarded_for"';

    include         conf/mime.types;
    index           index.html index.htm index.php;
    default_type    application/octet-stream;

    aio threads;
    sendfile on;
    tcp_nopush on;
    tcp_nodelay on;
    server_tokens off;

    proxy_buffering    off;
    proxy_buffer_size  128k;
    proxy_buffers 100  128k;

    server_names_hash_bucket_size 128;
    client_body_timeout 12;
    client_header_timeout 12;
    keepalive_requests    10;
    keepalive_timeout 60 60;
    send_timeout 30;

    client_max_body_size 0;
    client_body_buffer_size 128M;

    include         conf.d/*.conf;
    include         sites-enabled/*;

}

And this is the Jellyfin-specific config under /proxy.d/jellyfin.conf:

location /jellyfin {
    return 302 $scheme://$host/jellyfin/;
}

location /jellyfin/ {

    add_header Access-Control-Allow-Origin "*" always;

    proxy_pass http://127.0.0.1:12702;

    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Forwarded-Host $http_host;

    proxy_set_header Range $http_range;
    proxy_set_header If-Range $http_if_range;

    # allow websockets
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";

}

The reason why you see these weird ports (12702) is because this is a shared seedbox so since there are multiple users on the same server using jellyfin, they assign a unique port to each JF installation. It's worth stressing out that my configuration works fine with any kind of client I've tried - it works from Android (Jellyfin, Findroid, Yatse), it works from AndroidTV (Jellyfin's official app), works via web browser.

Thanks!

solid-pixel commented 2 years ago

Hmm, I really don't know why this happens then, but a guess I have is that maybe its because the error has happened previous with that specific URL in the past, and now that URL just always results in that Error -27, since it works when you connect to a different Jellyfin server.

Can you try connecting using a different address like for example the local IP address if you are using a domain, that still resolves to the Jellyfin server?

hi thanks for your help, I've tried IP:PORT - sadly it works from browser but the webos app gets stuck on Connecting... (this is new lol). I think it's because it takes to the non-ssl version. Also the webos app freezes and the Abort button doesn't do anything, I have to force-close it.

Sveske-Juice commented 2 years ago

sadly it works from browser but the webos app gets stuck on Connecting... (this is new lol).

This also happens for me when i type in an invalid address of my server. It just says "connecting...", however there is a timeout set to 5000ms (5s) in the function that gets called to receive server information. The function should display an error instead of just waiting: (frontend/js/index.js:249)

function getServerInfo(baseurl, auto_connect) {
    curr_req = ajax.request(normalizeUrl(baseurl + "/System/Info/Public"), {
        method: "GET",
        success: function (data) {
            handleSuccessServerInfo(data, baseurl, auto_connect);
        },
        error: handleFailure,
        abort: handleAbort,
        timeout: 5000
    });
}

Correct me if I'm wrong but isn't this a new issue?

Also does the output in access log still say everything is ok, or has it changed since?

Sveske-Juice commented 2 years ago

Okay I now i know why i get the "Connecting..." screen:

The issue only happens when i connect to the correct hostname. I have set nginx up so that when i go to a subfolder of the domain i get routed to the jellyfin server, but if i for example connect to <HOST_NAME>/jellyfinAAAAA I face the issue with it just saying connecting...

When opening the inspector in the simulator to check for errors i notice that there is an uncaught syntax error which I think is why we don't see the error:

Uncaught SyntaxError: Unexpected token < in JSON at position 0
    at JSON.parse (<anonymous>)
    at XMLHttpRequest.xhr.onreadystatechange (ajax.js:69)

In the access log of nginx i get: IP - - [20/Jun/2022:22:13:32 +0200] "GET /jellyfin/ HTTP/2.0" 302 0 "-" "Mozilla/5.0 (Web0S; Linux/SmartTV) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36 WebAppManager"

So you can see even though i connect to <HOST_NAME>/jellyfinAAAAAA the request gets re-routed to /jellyfin/ which returns status code 302 with the location <HOST_NAME>/jellyfin/web/index.html. It will then request <HOST_NAME>/jellyfin/web/index.html and get status code 200 OK but it got the webpage instead of the manifest (server info), so it thinks that it response is from /jellyfin/System/Info/Public which would respond with the manifest data, but instead it gets the web page. The crash then happens because it tries to parse the json data which doesn't exist.

So this is a problem with my nginx config, because /jellyfinAAAA/System/Info/Public re-routes to /jellyfin/ and then /jellyfin/web/index.html instead of returning 404 on the first request. However I still think this should be fixed because if you try to connect to any server that handles the request "wrong" you will be stuck with "Connecting..." and will then have force-close it. If I for example connect to my nextcloud server at <HOST_NAME>/nextcloud I face the same issue. And the location block which treats the request wrong is from the official documentation

It's unlikely this is the same reason why you get "Connecting...", but can you try connecting from the simulator/emulator and check the inspector for any errors etc.

solid-pixel commented 2 years ago

@Sveske-Juice thanks, you're really putting a lot of effort into this! And so did I, while trying to install the emulator and make it work :D

The console shows no errors when the app loads and the URL input comes up, but then once I fill the URL in and click on Connect, here's what I get (same error as on my TV):

image

Text format:

loading module /usr/share/javascript/ilib/lib/WebLoader.js

ilib-web.js:1 [Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.

requireClass.loadFile @ ilib-web.js:1
requireClass.require @ ilib-web.js:1
(anonymous) @ ilib-web.js:1
ilib-web.js:1 loading module /usr/share/javascript/ilib/lib/Path.js
ilib-web.js:1 loading module /usr/share/javascript/ilib/lib/ilib.js
ilib-web.js:1 loading module /usr/share/javascript/ilib/lib/Loader.js
ilib-web.js:1 loading module /usr/share/javascript/ilib/lib/Locale.js
ilib-web.js:1 loading module /usr/share/javascript/ilib/lib/JSUtils.js
ilib-web.js:1 loading module /usr/share/javascript/ilib/lib/ResBundle.js
ilib-web.js:1 loading module /usr/share/javascript/ilib/lib/Utils.js
ilib-web.js:1 loading module /usr/share/javascript/ilib/lib/LocaleInfo.js
ilib-web.js:1 loading module /usr/share/javascript/ilib/lib/IString.js
ilib-web.js:1 loading module /usr/share/javascript/ilib/lib/MathUtils.js
ilib-web.js:1 loading module /usr/share/javascript/ilib/lib/ScriptInfo.js

5geterror.js:76 Uncaught TypeError: Cannot read property 'tv.model.supportBNO' of undefined
    at Object.palmObject.onservicecallback (geterror.js:76)
palmObject.onservicecallback @ geterror.js:76

geterror.js:67 Retry Count: 6 [X]

geterror.js:76 Uncaught TypeError: Cannot read property 'tv.model.supportBNO' of undefined
    at Object.palmObject.onservicecallback (geterror.js:76)
palmObject.onservicecallback @ geterror.js:76
Sveske-Juice commented 2 years ago

Could you try connecting to the demo through the emulator at https://demo.jellyfin.org/stable and see if that works.

I don't really understand the errors, google gives no result on any of them

solid-pixel commented 2 years ago

@Sveske-Juice it works, and I get no errors in the console:

image

Yeah, I tried googling too and I can't find one single result related to tv.model.supportBNO, not even searching through all GitHub:

image

except for that 1 issue which is this one...

solid-pixel commented 2 years ago

Looking at the console, the error is generated here:

file:///usr/share/localization/wam/geterror.js:76

which resides inside the virtual machine image of the emulator at /usr/share/localization/wam/geterror.js

File content: https://pastebin.com/51SNC76u

Affected lines:

image

Sveske-Juice commented 2 years ago

It's difficult to verify if this is the same error you get when using your physical TV. I am not sure what kind of emulator you used but are you able to use the simulator v22 instead? since its a bit newer i think.

You can download it from https://webostv.developer.lge.com/sdk/Simulator/installation/

To test the app:

  1. Clone this repo.
  2. Open simulator
  3. Go to File->Launch App and navigate to the repo and go under the frontend directory where appinfo.json is located
  4. The inspector should open in another window, if not then go to Tools->Inspector
mekwall commented 2 years ago

I am also running into this issue for two different domains where I have proxies set up (one with nginx and the other with caddy). It does work when connecting directly to the local jellyfin though. It would be interesting to see how the proxy is set up for demo.jellyfin.org since that is working.

Edit: Ok, I just confirmed it's the X-Frame-Options header causing this problem and it looks like @solid-pixel and myself are using the same service (Ultra.cc) and their reverse proxy add this header no matter your own config. I've created a ticket with them to see if they can remove it.

iwatch-x commented 1 year ago

hi i'm using Trraefik and also run in this error :/ how can i make it work?

Dycelll commented 1 year ago

@iwatch-x , check out the excellent example here: https://jellyfin.org/docs/general/networking/traefik2 And explanation here: https://jellyfin.org/docs/general/networking/nginx

You are probably missing the X-Frame-Options header configuration. I had the exact same problem but my error mentions ‘temperature error’ for some reason.

if you are using docker-compose, also make sure your configuration version is set to 2. For all the people that use nginx, the link above describes the fix when using nginx there too.

Ps, I’ve been extremely happy with the app. Thank you for all your hard work @anthonylavado

jernejml commented 1 year ago

Thread is quite confusing. Could someone elaborate on this problem. My understanding is:

1) X-Frame-Options: DENY|SAMEORIGIN is not problematic for (pc, mobile) browsers, but will create problems in webos app 2) Why (if?) does this affect only webos app and not android tv app? 3) There is an additional complication since X-Frame-Options is/was replaced with Content-Security-Policy (CSP) 's directive: frame-ancestors in newer web engines (if directive is set, it will override X-Frame-Options)

mekwall commented 1 year ago

@jernejml I'll try to answer your questions.

  1. Correct.

  2. and 3. I don't know for sure, but my educated guess is that the WebView in WebOS is stricter and doesn't allow that header, or that it is not allowed to be set to those values causing the connection to fail. The error message is perplexing though.