telegram-mt-node
telegram-mt-node copied to clipboard
Cannot create authKey
Hello, I'm facing a weird problem when I try to create an authkey, the error I am receiving is:
I'm using Telegram.Link to as a dependency.
[ERROR] Fri, 09 Dec 2016 14:20:21 GMT ConstructorBuilder.registry Unable to retrieve a Type by Id [00000000000000000198562b9ebd4a5840000000632416056be4800f5a191361ca0e9d74428b918313613128856cd8176808cc21abb7cdaf081690f737d01a355100000015c4b51c01000000216be86c022bb4c3]
I am using it like this:
export default class Client {
constructor(){
this.data = {}
}
{...}
connect(){
this.data.client = Telegram.Link.createClient(
this.data.app, this.data.dataCenter,(error) => {
if (error) {
console.log("Unable to create client: " + JSON.stringify(error));
return this.connect();
} else {
console.log("Creating auth key...");
try{
this.data.client.createAuthKey((auth) =>{
this.data.app.authKey = auth.key.encrypt('password');
console.log('client connect to ' + JSON.stringify(this.data.dataCenter));
});
}catch(error){
console.log('Error:', error);
}
}
});
}
}
Any idea of what could be happening? Thank you.
@mistougi can you test my fork? https://github.com/goodmind/telegram.link