jellyfin / jellyfin-tizen

Jellyfin Samsung TV Client
https://jellyfin.org
863 stars 69 forks source link

Jellyfin opens, but only shows folders. Loading gif stuck playing and no "latest media" etc shown #174

Open exsar opened 1 year ago

exsar commented 1 year ago

Hi there,

I have tried generating the app with both the "master" and 10.8.z branches of the -web repo.

All generates fine (with a few notes/warnings - which I assume is fine), and the WGT file is created.

I install this on the TV (Samsung UA65KS9500)

The App opens fine and I setup and login to the server.

The landing page is displayed, but only partially, with the "MyMedia Folders" shown.

The circular loading gif is overlaid, and I am assuming it is trying to fetch the "Latest" shows and movies (as appears when I load Jellyfin on my LG tv or through my browser). But this is where it gets stuck:

IMG_20230201_115933

When I check the Logs on the server it shows that the TV is encountering the following error, which is shown directly after calling the "NextUp" page:

[2023-02-01 10:41:13.444 +00:00] [INF] AuthenticationScheme: "CustomAuthentication" was forbidden.

Screenshot 2023-02-01 194532

Is there any workaround or way that I can circumvent this?

Many thanks

exsar commented 1 year ago

I've subsequently noticed that it more often than not only notes the following in the logs:

[2023-02-01 11:07:39.016 +00:00] [INF] WS "192.168.50.245" request

With no subsequent entry. It seems that at this point Jellyfin hangs on the TV with the loading icon.

And then if I force close the app I get the following, which makes sense:

WS "192.168.50.245" error receiving data: "The remote party closed the WebSocket connection without completing the close handshake."

I've noticed that the "CustomAuthentication" authentication error in my post above is actually also encountered if I access Jellyfin through my PC web browser. It successfully displays all content even though this error is encountered.

So I'm not sure if this error is causing the TV to hang.

Perhaps the Tizen app is expecting some type of response back from the server before polling, and doesnt receive it, so hangs

dmitrylyzo commented 1 year ago

Looks like JS is just crashing.

10.8.9 works on webOS 1.2 (~Tizen 2.3), but may work a bit differently on Tizen. That's why there was a bug with the second open, which required debugging the real TV.

If you want to dive, here is a script I wrote for Linux. Probably requires an extra argument "300".

port=$("$SDB" -s $DEVICE shell 0 debug "$TIZEN_APP" 300)

You also need Chrome 79, iirc.

On Windows, more handwork: https://github.com/jellyfin/jellyfin-tizen/issues/46#issuecomment-683747890

The master branch works on webOS 1.2 as well. :man_shrugging:

exsar commented 1 year ago

Many thanks for the quick response.

That makes sense re JS crashing. I assume those are some ajax-like calls happening at that point, retrieving the "latest" and "next" items, and it doesn't like something about that.

I have Tizen studio and repos etc setup on Windows. I'm not familiar with the environment, but let me have a look around and see if I can figure out what's going on :)

exsar commented 1 year ago

Trying to access the server through the web browser on the TV stalled/crashes at the exact same point (i.e., loading the latest feeds). With the circular loading icon overlaid. I can click through to other areas (i.e., into a folder), but the loading icon remains on top.

So maybe it's just that the web component in that version of Tizen doesn't like or support something to do with what's happening.

I still need to work my way around how the Tizen studio environment works + your debug notes above.

I assume there must be a way around it as I swapped from Emby to Jellyfin, and the tizen Emby app loads these and operates on this samsung. Perhaps it (emby) loads them differently.