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

Can not connect (tgl/mtproto-utils.c:101: BN2ull: Assertion `0' failed) #1070

Open
portiSk8er opened this Issue Mar 31, 2016 · 25 comments

Comments

Projects
None yet
@portiSk8er

portiSk8er commented Mar 31, 2016

hi this is my problem:

pi@raspberrypi:~/tg $ bin/telegram-cli Telegram-cli version 1.4.1, Copyright (C) 2013-2015 Vitaly Valtman Telegram-cli comes with ABSOLUTELY NO WARRANTY; for details typeshow_license'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show_license' for details.
Telegram-cli uses libtgl version 2.1.0
Telegram-cli includes software developed by the OpenSSL Project
for use in the OpenSSL Toolkit. (http://www.openssl.org/)
I: config dir=[/home/pi/.telegram-cli]

telegram-cli: tgl/mtproto-utils.c:101: BN2ull: Assertion 0' failed. SIGNAL received

I am new at this I would greatly appreciate your help.
From already thank you very much

@portiSk8er

This comment has been minimized.

portiSk8er commented Apr 1, 2016

The error think you would find this piece of code.

sin titulo

@portiSk8er portiSk8er changed the title from Can not connect to Can not connect (tgl/mtproto-utils.c:101: BN2ull: Assertion `0' failed) Apr 1, 2016

@SoNickRND

This comment has been minimized.

SoNickRND commented Apr 2, 2016

Have the same issue. Using Ubuntu studio with XFCE 4.10 @ eee pc 900

Linux 3.13.0-83-generic #127-Ubuntu SMP Fri Mar 11 00:26:47 UTC 2016 i686 i686 i686 GNU/Linux

@Basketeer

This comment has been minimized.

Basketeer commented Apr 3, 2016

Same issue here.
Running on Raspberry Pi using
Linux 4.1.20+ #867 Wed Mar 23 20:09:16 GMT 2016 armv6l GNU/Linux

@Basketeer

This comment has been minimized.

Basketeer commented Apr 3, 2016

I now got the client running by commenting out lines 101 and 115 in tgl/mtproto-utils.c and recompiling it.
I know - a bad hack but it works for now ;)

@SoNickRND

This comment has been minimized.

SoNickRND commented Apr 4, 2016

Thanks @Basketeer! Works for me too.

@tsjk

This comment has been minimized.

tsjk commented Apr 7, 2016

