TelegramApi icon indicating copy to clipboard operation
TelegramApi copied to clipboard

No server found for dc 4

Open justmisam opened this issue 8 years ago • 4 comments

Hi, When I call sendCode method, I got this error:

telegramApi.js:1182 [0.834] Error 303 PHONE_MIGRATE_4 false 2 ... Get networker error Error: No server found for dc 4(…) Error: No server found for dc 4 at Object.mtpAuth [as auth] (file:///home/misam/misam/node_modules/telegram-api-js/dist/telegramApi.js:1644:30) .... Can you help me?!

justmisam avatar Nov 22 '16 11:11 justmisam

got the same error message.

stuk88 avatar Nov 30 '16 19:11 stuk88

Hi, you can clone your ip addr for DC 2 something like this

telegramApi.setConfig({
  ...
  server: {
    production: [
        { id: 1, host: '149.154.167.40', port: 443},
        { id: 2, host: '149.154.167.40', port: 443},
        { id: 3, host: '149.154.167.40', port: 443},
        { id: 4, host: '149.154.167.40', port: 443},
        { id: 5, host: '149.154.167.40', port: 443},
    ]
  }
});

Or may be you can take hosts from webogram repository https://github.com/zhukov/webogram/blob/82aec7a6daea93631b9eb14a89248d2b9580a906/app/js/lib/mtproto.js#L20 But I don't know whether it will work.

sunriselink avatar Dec 01 '16 09:12 sunriselink

Using the hosts from webogram repo fix the issue, ty. Also the Error 303 PHONE_MIGRATE_4 false 2 continue showing up but it doesn't seem to have any relevance on the functionality.

fjcaballero avatar Dec 09 '16 12:12 fjcaballero

but how to solve Error 303 PHONE_MIGRATE_4 false 2 because it prevents to load user's profile photo.

siyamak45 avatar Dec 28 '16 15:12 siyamak45