BGmanmiami 0 Posted September 18, 2022 Posted September 18, 2022 While server is running, in Brave / Firefox browsers I scroll down and click API link, then I get: https://XX.XX.XX:8096/emby/openapi in the swagger url explore field Failed to load API definition. Fetch error NetworkError when attempting to fetch resource. https://xx.xx.xx:8096/emby/openapi Fetch error Possible cross-origin (CORS) issue? The URL origin (https://xx.xx.xx:8096) does not match the page (https://swagger.emby.media). Check the server returns the correct 'Access-Control-Allow-*' headers.
Luke 42078 Posted September 18, 2022 Posted September 18, 2022 Hi, try it with your web app on localhost. It needs to be a secure context, so either that or https.
BGman 4 Posted September 22, 2022 Posted September 22, 2022 (edited) On 9/18/2022 at 12:17 PM, Luke said: Hi, try it with your web app on localhost. It needs to be a secure context, so either that or https. This is failing to connect on both local and live emby installs.. with https.. But connects with http.. What do you suggest Luke, do I need to enforce SSL on both my local install and live install which is emby premiere? Edited September 22, 2022 by BGman clarify
Luke 42078 Posted September 27, 2022 Posted September 27, 2022 Hi @BGman, what exactly is failing? did you try it on localhost?
BGman 4 Posted September 29, 2022 Posted September 29, 2022 On 9/27/2022 at 6:23 PM, Luke said: Hi @BGman, what exactly is failing? did you try it on localhost? Honestly, I'm finding that there are issues with too many things. Spending just too much time trying to hunt down fixes in this forum for basic things is actually counterproductive for me. I have other threads open still trying to figure out things like where and VERY basic css things are done.. and unlike anything else that I have worked on, everything seems to be way too tedious. It actually seems like this is being done by design. Been paying for premiere version since YEARS ago.. even have referred NUMEROUS clients. But really at my wits end spending hours trying to find and make the smallest of changes. So I'm thinking it wouldn't be smart to even begin to code api related modules for myself and clients.. just dont have the patience for spending more time here than actually coding.
Luke 42078 Posted September 29, 2022 Posted September 29, 2022 8 minutes ago, BGman said: Honestly, I'm finding that there are issues with too many things. Spending just too much time trying to hunt down fixes in this forum for basic things is actually counterproductive for me. I have other threads open still trying to figure out things like where and VERY basic css things are done.. and unlike anything else that I have worked on, everything seems to be way too tedious. It actually seems like this is being done by design. Been paying for premiere version since YEARS ago.. even have referred NUMEROUS clients. But really at my wits end spending hours trying to find and make the smallest of changes. So I'm thinking it wouldn't be smart to even begin to code api related modules for myself and clients.. just dont have the patience for spending more time here than actually coding. Did you try it on localhost? You just need to be running the web app on a secure context in order for it to work.
BGman 4 Posted September 29, 2022 Posted September 29, 2022 4 hours ago, Luke said: Did you try it on localhost? You just need to be running the web app on a secure context in order for it to work. Sorry, but there in lies the problem. You're asking me "did you try localhost?" At the time I tried localhost and on live linux server. At the time, I did connect and somehow without ssl cert on the server. Like I said above, I really can't spend this much time dong things like "trying" to see if different things work.. I kinda expect things to work like your documentation says it's supposed to.
Luke 42078 Posted September 29, 2022 Posted September 29, 2022 Just now, BGman said: Sorry, but there in lies the problem. You're asking me "did you try localhost?" At the time I tried localhost and on live linux server. At the time, I did connect and somehow without ssl cert on the server. Like I said above, I really can't spend this much time dong things like "trying" to see if different things work.. I kinda expect things to work like your documentation says it's supposed to. The problem is the browser requires a secure context. That's why it needs to be done either on localhost, or with the web app running on https. So if you haven't setup SSL then you can only use the swagger docs on localhost. What we can do is hide the option when not in a secure context, then you'll never have to suffer the experience of clicking on it and getting the impression that things aren't working.
roaku 842 Posted September 29, 2022 Posted September 29, 2022 (edited) 4 minutes ago, BGman said: Sorry, but there in lies the problem. You're asking me "did you try localhost?" At the time I tried localhost and on live linux server. At the time, I did connect and somehow without ssl cert on the server. Like I said above, I really can't spend this much time dong things like "trying" to see if different things work.. I kinda expect things to work like your documentation says it's supposed to. He's asking if localhost works because that's the only way it's expected to work *without* SSL. If localhost works, nothing's wrong. You either need to implement SSL to appease the browser gods or use localhost. Edited September 29, 2022 by roaku
BGman 4 Posted September 29, 2022 Posted September 29, 2022 2 minutes ago, roaku said: He's asking if localhost works because that's the only way it's expected to work *without* SSL. If localhost works, nothing's wrong. You either need to implement SSL to appease the browser gods or use localhost. And I stated.. eventually, the connection did work in browser. I have no idea how, I clicked on the link numerous times and it did not work. I copy/pasted the link and entered in browser with and without http / https.. and on one of the tries it went through. I just tried live linux server for the sake of this reply.. and yes it connects without ssl.. as in yes it connects with http. I haven't tried postman yet because I have other issues, that if I can't get working, there will be no need for me to even continue using this.
Luke 42078 Posted September 29, 2022 Posted September 29, 2022 7 minutes ago, BGman said: And I stated.. eventually, the connection did work in browser. I have no idea how, I clicked on the link numerous times and it did not work. I copy/pasted the link and entered in browser with and without http / https.. and on one of the tries it went through. I just tried live linux server for the sake of this reply.. and yes it connects without ssl.. as in yes it connects with http. I haven't tried postman yet because I have other issues, that if I can't get working, there will be no need for me to even continue using this. We're happy to help with those. Just let us know what they are. Thanks.
BGman 4 Posted September 29, 2022 Posted September 29, 2022 16 minutes ago, Luke said: The problem is the browser requires a secure context. That's why it needs to be done either on localhost, or with the web app running on https. So if you haven't setup SSL then you can only use the swagger docs on localhost. What we can do is hide the option when not in a secure context, then you'll never have to suffer the experience of clicking on it and getting the impression that things aren't working. Actually it does run WITHOUT https and without ssl cert! http://swagger.emby.media/?url=http://xx.xx.xx:8096/emby/openapi&api_key=xxxxxxxxxxxxxxxxxxxxx
Luke 42078 Posted September 29, 2022 Posted September 29, 2022 It looks like you opened the swagger url in plain http, rather than using the https version of swagger. That will work depending on what browser you're using, and what that browser allows. In Chrome that's not going to work for too much longer, see here: https://chromestatus.com/feature/5436853517811712 It's unclear yet if that will mean just Chrome or all Chromium based browsers. In any event, the browsers are trying to push everyone towards using https nowadays.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now