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

Unable to connect to chat server . #869

Closed
nitinsindhubt opened this issue Sep 13, 2017 · 6 comments
Closed

Unable to connect to chat server . #869

nitinsindhubt opened this issue Sep 13, 2017 · 6 comments

Comments

@nitinsindhubt
Copy link

nitinsindhubt commented Sep 13, 2017

For Receiving video call i need to do following things
1. I need to login to quick . blox
2. i should connect to the chat server

i am doing this using below code

I am trying to login on QuickBlox , after login Success and trying to connect user to Quickblox chat server .

 NSString *strQBLogin= @"SomeUserID"
    NSString *strQBPassword= @"Some_Password"
    
    [QBRequest logInWithUserLogin:strQBLogin   password:strQBPassword successBlock:^(QBResponse *response, QBUUser *user) {
        
        
        NSLog(@"Loggin to Quick Blox Server");
        
        
        user.password=strQBPassword;
        
        // connect to Chat
        
        
        NSLog(@"Connecting to user did start");

        [[QBChat instance] connectWithUser:user completion:^(NSError * _Nullable error) {
            
             NSLog(@"Connecting to user did Finish");
            
            if (error) {
                NSLog(@"Error in Conneting to Quick Blox ");
                
            }
            else
            {
             NSLog(@" Conneted to Quick Blox ");
               
            }
            
        }];
        
        
    } errorBlock:^(QBResponse *response) {
        
        
        
        // error handling
        NSLog(@"error: %@", response.error);
    }];

but when call

[[QBChat instance] connectWithUser:user completion:^(NSError * _Nullable error) {
 }];

i get the following error message in the log :

rtc::<QBRTCClient 0x6000002459a0, delegates[2]> did accidentally disconnect.
please help me ..

screen shot 2017-09-13 at 2 24 19 pm

After Enabling Debug Level Log

[QBSettings setLogLevel:QBLogLevelDebug];
  [QBSettings enableXMPPLogging];

screen shot 2017-09-13 at 2 39 11 pm

@nitinsindhubt
Copy link
Author

Abe bhai koi batayega ? kyun ho raha hai aisa ??

@ghost
Copy link

ghost commented Sep 13, 2017

Hi @nitinsindhubt, could you please check the port 5223 access in your firewall settings ?

@ghost ghost added the question label Sep 13, 2017
@nitinsindhubt
Copy link
Author

Thank you soo much ,,,,, Live long bro ,,,, you are real life saver :) . 👍

This is a issue of my office network , working fine on personal hotspot .

@nitinsindhubt
Copy link
Author

But how can i know if firwall is blocking , i need to show error message to user , when some user connect to such network

Thanks in advacne

@ghost
Copy link

ghost commented Sep 13, 2017

@nitinsindhubt, could you please update the issue on stackowerflow ?

@nitinsindhubt
Copy link
Author

nitinsindhubt commented Sep 13, 2017

Ok, I'll update the issue on stackoverflow .

but i have question

[[QBChat instance] connectWithUser:user completion:^(NSError * _Nullable error) {

 }];

the above block doesn't call , when i am getting such problem , if firewall is blocking you should return in the block with Error and error.localizedDescription

@ghost ghost self-assigned this Sep 15, 2017
@ghost ghost changed the title Uable to connect to connect to chat server . Unable to connect to chat server . Sep 19, 2017
@ghost ghost added bug and removed question labels Sep 29, 2017
@ghost ghost added this to the Quickblox.framework v 2.13 milestone Sep 29, 2017
@ghost ghost closed this as completed Oct 25, 2017
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant