Software Archive
Read-only legacy content
17061 Discussions

StropheJs - Connecting issues only on debug

Quentin_G_
Beginner
434 Views

Hello community,

i'm currently developping an app that support XMPP using StropheJs

When i build, then install manually, it works fine, it can connect to BOSH server.

The problem is when I debug it through XDK, it stuck on the Connecting state.

Weirdly I have answer 200 on hxr POST request to the bosh server.

 

Anyone can help ? 

Thank you very much.

0 Kudos
4 Replies
Elroy_A_Intel
Employee
434 Views

Are you debugging your project with the Emulate Tab or the Debug Tab?

0 Kudos
Quentin_G_
Beginner
434 Views

With the debug tab.

 

It's working fine on the emulate tab but i have to use debug tab because i have cordova plugins too.

Thanks

0 Kudos
Elroy_A_Intel
Employee
434 Views

What do you mean by it getting stuck if you received a response?

0 Kudos
Quentin_G_
Beginner
434 Views

It is designed like that : 

onConnect : function(status){
        if (status === Strophe.Status.CONNECTING) {
            Chat.log('Strophe is connecting.');
        }
        else if (status === Strophe.Status.CONNFAIL) {
            Chat.log('Strophe failed to connect.');
        }
        else if (status === Strophe.Status.DISCONNECTING) {
            Chat.log('Strophe is disconnecting.');
        }
        else if (status === Strophe.Status.DISCONNECTED) {
            Chat.log('Strophe is disconnected.');
        }
        else if (status === Strophe.Status.CONNECTED) {
            Chat.log('Strophe is connected.');
        }
}

Emulator or build give me connecting then connected then continue with the code.

Debug is stuck at connecting

0 Kudos
Reply