Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TURN server request to /turn instead of being relative to the index.html #165

Open
lazybutbusy opened this issue Aug 28, 2024 · 11 comments
Open
Labels
bug Something isn't working interface OS input, display, or audio interfaces web Web components including gst-web

Comments

@lazybutbusy
Copy link

When I host the Coder workspace and Selkies-GStreamer on the internet, it fails to perform the TURN request properly. Instead of reaching the expected path, it seems to be requesting the wrong URL:
image

Instead, I believe it should be directed to the following URL:
image

However, when I attempt to connect to the pod through the port on the LAN, it works perfectly fine:
image

I suspect the issue may be originating from the following code segment:
image

@lazybutbusy lazybutbusy added the bug Something isn't working label Aug 28, 2024
@PMohanJ
Copy link
Member

PMohanJ commented Aug 28, 2024

I never tried coder, probably worth looking into #64
Also the function you pointed, it'd only work if you provided this ENV variable https://github.com/selkies-project/selkies-gstreamer/blob/main/src/selkies_gstreamer/__main__.py#L349

@ehfd
Copy link
Member

ehfd commented Aug 28, 2024

First thing to ask here would be to check if there are any errors in the developer console. If there is an error, then we can move to the next phase.
I think it is unlikely this might be an issue.

@ehfd
Copy link
Member

ehfd commented Aug 28, 2024

--relay-ip in coTURN seems more plausible as in #64.

@ehfd
Copy link
Member

ehfd commented Sep 13, 2024

Any news?

@ehfd
Copy link
Member

ehfd commented Sep 20, 2024

@PMohanJ Is it possible that the JavaScript source (in /addons/gst-web) routes /turn to https://top.tld/turn instead of https://top.tld/myselkies/instance/turn?

@PMohanJ
Copy link
Member

PMohanJ commented Sep 20, 2024

I didn't notice that before, but that is it.
Screenshot from 2024-09-20 18-53-08

@PMohanJ
Copy link
Member

PMohanJ commented Sep 20, 2024

It seems like /turn fetch would make a request relative to root of the domain, thus ignoring the path of the url.
So removing the leading slash should do for fetch request, and for ws connection we could check if window.location.pathname is not empty(else it would return /) to include in the URL.
But I'm not sure how to mimic this pathname request from a browser to test it. In that coder context, the path segment(@Lazyman/desktop.main/apps/desktop) seems to be handled by that coder application itself, so by the time the request reaches the Nginx of selkies container, it's just /turn.

@ehfd
Copy link
Member

ehfd commented Sep 21, 2024

This is a big issue, then, which could have impacted @Inrixia in #64.

@ehfd ehfd changed the title TURN request to website instead of webpage in the Coder workspace TURN server request to /turn instead of being relative to the index.html Sep 21, 2024
@ehfd ehfd added web Web components including gst-web interface OS input, display, or audio interfaces labels Sep 21, 2024
@PMohanJ
Copy link
Member

PMohanJ commented Sep 21, 2024

which could have impacted @Inrixia in #64.

In his case, he was getting ICE candidates, which means his /turn and /signalling req were fine.

@ehfd
Copy link
Member

ehfd commented Sep 21, 2024

Fixed in 5d6b8c5 and 4550c88.

@lazybutbusy please test.

cd selkies-gstreamer/addons/gst-web && INSTALL_DIR=(your_install_path) ./install.sh

@lazybutbusy
Copy link
Author

lazybutbusy commented Sep 22, 2024

Thank you for your response, I will test it again next week when I have time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working interface OS input, display, or audio interfaces web Web components including gst-web
Projects
None yet
Development

No branches or pull requests

3 participants