gramjs icon indicating copy to clipboard operation
gramjs copied to clipboard

Connection closed while receiving data

Open ghost opened this issue 2 years ago • 20 comments

After a few hours, that disconnects whithout reason.

image

└── [email protected]

ghost avatar Jun 26 '22 03:06 ghost

Are you on the latest version? Node or browser? Did you do anything special in your code?

painor avatar Jun 26 '22 10:06 painor

Same issue for me, on latest version

vitalyster avatar Jun 26 '22 10:06 vitalyster

Same issue in node

Freihart512 avatar Jun 26 '22 12:06 Freihart512

can you try the latest version?

painor avatar Jun 26 '22 14:06 painor

Are you on the latest version? Node or browser? Did you do anything special in your code?

I didn't anything special in my code and I running Node

ghost avatar Jun 26 '22 14:06 ghost

same issue with node 14 and telegram(gramjs) 2.9.2 (last version Screen Shot 2022-06-27 at 18 00 58 )

Freihart512 avatar Jun 27 '22 23:06 Freihart512

Hey Same here:

2022-06-28_21-04-05

telegram: 2.9.2
node: 16.15.1
System:
  Host: ZenBook Kernel: 5.15.0-40-generic x86_64 bits: 64
    Desktop: KDE Plasma 5.24.4 Distro: Ubuntu 22.04 LTS (Jammy Jellyfish)

cc @painor I'm on latest version and it's happening

MoKhajavi75 avatar Jun 28 '22 17:06 MoKhajavi75

Fixed in latest

MoKhajavi75 avatar Jul 09 '22 19:07 MoKhajavi75

I have same problem

telegram: 2.10.7 node: 14.16

Qionar avatar Aug 12 '22 16:08 Qionar

Same problem here. Any solution ?

jeffersonveloso avatar Aug 18 '22 00:08 jeffersonveloso

I'm experiencing the same problems with gram.js version 2.13.6

amrtn avatar Nov 02 '22 09:11 amrtn

Hi, I have solved this problem. In my case, the problem was that I connected user using the library for the client ( browser ), but the session hash was used on the server side

Qionar avatar Nov 02 '22 14:11 Qionar

Hi, I have solved this problem. In my case, the problem was that I connected user using the library for the client ( browser ), but the session hash was used on the server side

Can you please post some codes?

MoKhajavi75 avatar Nov 03 '22 10:11 MoKhajavi75

Hi, I have solved this problem. In my case, the problem was that I connected user using the library for the client ( browser ), but the session hash was used on the server side

I have the same issue, but actually, I want to do this intentionally (I want to create a session in the browser and then use this session string on the server). Is it possible?

MaxNamazov avatar Jan 26 '23 09:01 MaxNamazov

Hello, I'm not sure about this. I tried to do it, but it doesn't work right. If you use nodejs as backend part of your application, just use promises

Qionar avatar Jan 26 '23 14:01 Qionar

@painor has already answered me in telegram and that's what he said:

they (sessions in the browser and on the server) are techincally compatible but you have to do some work to get them there. the reason that's happening is because browser (websocket) and node (normal sockets) use different api endpoints. You'd need to change this in the session to make it work. you can use setDC to do that

MaxNamazov avatar Jan 26 '23 19:01 MaxNamazov

Still facing this issue with gramjs 2.16.0 on browser.

Can we at least listen to this event somehow so I can logout my users nicely ? (because right now when they came back to my app they are just stuck due to the connection closed)

Badisi avatar May 18 '23 09:05 Badisi

telegram-cloud-photo-size-4-5794422344645721138-y telegram-cloud-photo-size-4-5787201581203176358-y

Account deactivation and banned because of this 😢

mikiyasET avatar Jun 17 '23 07:06 mikiyasET

@MaxNamazov You have mentioned that this error can be fixed with setDC, have you managed to fix it? Thanks

Raduc4 avatar Nov 21 '23 11:11 Raduc4

It was because of my internet network firewall

Raduc4 avatar Nov 22 '23 10:11 Raduc4