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

SendCode callback never called #12

Open
overjt opened this issue Oct 29, 2015 · 9 comments
Open

SendCode callback never called #12

overjt opened this issue Oct 29, 2015 · 9 comments

Comments

@overjt
Copy link

overjt commented Oct 29, 2015

Hello.
I'm using this code:
https://gist.github.com/overjt/ae2ebc85b8308beac40c

data.onPhoneNumber = function(s) {
    if (data.user === undefined) {
        data.user = {};
    }
    data.user.phone = s.trim();
    //i.close();
    console.log('Checking your phone number with Telegram...');
    data.client.auth.sendCode(data.user.phone, 5, 'en', function(result) {
        console.log("never called");
        console.log(result);
    });
}

The login code arrives but the function passed as callback is never executed.

console

there's something I'm doing wrong?

@rtalwar26
Copy link

I am facing the same issue, "client.sendCode" callback is never called.

@enricostara
Copy link
Owner

Which node.js version are you using?

@rtalwar26
Copy link

v0.12.7

@overjt
Copy link
Author

overjt commented Nov 13, 2015

@enricostara v4.2.1

@overjt
Copy link
Author

overjt commented Nov 21, 2015

Everything works when the connection type "tcp" is changed to http, but HTTP connection does not work in windows.

@masious
Copy link

masious commented Mar 30, 2016

@overjt That didn't solve my issue. I get the code in my telegram, but the callback of sendCode is not being called.

@jyothisjose
Copy link

jyothisjose commented Jun 27, 2016

@overjt Does this works? Are you able to get into callback function? If so how did you fix it?

I am also facing the same issue in
client.contacts.getContacts("",function(container){
console.log('getContacts');
})
Callback function is not calling. Am I missing something?

Can some one please help me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants
@rtalwar26 @jyothisjose @overjt @masious @enricostara and others