[Bug] Unable to Verify Server Address
Describe the bug I am unable to add a server address other than the LAN IP of my server. I cannot connect over Tailscale or Cloudflare Tunnels. I am, however, able to connect to the server through a tunnel after connecting to the server over LAN.
To Reproduce Steps to reproduce the behavior:
- Open app
- Type in non-LAN IP address of server (i.e. https://jellyfin.example.com/)
- Press Connect
- See error
Expected behavior I would expect this to work just as connecting to the server on the local network does on the first try.
Is this still an issue with https://github.com/prayag17/JellyPlayer/releases/tag/v0.0.2 ?
It is still an issue with the latest build https://github.com/prayag17/JellyPlayer/releases/tag/v0.0.3-dev
Accessing it over the local network via the IP address works Accessing https://demo.jellyfin.org/stable works Accessing it over TailScale's VPN via its domain name doesn't work (e.g. http://my.domain.com:1234)
Server version: 10.8.13 Client device: M1 Macbook Air
Does your domain have a self signed SSL certificate?
same issue here. @prayag17 I don't have a self-signed SSL certificate.
What version are you using @Arche151?
@prayag17 Thanks for the quick response! I am using the 0.0.5 AppImage.
And I attached a screenshot of the error message, that appears when I try to add my server
Jellyfin Media Player and other clients work fine, but I'd much rather use Blink.
I tried starting the AppImage from the terminal to see any additional logs that may help, but there were none.
Can you send me a screenshot of console window ( ctrl+shift+i)
@prayag17 Pressing ctrl-shift-i didn't open a console window unfortunately
Try a nightly build from the actions tab in repo homepage
@prayag17 Sorry, I am not that much of an advanced user. can u explain to me how exactly to do that? I clicked on the actions tab but I don't know where to go from there.
Hey @Arche151, you can grab the latest dev build from https://github.com/prayag17/Blink/actions/runs/10743418903 > build artifacts and get executable file for your os
I just ran into this myself with the latest commit (built from source) and I found this in the developer console
Failed to load resource: TLS support is not available
Cross-origin redirection to [REDACTED] denied by Cross-Origin Resource Sharing policy: Origin tauri://localhost is not allowed by Access-Control-Allow-Origin. Status code: 308
XMLHttpRequest cannot load [REDACTED] due to access control checks.
Failed to load resource: Cross-origin redirection to [REDACTED] denied by Cross-Origin Resource Sharing policy: Origin tauri://localhost is not allowed by Access-Control-Allow-Origin. Status code: 308
I found this which seems to be related https://github.com/tauri-apps/tauri/issues/2327 With it being apparently fixed in webkit2gtk version 2.34 however I compiled it with 2.44.3 and still had it.
I also found that others who still experienced it replaced the browsers fetch with Tauri's HTTP API
Edit: Just did a quick look in the source code of Blink and from what I can tell all the HTTP calls are made with jellyfin-sdk-typescript which is auto generated from openapi-generator and the Jellyfin SDK has it configured to generate code which uses Axios for making the HTTP requests which doesn't seem to make it very easy to use the Tauri HTTP API
Another edit:
~~@prayag17 is there any reason this was commented out? https://github.com/prayag17/Blink/blob/main/src/utils/store/api.tsx#L24 Did it not work?~~
Hey @Saturn745, I was using the Tauri http client during the time period this issue was reported and I subsequently removed it when I moved to Tauri v2.
Tauri's http adapter didn't seem to help in fixing this issue at all before so I didn't bother adding it back but I will add it back in the next commit to take another look at it.
Edit: also I remember setting the scope of http plugin made it difficult to access Jellyfin instances with self-signed ssl certificate
Hey @Saturn745, I was using the Tauri http client during the time period this issue was reported and I subsequently removed it when I moved to Tauri v2.
Tauri's http adapter didn't seem to help in fixing this issue at all before so I didn't bother adding it back but I will add it back in the next commit to take another look at it
Yep I noticed that this project was using Tauri V2 and that adapter didn't work because of that. I was attempting a few things to try and fix this issue but no luck so far
Tauri http axios adapter package is out dated at the moment, I will try and hack a version of it to work with Tauri v2
Tauri http axios adapter package is out dated at the moment, I will try and hack a version of it to work with Tauri v2
Yeah I was attempting to put something together to work with Tauri V2 as well
Tauri's http adapter didn't seem to help in fixing this issue at all before so I didn't bother adding it back but I will add it back in the next commit to take another look at it.
Hey I was just messing with this again and I might have found out why.
Digging through how Blink checks if it's a valid server it via the Jellyfin SDK's DiscoveryService#getRecommendedServerCandidates and just looking around that method eventually calls RecommendedServerDiscovery#fetchRecommendedServerInfo and inside that it creates a new Jellyfin API instance and since it creates one itself it doesn't make use of the Axios Adapter https://github.com/jellyfin/jellyfin-sdk-typescript/blob/master/src/discovery/recommended-server-discovery.ts#L105
What do you think?
Also I found this adapter which uses Tauri V2 https://github.com/Dreaming-Codes/axios-tauri-http-adapter
Alrighty after a bit of tinkering around and some jank hacks I've gotten it to work.
All of the HTTP requests go through the Tauri HTTP and this issue is no more.
To get this to work, I used that library I sent above in my last message (with some modifications to fix a few bugs, but I'll PR those back to the upstream repo), then I took a few methods from the Jellyfin SDK (getMinScore, toRecommendedServerInfo, fetchRecommendedServerInfo, and discover) and re-implemented them so I could modify fetchRecommendedServerInfo (the others were needed since they are called from fetchRecommendedServerInfo but not exported for use) to pass an axiosClient when creating the Jellyfin API instance for discovering the servers. The re-implementing of the Jellyfin SDK doesn't feel right to me; however, I am not sure how else this could be done. While testing this, another issue I noticed is the images are grabbed on the browser side as well, so that would need to be worked around, and media doesn't seem to play. Do you have any ideas or suggestions?
I can't seem to find much info on using Tauri HTTP with a stream so that part may need to be done on the Rust end?
I took a few methods from the Jellyfin SDK (getMinScore, toRecommendedServerInfo, fetchRecommendedServerInfo, and discover) and re-implemented them so I could modify fetchRecommendedServerInfo (the others were needed since they are called from fetchRecommendedServerInfo but not exported for use) to pass an axiosClient when creating the Jellyfin API instance for discovering the servers. The re-implementing of the Jellyfin SDK doesn't feel right to me; however, I am not sure how else this could be done.
The reimplementation of Jellyfin SDK indeed feels a bit wrong to me too but I suppose thats the most optimal way to get around for now. Ofcourse we can just use
axiosClient.get(`${basePath}/System/Ping`)
to check if given server address is a Jellyfin server but this does not auto check for http and https like the official sdk and also it does get a little finicky with response body.
While testing this, another issue I noticed is the images are grabbed on the browser side as well, so that would need to be worked around, and media doesn't seem to play
We can create a blob for images that utilize tauri's fetch api with mime:'image/jpeg' just like audioPlayer component. I can think of several ways to implement this feature, like building an Image component which takes itemId and other required fields are prop inputs and then render images using this component. As for the media playback the same blob url method can be used.
reference to audioPlayer: https://github.com/prayag17/Blink/blob/main/src/components/playback/audioPlayer/index.tsx#L59
(side note: I will have to use tauri's fetch api here instead of the js inbuilt one)
Edit: Tauri does have a streaming example, you can see their implementation for reading video stream in Rust side but I still find the Blob method to be more easier to implement.
to check if given server address is a Jellyfin server but this does not auto check for http and https like the official sdk and also it does get a little finicky with response body.
Yeah the official sdk checks http, https, different ports and other stuff which I guess can be easily readded. I just did what I mentioned earlier as a quick test to make sure I was on the right track
Edit: Tauri does have a streaming example, you can see their implementation for reading video stream in Rust side but I still find the Blob method to be more easier to implement.
Yeah that's the only thing I could find which is why I mentioned it may need to be done from the Rust side.
@prayag17 Unfortunately, I still can't add my server with 0.7.0 :(
I get the same error message as before.
@prayag17 Sorry to bother you, but is there a fix in sight? I would loove to start using Blink!
There is no update for this issue currently, however you can try using your ip address with http and default port number when connected to local address
There is no update for this issue currently, however you can try using your ip address with http and default port number when connected to local address
Ah okay, too bad. Thanks for the suggestion :)
@Arche151 and @jackgraddon are you guys using a MacBook for this, or is this happening on other OS's too besides MacOS?
@vikingnope I'm using Windows currently, but the issue also occurs on MacOS as well as Linux.
I have also this issue and I noticed first request was IPv4 and afterward ipv6. That causes some issue on reverse proxy. No other service sues IPv6 for Jellyfin. The vhost works for sure (tried static resource in the vhost), but proxy location for jellyfin gets a 503
Same goes for
curl -6/System/Info/Public → Status 503curl -4/System/Info/Public → Status 200
@Arche151 and @jackgraddon are you guys using a MacBook for this, or is this happening on other OS's too besides MacOS?
I believe at the time I was using a Mac. It is working expected on both my MacOS and Windows machines, I just tried with the latest release.
Sorry I have not commented, GitHub didn't notify me that this thread was so active... I'll double check my notification settings.
Same issue. Wireguard + Caddy Reverse Proxy to expose Jellyfin to the web... cannot add at all on windows 11. On macOS it adds perfectly.