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

Call never reaches callee #473

Closed
andrey-utkin opened this issue Feb 27, 2017 · 23 comments
Closed

Call never reaches callee #473

andrey-utkin opened this issue Feb 27, 2017 · 23 comments

Comments

@andrey-utkin
Copy link

Callee never notices that there's a call for them.

Caller watches spinner forever.

Which jsxc version number do you use?

git master eeab835

I have updated from git several times in last few weeks, so this seems to be
constant state of affairs.

In which system do you use jsxc? (e.g. owncloud, sogo, ...)

example login page

Can you reproduce your issue? If yes, how?

See below

Which browser and browser version do you use?

Google Chrome Version 57.0.2987.13 dev (64-bit)

Same with Firefox 51.0 (64-bit)

Do you have any browser plugins enabled?

In Chrome, no.

Do you see any errors in your javascript console?

jsxc.dep.js:4809 POST https://dev.decent.im/http-bind/ 504 (Gateway Time-out)

Setup:

I run my own XMPP server (dev.decent.im) based on Prosody from upstream
hg trunk (changeset 7909:428d4abee723 of Feb 20 at the moment). mod_bosh is
enabled, nginx forwards BOSH connections to https 5281 port as follows
(conforming to JSXC recommendations):

location /http-bind {
	proxy_pass  https://localhost:5281/http-bind;
	proxy_set_header Host $host;
	proxy_buffering off;
	tcp_nodelay on;
}

I open two Chrome sessions: one regular and one incognito. In both, I navigate
to https://dev.decent.im/jsxc/example/ , set XMPP server to dev.decent.im and
BOSH URL to /http-bind/ , and log in using Box Login widget (others don't
work as they produce POST request to login.html which is static page).

I log in as users andrey.utkin@dev.decent.im and andrey.utkin.2@dev.decent.im
. They have each other in roster and can message each other. When I make call
between them, it never passes. I have read the note that JSXC's default STUN
server, stunprotocol.net, has banned Russia and Ukraine, but I'm in the UK at
the moment. From chrome://webrtc-internals it seems like STUN processing
accomplishes, however I am ready to provide more info on that on request.

I suspect there may be something wrong with XMPP connection via HTTP proxied
by nginx. See combined logs in jsxc_call.log, and browser console logs in
caller.js_log and callee.js_log .

Note these messages - probably that is what's wrong, but I have no idea what
to do about that.

==> /var/log/nginx/dev.decent.im.error_log <==
2017/02/27 23:16:00 [warn] 31562#0: *1015 upstream server temporarily disabled while reading response header from upstream, client: 188.221.179.100, server: dev.decent.im, request: "POST /http-bind/ HTTP/1.1", upstream: "https://[::1]:5281/http-bind/", host: "dev.decent.im", referrer: "https://dev.decent.im/jsxc/example/"
2017/02/27 23:16:00 [error] 31562#0: *1015 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 188.221.179.100, server: dev.decent.im, request: "POST /http-bind/ HTTP/1.1", upstream: "https://[::1]:5281/http-bind/", host: "dev.decent.im", referrer: "https://dev.decent.im/jsxc/example/"

In clients' browser console, I see such messages:

jsxc.dep.js:4809 POST https://dev.decent.im/http-bind/ 504 (Gateway Time-out)

still it seems the clients are somewhat resilient to these errors, as later
buddies presence updates happen and are logged to console.

Thanks in advance for any help with this.

Also, a quick question - is mailing list actually a thing? I've subscribed to it only to see that archive is empty, which discouraged me from posting there.

jsxc_call.log.txt
callee.js_log.txt
caller.js_log.txt

@sualko
Copy link
Member

sualko commented Mar 2, 2017

That's a beautiful report. Thanks for that. 👍

Currently my assumption is that this is not directly related to any NAT/WebRTC issue, because the call notification should appear before any WebRTC connection is established.

If I have time I will check your logs and see if I can find anything. Please remind me if I don't respond in a couple of days.

@sualko
Copy link
Member

sualko commented Mar 2, 2017

Maybe a6de6d6 will also fix our issue.

@andrey-utkin
Copy link
Author

No changes. Do I need to recompile combined JS files or do anything like that?

@andrey-utkin
Copy link
Author

If anybody could share a pair of credentials for another JSXC deployment, I'd test it. I am also happy to provide credentials from the setup I am testing this on.

@sualko
Copy link
Member

sualko commented Mar 3, 2017

@andrey-utkin
Copy link
Author

In order to try https://www.jsxc.org/example/ out, I need XMPP accounts on jsxc.org. My browsers (FF, Chrome) can't connect to dev.decent.im BOSH server, I suppose it's browsers restrictions, because on my server's side I didn't put such restrictions.

@MarcelWaldvogel
Copy link
Contributor

MarcelWaldvogel commented Mar 3, 2017

Actually, you do (to some extent:wink:), by not explicitly telling Prosody to allow cross-site BOSH requests. Therefore, you need to configure Prosody such that it tells your browser that this is an allowed operation.

You can enable this by adding cross_domain_bosh = true to your Prosody configuration. See https://prosody.im/doc/modules/mod_bosh

@sualko Could you add an appropriate comment to the example?

@sualko
Copy link
Member

sualko commented Mar 3, 2017

You can use demo1 to demo5 with password demo to test JSXC (XMPP domain: jsxc.org, BOSH url: /http-bind/).

😉

@andrey-utkin
Copy link
Author

@sualko thanks for pointing to credentials, there's too much text on that page for me to notice there's extra paragraph with it :) With these credentials, calls work.

@MarcelWaldvogel you must be right. Not being keen on BOSH, I assumed that since I proxy BOSH requests through nginx, prosody sees requests as coming from localhost and is fine with that.

BTW connecting to my BOSH server from https://www.jsxc.org/example/ fails because actual requests go to jsxc.org/http-bind/, jsxc.org seems to be hardcoded, and this was previously reported: #289 (comment)

@andrey-utkin
Copy link
Author

Unfortunately I fail to isolate the issue to browser vs server-side because I cannot connect to my BOSH/XMPP server using https://www.jsxc.org/example/ page and same way cannot connect to jsxc.org using my deployment of JSXC. I get such error when testing BOSH URL:

BOSH server NOT reachable or misconfigured.
Host unknown: jsxc.org is unknown

@MarcelWaldvogel
Copy link
Contributor

@sualko Maybe there should be a (server-side) test whether the BOSH server used has the appropriate CORS settings activated? At least on the example domain, so users can verify the correct configuration.

@andrey-utkin
Copy link
Author

@sualko could you also please update https://www.jsxc.org/example/ to latest version from git and/or take a note which version was previously deployed?

@sualko
Copy link
Member

sualko commented Mar 7, 2017

I updated and fixed the example. Please close this issue, if your original problem is solved.

@andrey-utkin
Copy link
Author

No, it is not fixed in my setup.

From looking into chrome://webrtc-internals, nothing happens after icegatheringstatechange in my setup. In case of JSXC, it is followed by setRemoteDescription and other interesting stages.

@andrey-utkin
Copy link
Author

I see that jsxc.min.js hasn't been updated lately, but it is downloaded when JSXC example page is opened. I've asked about this earlier in this thread, maybe this is why I see no changes?

Do I need to recompile combined JS files or do anything like that?

@sualko
Copy link
Member

sualko commented Mar 9, 2017

The example is updated to 3.1.1 and not to the latest nightly. And yes you have to build your own version if you like to use the latest git version. If you run make there should be a new folder called dev which holds all desired files.

@andrey-utkin
Copy link
Author

Thanks. Built it all, replaced build/ contents with dev/ contents, modified example/index.html as follows. The issue persists.

diff --git a/example/index.html b/example/index.html
index 1567b96..b04417d 100644
--- a/example/index.html
+++ b/example/index.html
@@ -27,7 +27,7 @@
    <script src="js/bootstrap.min.js"></script>
 
    <!-- jsxc library -->
-   <script src="../build/jsxc.min.js"></script>
+   <script src="../build/jsxc.js"></script>
 
    <!-- init script -->
    <script src="js/example.js"></script>

@andrey-utkin
Copy link
Author

When calling from demo*@jsxc.org to my accounts, my account session sees incoming call dialog box and call setup is attempted (though no success here). But when I call just between my accounts, there's no dialog on callee side.

@andrey-utkin
Copy link
Author

andrey-utkin commented Mar 10, 2017

Could you please reveal which XMPP server and maybe possible companion modules of it you use on jsxc.org? AFAIK there's none for Prosody, but I wonder what's the problem then.

@jngexact
Copy link

jngexact commented Aug 18, 2017

Was wondering if it was ever figured out what was causing this issue?

I'm seeing the same behavior of my setup, although I'm using ejabberd on Windows (on an Azure VM, if that makes a difference). My javascript logs (on caller and callee) are almost exactly the same as the one attached to this issue.

I also compared the javascript logs on caller and callee when using https://www.jsxc.org/example/ (which DOES work), and the log is the same. Everything looks OK, with the exception that the caller never receives the prompt.

Funnily enough, when my caller is in 'calling' mode, both caller and callee can still 'chat' via text. :-P

UPDATE: Found my issue! After studying the logs a little deeper, I realized that there was more debugging information available that could be turned on. So, the reason it didn't work for me was because I'm using ejabberd 17.08 which ran into the error reported jsxc/strophe.jinglejs#3 . I brought over the fix from otalk/jingle-session#5 and the video chat works AOK now. :)

Just wanted to update on my own comment-- as OP is using prosody, it's possible it's different issue altogether. Thanks.

@sualko sualko closed this as completed in c9339be Aug 21, 2017
@sualko
Copy link
Member

sualko commented Aug 21, 2017

We found a bug in our strophejs.jingle library, which causes an issue with outgoing jingle stanzas. I hope the fix work for you, otherwise reopen this issue. Sorry for the inconvenience.

@andrey-utkin
Copy link
Author

Thanks for heads up, will test soon.

@andrey-utkin
Copy link
Author

It indeed works now with latest master. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants