Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
29 Views

StropheJs - Connecting issues only on debug

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.

Tags (2)
0 Kudos
4 Replies
Highlighted
Employee
29 Views

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

0 Kudos
Highlighted
Beginner
29 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
Highlighted
Employee
29 Views

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

0 Kudos
Highlighted
Beginner
29 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