question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

JSXC example never logs in despite BOSH server reachable

See original GitHub issue

Expected behavior

Open JSXC app, list my buddies, chat…

Actual behavior

Stays stuck on Connecting…

Steps to reproduce the behavior

  1. Create an account on my XMPP server nicoco.fr
  2. Go to the JSXC example app
  3. Enter nicoco.fr as the domain https://nicoco.fr:5281/http-bind as the BOSH url
  4. Try to log in

Environment

  • JSXC version: 3.4.0
  • Host system and version: Debian Stretch, up-to-date
  • Browser vendor and version: Firefox 60.0.1 (also tried with chomium from debian repos)
  • Any browser plugins enabled? Doesn’t work even when they are all disabled
  • XMPP server vendor and version: prosody 0.10.2, mod_bosh, https through nginx reverse proxy
  • Is your XMPP server working with other clients as expected? Yes

Notes

Everything seems to be working according to the logs. The example app even displays:

BOSH Server reachable.

Unfortunately, something seems to block the login process. One of prosody devs tried the app on his own instance and it worked, and I couldn’t find what was different in his case.

Logs

Javascript

Nothing

JSXC

jsxc.enableDebugMode()
undefined
State changed to ESTABLISHING
jsxc.js:183:9
New connection
jsxc.js:183:9
CONNECTING: null
jsxc.js:183:9
> 
<body rid="1838547901" xmlns="http://jabber.org/protocol/httpbind" to="nicoco.fr" xml:lang="en" wait="60" hold="1" content="text/xml; charset=utf-8" ver="1.6" xmpp:version="1.0" xmlns:xmpp="urn:xmpp:xbosh">
jsxc.js:1221:12
< 
<body xmlns:stream="http://etherx.jabber.org/streams" xmpp:version="1.0" xmlns:xmpp="urn:xmpp:xbosh" ver="1.6" inactivity="60" requests="2" polling="5" secure="true" hold="1" from="nicoco.fr" authid="3d09d44e-e095-43c4-9fec-37c7266019c6" wait="60" sid="3d09d44e-e095-43c4-9fec-37c7266019c6" xmlns="http://jabber.org/protocol/httpbind">
jsxc.js:1218:12
> 
<body rid="1838547902" xmlns="http://jabber.org/protocol/httpbind" sid="3d09d44e-e095-43c4-9fec-37c7266019c6">
jsxc.js:1221:12
< 
<body sid="3d09d44e-e095-43c4-9fec-37c7266019c6" xmlns:stream="http://etherx.jabber.org/streams" xmlns="http://jabber.org/protocol/httpbind">
jsxc.js:1218:12
> 
<body rid="1838547903" xmlns="http://jabber.org/protocol/httpbind" sid="3d09d44e-e095-43c4-9fec-37c7266019c6">
jsxc.js:1221:12

XMPP: prosody.log

Jun 18 10:50:51 mod_bosh	info	New BOSH session, assigned it sid '3d09d44e-e095-43c4-9fec-37c7266019c6'

Nginx

138.96.203.17 - - [18/Jun/2018:10:53:16 +0200] "POST /http-bind HTTP/1.1" 200 148 "https://www.jsxc.org/example/" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0"

No error in any log I could find.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
truenicococommented, Jun 20, 2018

So, JSXC was not responsible at all, I apologize.

For the record, I had to leave consider_bosh_secure to true, since I’m reverse proxying with nginx… Sorry for the trouble and thank you for your time.

1reaction
jsxc-botcommented, Jun 18, 2018

GitMate.io thinks possibly related issues are https://github.com/jsxc/jsxc/issues/29 (BOSH server NOT reachable), https://github.com/jsxc/jsxc/issues/194 (BOSH server NOT reachable error despite BOSH server on same host.), https://github.com/jsxc/jsxc/issues/128 (BOSH), https://github.com/jsxc/jsxc/issues/674 (BOSH server NOT reachable or misconfigured), and https://github.com/jsxc/jsxc/issues/458 (BOSH server NOT reachable or misconfigured.).

Read more comments on GitHub >

github_iconTop Results From Across the Web

JSXC example never logs in despite BOSH server reachable -
Everything seems to be working according to the logs. The example app even displays: BOSH Server reachable. Unfortunately, something seems to block the ......
Read more >
JavaScript XMPP Client Documentation - Read the Docs
JSXC is a free XMPP client licensed under the MIT license. ... First off, make sure your BOSH server is accessible, and that...
Read more >
JavaScript XMPP Client / FAQ - JSXC
BOSH server not reachable. There are two main reasons why you can not reach your BOSH server: Reason: Your BOSH server does not...
Read more >
How to configure JavaScript XMPP Client(JSXC) to website?
"BOSH server NOT reachable or misconfigured. Your server responded with "404 Not Found". Please check if your BOSH server is running and ...
Read more >
FreedomBox/Manual - Debian Wiki
In this example, the FreedomBox is accessible at http://10.42.0.50. ... It will automatically check the BOSH server connection to the given domain name...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found