I have this problem as well, on an ALARM Raspberry Pi (Linux 4.1.20-3-ARCH #1 Wed Mar 23 18:59:03 MDT 2016 armv6l GNU/Linux). Will try to comment those lines.

@eth0lv

This comment has been minimized.

eth0lv commented Apr 10, 2016

I have the same problem on my Raspberry Pi 2 (Linux raspberrypi 4.1.19-v7+ #858 SMP Tue Mar 15 15:56:00 GMT 2016 armv7l GNU/Linux). Someone solved this problem?

@alexander-f

This comment has been minimized.

alexander-f commented Apr 11, 2016

Yes, it is solved, as @Basketeer has written above:
In file tgl/mtproto-utils.c, replace in lines 101 and 115
assert (0); // As long as nobody ever uses this code, assume it is broken.
by
//assert (0); // As long as nobody ever uses this code, assume it is broken.
(or delete the lines) and run make again.

This solved the problem on my Raspberry Pi. Afterwards I was able to send and receive messages. So the statement "As long as nobody ever uses this code, assume it is broken" is no longer correct. The code is used and seems to be not broken.

@EricxDu

This comment has been minimized.

EricxDu commented Apr 18, 2016

+1 this issue. Hope it gets addressed soon. :-)

@mohamed-soubhi

This comment has been minimized.

@mohamed-soubhi

This comment has been minimized.

mohamed-soubhi commented May 17, 2016

@alexander-f please give us steps to solve it

This was referenced May 30, 2016

@maikhaslinger

This comment has been minimized.

maikhaslinger commented Jun 18, 2016

Thanks @Basketeer! Works fine on my Raspberry! 👍

@vektorious

This comment has been minimized.

vektorious commented Jun 19, 2016

Hey guys,

I tried commented line 101 and 115 and I still get the same error message:
mtproto-utils.c:

static unsigned long long BN2ull (TGLC_bn b) {
if (sizeof (unsigned long) == 8) {
return TGLC_bn_get_word (b);
} else if (sizeof (unsigned long long) == 8) {
// assert (0); // As long as nobody ever uses this code, assume it is broken.
unsigned long long tmp;
/
Here be dragons, but it should be okay due to be64toh */
TGLC_bn_bn2bin (b, (unsigned char *) &tmp);
return be64toh (tmp);
} else {
assert (0);
}
}

Message:

pi@raspberrypi:~/tg $ telegram-cli -k tg-server.pub
Telegram-cli version 1.4.1, Copyright (C) 2013-2015 Vitaly Valtman
Telegram-cli comes with ABSOLUTELY NO WARRANTY; for details type show_license'. This is free software, and you are welcome to redistribute it under certain conditions; typeshow_license' for details.
Telegram-cli uses libtgl version 2.1.0
Telegram-cli includes software developed by the OpenSSL Project
for use in the OpenSSL Toolkit. (http://www.openssl.org/)
I: config dir=[/home/pi/.telegram-cli]

telegram-cli: tgl/mtproto-utils.c:101: BN2ull: Assertion `0' failed.
SIGNAL received

Do you have any idea what to do now? I already tried to delete the line and also a complete reset but the error consists.

Thanks in advance!

@Krypt0n

This comment has been minimized.

Krypt0n commented Jun 24, 2016

If line 101 is commented out you will not get an error message caused by line 101. Line 101 will not be as before integrated in compilation. Please run "make" again and check if u run the correct "telegram-cli" binary, it will be generated at "tg/bin/telegram-cli". Your call "pi@raspberrypi:~/tg $ telegram-cli -k tg-server.pub" does not call the binary of the "bin" dir, or did you make n symbolic link?

AND what is this:
/ Here be dragons, but it should be okay due to be64toh */

"/" ist not a correct comment start, revert it to look like this:

/* Here be dragons, but it should be okay due to be64toh */

@woakesd

This comment has been minimized.

woakesd commented Jul 29, 2016

This appears only to be an issue when building on 32 bit linux. I don't get this on 64 bit ubuntu.

A not very useful work around is to copy an existing .telegram_cli into the user. This saves authenticating again.

@pippo73

This comment has been minimized.

pippo73 commented Aug 10, 2016

Hi all,
I can confirm the same problem on a Raspberry PI 3 and the fix posted by @Basketeer .
Thank you

@AndreaLombardo

This comment has been minimized.

AndreaLombardo commented Sep 4, 2016

Worked for me on Raspberry Pi Model B. Thanks @Basketeer

@Sendery

This comment has been minimized.

Sendery commented Sep 11, 2016

It works for me
Ubuntu 12.04 32bits i386

@roidaponte

This comment has been minimized.

roidaponte commented Sep 13, 2016

Worked for me on Raspberry Pi Model B. Thanks @Basketeer

@TixleTeam

This comment has been minimized.

TixleTeam commented Oct 10, 2016

Hi guys. I get this error:

pi@raspberrypi:~/tg $ bin/telegram-cli Telegram-cli version 1.4.1, Copyright (C) 2013-2015 Vitaly Valtman Telegram-cli comes with ABSOLUTELY NO WARRANTY; for details typeshow_license'. This is free software, and you are welcome to redistribute it under certain conditions; typeshow_license' for details. Telegram-cli uses libtgl version 2.1.0 Telegram-cli includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. (http://www.openssl.org/) I: config dir=[/home/pi/.telegram-cli]

how to fix it?please help ;)

@Mauricio1405

This comment has been minimized.

Mauricio1405 commented Dec 23, 2016

what is the route of tg ?

@alonek1

This comment has been minimized.

alonek1 commented Jan 10, 2017

solved by commenting those two lines.

@kasumiru

This comment has been minimized.

kasumiru commented Jan 20, 2017

It works for me
CentOS release 6.5 (Final)

@a-x-

This comment has been minimized.

a-x- commented Nov 6, 2017

jfi, my installation instruction for debian based os (for rpi too) now:

### setup tg-cli

# https://github.com/vysheng/tg

sudo apt-get install libreadline-dev libconfig-dev libssl-dev lua5.2 liblua5.2-dev libevent-dev libjansson-dev libpython-dev make
cd ~/services/
git clone --recursive https://github.com/vysheng/tg.git && cd tg
cd tgl
git remote set-url origin  git@github.com:a-x-/tgl.git
git fetch && git checkout patch-1
cd ..
./configure && make
ln -s ~/services/tg/bin/telegram-cli ~/bin
sudo mkdir -p /etc/telegram-cli
sudo cp tg-server.pub /etc/telegram-cli/server.pub

telegram-cli -W

link: https://gist.github.com/a-x-/2530f94f838f7fc910563786269ebe03

@johngh

This comment has been minimized.

johngh commented Feb 4, 2018

Thanks a-x- !!!

If you don't have SSH keys set up for github (see below) you get a fatal error when you do:

git remote set-url origin git@github.com:a-x-/tgl.git

It dies with:

Permission denied (publickey).
fatal: The remote end hung up unexpectedly

If you get that error, and you don't want to setup SSH keys from the account you're on, you can use this instead:

git remote set-url origin https://github.com/a-x-/tgl.git

and that works fine.

See https://help.github.com/articles/error-permission-denied-publickey/ for more details on keys.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment