candy-chat / candy

JavaScript-based multi-user chat client for XMPP.
http://candy-chat.github.io/candy
MIT License
1.32k stars 370 forks source link

candy still binding on connection.... #470

Closed hamdijmii1992 closed 8 years ago

hamdijmii1992 commented 8 years ago

I use candy js with mongooseIM as an XMPP server. I add a room to my server as following: {mod_muc, [ {host, "conference.localhost"}, {access, all}, {access_create, muc_create} ]}, I add this room to my index.html as following: // ['test@conference.example.com'] // -> array of rooms to join after connecting autojoin: ['conference.localhost']

but when I try to connect I had this log under and the window still binding on "Connecting ..."

This is my log:

[]([Init] Debugging enabled candy.bundle.js:202 [Connection] Connecting candy.bundle.js:234 [Strophe][DEBUG]: _throttledRequestHandler called with 1 requests candy.bundle.js:234 [Strophe][DEBUG]: request id 1.0 posting candy.bundle.js:234 [Strophe][DEBUG]: request id 1.0 state changed to 1 candy.bundle.js:202 SENT: candy.bundle.js:234 [Strophe][DEBUG]: request id 1.1 state changed to 2 candy.bundle.js:234 [Strophe][DEBUG]: request id 1.1 state changed to 3 candy.bundle.js:234 [Strophe][DEBUG]: request id 1.1 state changed to 4 candy.bundle.js:234 [Strophe][DEBUG]: removing request candy.bundle.js:234 [Strophe][DEBUG]: _throttledRequestHandler called with 0 requests candy.bundle.js:234 [Strophe][DEBUG]: request id 1 should now be removed candy.bundle.js:234 [Strophe][DEBUG]: request id 1.1 got 200 candy.bundle.js:234 [Strophe][INFO]: _connect_cb was called candy.bundle.js:202 RECV: stream:featuresX-OAUTHDIGEST-MD5SCRAM-SHA-1PLAIN/stream:features candy.bundle.js:234 [Strophe][DEBUG]: _throttledRequestHandler called with 0 requests candy.bundle.js:234 [Strophe][DEBUG]: request id 2.0 posting candy.bundle.js:234 [Strophe][DEBUG]: request id 2.0 state changed to 1 candy.bundle.js:202 SENT: biwsbj1hZG1pbixyPWQ0MWQ4Y2Q5OGYwMGIyMDRlOTgwMDk5OGVjZjg0Mjdl candy.bundle.js:234 [Strophe][DEBUG]: request id 2.1 state changed to 2 candy.bundle.js:234 [Strophe][DEBUG]: request id 2.1 state changed to 3 candy.bundle.js:234 [Strophe][DEBUG]: request id 2.1 state changed to 4 candy.bundle.js:234 [Strophe][DEBUG]: removing request candy.bundle.js:234 [Strophe][DEBUG]: _throttledRequestHandler called with 0 requests candy.bundle.js:234 [Strophe][DEBUG]: request id 2 should now be removed candy.bundle.js:234 [Strophe][DEBUG]: request id 2.1 got 200 candy.bundle.js:234 [Strophe][INFO]: _dataRecv called candy.bundle.js:202 RECV: cj1kNDFkOGNkOThmMDBiMjA0ZTk4MDA5OThlY2Y4NDI3ZTdwcXZLZ25weFdlSy9SdGp3V281aFE9PSxzPW9IR0xBM3hYY2ZpU2tjRWRwalNwUWc9PSxpPTQwOTY= candy.bundle.js:234 [Strophe][DEBUG]: _throttledRequestHandler called with 0 requests candy.bundle.js:234 [Strophe][DEBUG]: request id 3.0 posting candy.bundle.js:234 [Strophe][DEBUG]: request id 3.0 state changed to 1 candy.bundle.js:202 SENT: Yz1iaXdzLHI9ZDQxZDhjZDk4ZjAwYjIwNGU5ODAwOTk4ZWNmODQyN2U3cHF2S2ducHhXZUsvUnRqd1dvNWhRPT0scD1hdFNySGVSeWpVMGdFZUQwN0ozSWt6aWpLSE09 candy.bundle.js:234 [Strophe][DEBUG]: request id 3.1 state changed to 2 candy.bundle.js:234 [Strophe][DEBUG]: request id 3.1 state changed to 3 candy.bundle.js:234 [Strophe][DEBUG]: request id 3.1 state changed to 4 candy.bundle.js:234 [Strophe][DEBUG]: removing request candy.bundle.js:234 [Strophe][DEBUG]: _throttledRequestHandler called with 0 requests candy.bundle.js:234 [Strophe][DEBUG]: request id 3 should now be removed candy.bundle.js:234 [Strophe][DEBUG]: request id 3.1 got 200 candy.bundle.js:234 [Strophe][INFO]: _dataRecv called candy.bundle.js:202 RECV: dj0xc2M2dzh6VHkvTjQ4WisrYVVmL05OazFHT3c9 candy.bundle.js:234 [Strophe][INFO]: SASL authentication succeeded. candy.bundle.js:234 [Strophe][DEBUG]: _throttledRequestHandler called with 0 requests candy.bundle.js:234 [Strophe][DEBUG]: request id 4.0 posting candy.bundle.js:234 [Strophe][DEBUG]: request id 4.0 state changed to 1 candy.bundle.js:202 SENT: candy.bundle.js:234 [Strophe][DEBUG]: request id 4.1 state changed to 2 candy.bundle.js:234 [Strophe][DEBUG]: request id 4.1 state changed to 3 candy.bundle.js:234 [Strophe][DEBUG]: request id 4.1 state changed to 4 candy.bundle.js:234 [Strophe][DEBUG]: removing request candy.bundle.js:234 [Strophe][DEBUG]: _throttledRequestHandler called with 0 requests candy.bundle.js:234 [Strophe][DEBUG]: request id 4 should now be removed candy.bundle.js:234 [Strophe][DEBUG]: request id 4.1 got 200 candy.bundle.js:234 [Strophe][INFO]: _dataRecv called candy.bundle.js:202 RECV: stream:features/stream:features candy.bundle.js:234 [Strophe][DEBUG]: _throttledRequestHandler called with 0 requests candy.bundle.js:234 [Strophe][DEBUG]: request id 5.0 posting candy.bundle.js:234 [Strophe][DEBUG]: request id 5.0 state changed to 1 candy.bundle.js:202 SENT: Candy candy.bundle.js:234 [Strophe][DEBUG]: request id 5.1 state changed to 2 candy.bundle.js:234 [Strophe][DEBUG]: request id 5.1 state changed to 3 candy.bundle.js:234 [Strophe][DEBUG]: request id 5.1 state changed to 4 candy.bundle.js:234 [Strophe][DEBUG]: removing request candy.bundle.js:234 [Strophe][DEBUG]: _throttledRequestHandler called with 0 requests candy.bundle.js:234 [Strophe][DEBUG]: request id 5 should now be removed candy.bundle.js:234 [Strophe][DEBUG]: request id 5.1 got 200 candy.bundle.js:234 [Strophe][INFO]: _dataRecv called candy.bundle.js:202 RECV: jid>admin@localhost/Candy</jid candy.bundle.js:234 [Strophe][DEBUG]: _throttledRequestHandler called with 0 requests candy.bundle.js:234 [Strophe][DEBUG]: request id 6.0 posting candy.bundle.js:234 [Strophe][DEBUG]: request id 6.0 state changed to 1 candy.bundle.js:202 SENT: candy.bundle.js:234 [Strophe][DEBUG]: request id 6.1 state changed to 2 candy.bundle.js:234 [Strophe][DEBUG]: request id 6.1 state changed to 3 candy.bundle.js:234 [Strophe][DEBUG]: request id 6.1 state changed to 4 candy.bundle.js:234 [Strophe][DEBUG]: removing request candy.bundle.js:234 [Strophe][DEBUG]: _throttledRequestHandler called with 0 requests candy.bundle.js:234 [Strophe][DEBUG]: request id 6 should now be removed candy.bundle.js:234 [Strophe][DEBUG]: request id 6.1 got 200 candy.bundle.js:234 [Strophe][INFO]: _dataRecv called candy.bundle.js:202 RECV: candy.bundle.js:202 [Connection] Connected candy.bundle.js:202 [Connection] Attached candy.bundle.js:234 [Strophe][DEBUG]: _throttledRequestHandler called with 0 requests candy.bundle.js:234 [Strophe][DEBUG]: _throttledRequestHandler called with 0 requests candy.bundle.js:234 [Strophe][ERROR]: User connection callback caused an exception: TypeError: Cannot read property 'replace' of nullk.debug.b.log @ candy.bundle.js:234error @ libs.min.js:1_changeConnectStatus @ libs.min.js:1_sasl_session_cb @ libs.min.js:1run @ libs.min.js:1(anonymous function) @ libs.min.js:1forEachChild @ libs.min.js:1_dataRecv @ libs.min.js:1_onRequestStateChange @ libs.min.js:2 candy.bundle.js:234 [Strophe][DEBUG]: request id 7.0 posting candy.bundle.js:234 [Strophe][DEBUG]: request id 7.0 state changed to 1 candy.bundle.js:202 SENT: candy.bundle.js:234 [Strophe][DEBUG]: request id 7.1 state changed to 2 candy.bundle.js:234 [Strophe][DEBUG]: request id 7.1 state changed to 3 candy.bundle.js:234 [Strophe][DEBUG]: request id 7.1 state changed to 4 candy.bundle.js:234 [Strophe][DEBUG]: removing request candy.bundle.js:234 [Strophe][DEBUG]: _throttledRequestHandler called with 0 requests candy.bundle.js:234 [Strophe][DEBUG]: request id 7 should now be removed candy.bundle.js:234 [Strophe][DEBUG]: request id 7.1 got 200 candy.bundle.js:234 [Strophe][INFO]: _dataRecv called candy.bundle.js:202 RECV: candy.bundle.js:234 [Strophe][DEBUG]: _throttledRequestHandler called with 0 requests candy.bundle.js:234 [Strophe][DEBUG]: request id 8.0 posting candy.bundle.js:234 [Strophe][DEBUG]: request id 8.0 state changed to 1 candy.bundle.js:202 SENT: 1 candy.bundle.js:234 [Strophe][DEBUG]: request id 8.1 state changed to 2 candy.bundle.js:234 [Strophe][DEBUG]: request id 8.1 state changed to 3 candy.bundle.js:234 [Strophe][DEBUG]: request id 8.1 state changed to 4 candy.bundle.js:234 [Strophe][DEBUG]: removing request candy.bundle.js:234 [Strophe][DEBUG]: _throttledRequestHandler called with 0 requests candy.bundle.js:234 [Strophe][DEBUG]: request id 8 should now be removed candy.bundle.js:234 [Strophe][DEBUG]: request id 8.1 got 200 candy.bundle.js:234 [Strophe][INFO]: _dataRecv called candy.bundle.js:202 RECV: candy.bundle.js:234 [Strophe][INFO]: no requests during idle cycle, sending blank request candy.bundle.js:234 [Strophe][DEBUG]: request id 9.0 posting candy.bundle.js:234 [Strophe][DEBUG]: request id 9.0 state changed to 1 candy.bundle.js:202 SENT: candy.bundle.js:234 [Strophe][DEBUG]: request id 9.1 state changed to 2 candy.bundle.js:234 [Strophe][DEBUG]: request id 9.1 state changed to 3 candy.bundle.js:234 [Strophe][DEBUG]: request id 9.1 state changed to 4 candy.bundle.js:234 [Strophe][DEBUG]: removing request candy.bundle.js:234 [Strophe][DEBUG]: _throttledRequestHandler called with 0 requests candy.bundle.js:234 [Strophe][DEBUG]: request id 9 should now be removed candy.bundle.js:234 [Strophe][DEBUG]: request id 9.1 got 200 candy.bundle.js:234 [Strophe][INFO]: _dataRecv called candy.bundle.js:202 RECV: 1 candy.bundle.js:202 [Jabber] Presence candy.bundle.js:234 [Strophe][INFO]: no requests during idle cycle, sending blank request candy.bundle.js:234 [Strophe][DEBUG]: request id 10.0 posting candy.bundle.js:234 [Strophe][DEBUG]: request id 10.0 state changed to 1 candy.bundle.js:202 SENT:

Why my app still binding on Conncting ... and does not pass to other view ??

hamdijmii1992 commented 8 years ago

I think that the source of bug is this error: candy.bundle.js:234 [Strophe][ERROR]: User connection callback caused an exception: TypeError: Cannot read property 'replace' of nullk.debug.b.log @ candy.bundle.js:234error @ but I don't know how to fix it !!!

mweibel commented 8 years ago

This is a JID for a room with your config: test@conference.localhost What you specified is: conference.localhost

You specified a wrong argument to autojoin. What you configured in the config is the muc host which is kind of like a domain for all MUC rooms. Then you set this host as the autojoin argument, when in fact you'd need to specify an actual room. So first create a room to autojoin and then in the config specify it as documented.

hamdijmii1992 commented 8 years ago

@mweibel Thank you for this indication, but, I did not found the command line in mongooseIM that create a muc room !!!!