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

Infinite loop when use upload.GetFile #735

Open
taphuocanh94 opened this issue Oct 15, 2024 · 0 comments
Open

Infinite loop when use upload.GetFile #735

taphuocanh94 opened this issue Oct 15, 2024 · 0 comments

Comments

@taphuocanh94
Copy link

I'm using NodeJS 22 and telegram package 2.25.15.

I want to download large file by parts with bellow code

const media = sourceMessage.media
const info = getFileInfo(media);
const getterDc = await getter.getSender(info.dcId);
let filePart = await getterDc.send(
    new Api.upload.GetFile({
        location: info.location,
        offset: BigInt(offset),
        limit: partSize,
        precise: true,
        cdnSupported: true,
    })
)

The code only runs right in a luc. Then start an infinite loop as the diary below.

It seems that there are 2 packets that cannot be completed in a part of download. But I don't know how to know what the error happened and how to handle it.

Currently, I am handled by stopping the program and restarting by hand.

Is anyone able to help me with this problem?

Thank you.

[2024-10-15T10:28:41.299] [DEBUG] - [Send upload.GetFile]
[2024-10-15T10:28:41.300] [DEBUG] - [Assigned msgId = 7425839202891631424 to upload.GetFile]
[2024-10-15T10:28:41.300] [DEBUG] - [Assigned msgId = 7425839202891631428 to upload.GetFile]
[2024-10-15T10:28:41.300] [DEBUG] - [Assigned msgId = 7425839202891631432 to upload.GetFile]
[2024-10-15T10:28:41.300] [DEBUG] - [Assigned msgId = 7425839202891631436 to upload.GetFile]
[2024-10-15T10:28:41.300] [DEBUG] - [Assigned msgId = 7425839202891631440 to upload.GetFile]
[2024-10-15T10:28:41.300] [DEBUG] - [Assigned msgId = 7425839202891631444 to upload.GetFile]
[2024-10-15T10:28:41.300] [DEBUG] - [Assigned msgId = 7425839202891631448 to upload.GetFile]
[2024-10-15T10:28:41.301] [DEBUG] - [Assigned msgId = 7425839202895632088 to upload.GetFile]
[2024-10-15T10:28:41.301] [DEBUG] - [Assigned msgId = 7425839202895632092 to upload.GetFile]
[2024-10-15T10:28:41.301] [DEBUG] - [Assigned msgId = 7425839202895632096 to upload.GetFile]
[2024-10-15T10:28:41.301] [DEBUG] - [Assigned msgId = 7425839202895632100 to MsgsAck]
[2024-10-15T10:28:41.301] [DEBUG] - [Got 11 message(s) to send]
[2024-10-15T10:28:41.301] [DEBUG] - [Encrypting 11 message(s) in 1100 bytes for sending]
[2024-10-15T10:28:41.301] [DEBUG] - [Sending   upload.GetFile,upload.GetFile,upload.GetFile,upload.GetFile,upload.GetFile,upload.GetFile,upload.GetFile,upload.GetFile,upload.GetFile,upload.GetFile,MsgsAck]
[2024-10-15T10:28:47.231] [DEBUG] - [Send PingDelayDisconnect]
[2024-10-15T10:28:47.232] [DEBUG] - [Assigned msgId = 7425839228389435840 to PingDelayDisconnect]
[2024-10-15T10:28:47.232] [DEBUG] - [Assigned msgId = 7425839228389435844 to MsgsAck]
[2024-10-15T10:28:47.233] [DEBUG] - [Got 2 message(s) to send]
[2024-10-15T10:28:47.233] [DEBUG] - [Encrypting 2 message(s) in 116 bytes for sending]
[2024-10-15T10:28:47.233] [DEBUG] - [Sending   PingDelayDisconnect,MsgsAck]
[2024-10-15T10:28:47.233] [DEBUG] - [Encrypted messages put in a queue to be sent]
[2024-10-15T10:28:47.234] [DEBUG] - [Waiting for messages to send... false]
[2024-10-15T10:28:47.282] [DEBUG] - [Handling update Updates]
[2024-10-15T10:28:47.282] [DEBUG] - [Receiving items from the network...]
[2024-10-15T10:28:47.284] [DEBUG] - [Handling update Updates]
[2024-10-15T10:28:47.284] [DEBUG] - [Receiving items from the network...]
[2024-10-15T10:28:47.285] [DEBUG] - [Handling update Updates]
[2024-10-15T10:28:47.286] [DEBUG] - [Receiving items from the network...]
[2024-10-15T10:28:47.286] [DEBUG] - [Handling update Updates]
[2024-10-15T10:28:47.287] [DEBUG] - [Receiving items from the network...]
[2024-10-15T10:28:47.287] [DEBUG] - [Handling container]
[2024-10-15T10:28:47.287] [DEBUG] - [Handling pong for message 7425839228389435840]
[2024-10-15T10:28:47.287] [DEBUG] - [Handling update UpdateShort]
[2024-10-15T10:28:47.288] [DEBUG] - [Receiving items from the network...]
[2024-10-15T10:28:47.289] [DEBUG] - [Handling update Updates]
[2024-10-15T10:28:47.289] [DEBUG] - [Receiving items from the network...]
[2024-10-15T10:28:48.451] [DEBUG] - [Send PingDelayDisconnect]
[2024-10-15T10:28:48.452] [DEBUG] - [Assigned msgId = 7425839233564402296 to PingDelayDisconnect]
[2024-10-15T10:28:48.452] [DEBUG] - [Assigned msgId = 7425839233564402300 to MsgsAck]
[2024-10-15T10:28:48.452] [DEBUG] - [Got 2 message(s) to send]
[2024-10-15T10:28:48.452] [DEBUG] - [Encrypting 2 message(s) in 156 bytes for sending]
[2024-10-15T10:28:48.453] [DEBUG] - [Sending   PingDelayDisconnect,MsgsAck]
[2024-10-15T10:28:48.453] [DEBUG] - [Encrypted messages put in a queue to be sent]
[2024-10-15T10:28:48.453] [DEBUG] - [Waiting for messages to send... false]
[2024-10-15T10:28:48.498] [DEBUG] - [Handling pong for message 7425839233564402296]
[2024-10-15T10:28:48.499] [DEBUG] - [Receiving items from the network...]
[2024-10-15T10:28:56.289] [DEBUG] - [Send PingDelayDisconnect]
[2024-10-15T10:28:56.290] [DEBUG] - [Assigned msgId = 7425839267276140900 to PingDelayDisconnect]
[2024-10-15T10:28:56.290] [DEBUG] - [Assigned msgId = 7425839267276140904 to MsgsAck]
[2024-10-15T10:28:56.290] [DEBUG] - [Got 2 message(s) to send]
[2024-10-15T10:28:56.291] [DEBUG] - [Encrypting 2 message(s) in 148 bytes for sending]
[2024-10-15T10:28:56.291] [DEBUG] - [Sending   PingDelayDisconnect,MsgsAck]
[2024-10-15T10:28:56.291] [DEBUG] - [Encrypted messages put in a queue to be sent]
[2024-10-15T10:28:56.291] [DEBUG] - [Waiting for messages to send... false]
[2024-10-15T10:28:56.337] [DEBUG] - [Handling update Updates]
[2024-10-15T10:28:56.338] [DEBUG] - [Receiving items from the network...]
[2024-10-15T10:28:56.339] [DEBUG] - [Handling update Updates]
[2024-10-15T10:28:56.339] [DEBUG] - [Receiving items from the network...]
[2024-10-15T10:28:56.340] [DEBUG] - [Handling update Updates]
[2024-10-15T10:28:56.340] [DEBUG] - [Receiving items from the network...]
[2024-10-15T10:28:56.341] [DEBUG] - [Handling update Updates]
[2024-10-15T10:28:56.341] [DEBUG] - [Receiving items from the network...]
[2024-10-15T10:28:56.342] [DEBUG] - [Handling container]
[2024-10-15T10:28:56.342] [DEBUG] - [Handling pong for message 7425839267276140900]
[2024-10-15T10:28:56.342] [DEBUG] - [Handling update Updates]
[2024-10-15T10:28:56.342] [DEBUG] - [Receiving items from the network...]
[2024-10-15T10:28:57.505] [DEBUG] - [Send PingDelayDisconnect]
[2024-10-15T10:28:57.505] [DEBUG] - [Assigned msgId = 7425839272431108808 to PingDelayDisconnect]
[2024-10-15T10:28:57.506] [DEBUG] - [Assigned msgId = 7425839272435108516 to MsgsAck]
[2024-10-15T10:28:57.506] [DEBUG] - [Got 2 message(s) to send]
[2024-10-15T10:28:57.506] [DEBUG] - [Encrypting 2 message(s) in 92 bytes for sending]
[2024-10-15T10:28:57.506] [DEBUG] - [Sending   PingDelayDisconnect,MsgsAck]
[2024-10-15T10:28:57.507] [DEBUG] - [Encrypted messages put in a queue to be sent]
[2024-10-15T10:28:57.507] [DEBUG] - [Waiting for messages to send... false]
[2024-10-15T10:28:57.551] [DEBUG] - [Handling pong for message 7425839272431108808]
[2024-10-15T10:28:57.551] [DEBUG] - [Receiving items from the network...]
[2024-10-15T10:29:05.355] [DEBUG] - [Send PingDelayDisconnect]
[2024-10-15T10:29:05.356] [DEBUG] - [Assigned msgId = 7425839306194846504 to PingDelayDisconnect]
[2024-10-15T10:29:05.356] [DEBUG] - [Assigned msgId = 7425839306194846508 to MsgsAck]
[2024-10-15T10:29:05.356] [DEBUG] - [Got 2 message(s) to send]
[2024-10-15T10:29:05.356] [DEBUG] - [Encrypting 2 message(s) in 140 bytes for sending]
[2024-10-15T10:29:05.356] [DEBUG] - [Sending   PingDelayDisconnect,MsgsAck]
[2024-10-15T10:29:05.357] [DEBUG] - [Encrypted messages put in a queue to be sent]
[2024-10-15T10:29:05.357] [DEBUG] - [Waiting for messages to send... false]
[2024-10-15T10:29:05.401] [DEBUG] - [Handling pong for message 7425839306194846504]
[2024-10-15T10:29:05.401] [DEBUG] - [Receiving items from the network...]
[2024-10-15T10:29:05.402] [DEBUG] - [Handling update Updates]
[2024-10-15T10:29:05.402] [DEBUG] - [Receiving items from the network...]
[2024-10-15T10:29:05.403] [DEBUG] - [Handling update Updates]
[2024-10-15T10:29:05.403] [DEBUG] - [Receiving items from the network...]
[2024-10-15T10:29:05.404] [DEBUG] - [Handling update Updates]
[2024-10-15T10:29:05.404] [DEBUG] - [Receiving items from the network...]
[2024-10-15T10:29:05.404] [DEBUG] - [Handling update Updates]
[2024-10-15T10:29:05.405] [DEBUG] - [Receiving items from the network...]
[2024-10-15T10:29:05.406] [DEBUG] - [Handling update Updates]
[2024-10-15T10:29:05.406] [DEBUG] - [Receiving items from the network...]
[2024-10-15T10:29:05.407] [DEBUG] - [Handling update Updates]
[2024-10-15T10:29:05.407] [DEBUG] - [Receiving items from the network...]
[2024-10-15T10:29:05.408] [DEBUG] - [Handling update Updates]
[2024-10-15T10:29:05.408] [DEBUG] - [Receiving items from the network...]
[2024-10-15T10:29:05.409] [DEBUG] - [Handling update Updates]
[2024-10-15T10:29:05.409] [DEBUG] - [Receiving items from the network...]
[2024-10-15T10:29:05.411] [DEBUG] - [Handling update Updates]
[2024-10-15T10:29:05.411] [DEBUG] - [Receiving items from the network...]
[2024-10-15T10:29:05.412] [DEBUG] - [Handling update Updates]
[2024-10-15T10:29:05.413] [DEBUG] - [Receiving items from the network...]
[2024-10-15T10:29:05.415] [DEBUG] - [Handling update Updates]
[2024-10-15T10:29:05.415] [DEBUG] - [Receiving items from the network...]
[2024-10-15T10:29:06.556] [DEBUG] - [Send PingDelayDisconnect]
[2024-10-15T10:29:06.556] [DEBUG] - [Assigned msgId = 7425839311289813992 to PingDelayDisconnect]
[2024-10-15T10:29:06.557] [DEBUG] - [Assigned msgId = 7425839311293813700 to MsgsAck]
[2024-10-15T10:29:06.557] [DEBUG] - [Got 2 message(s) to send]
[2024-10-15T10:29:06.557] [DEBUG] - [Encrypting 2 message(s) in 92 bytes for sending]
[2024-10-15T10:29:06.557] [DEBUG] - [Sending   PingDelayDisconnect,MsgsAck]
[2024-10-15T10:29:06.557] [DEBUG] - [Encrypted messages put in a queue to be sent]
[2024-10-15T10:29:06.558] [DEBUG] - [Waiting for messages to send... false]
[2024-10-15T10:29:06.600] [DEBUG] - [Handling pong for message 7425839311289813992]
[2024-10-15T10:29:06.600] [DEBUG] - [Receiving items from the network...]
[2024-10-15T10:29:14.415] [DEBUG] - [Send PingDelayDisconnect]
[2024-10-15T10:29:14.415] [DEBUG] - [Assigned msgId = 7425839345085552228 to PingDelayDisconnect]
[2024-10-15T10:29:14.416] [DEBUG] - [Assigned msgId = 7425839345089551940 to MsgsAck]
[2024-10-15T10:29:14.416] [DEBUG] - [Got 2 message(s) to send]
[2024-10-15T10:29:14.416] [DEBUG] - [Encrypting 2 message(s) in 180 bytes for sending]
[2024-10-15T10:29:14.416] [DEBUG] - [Sending   PingDelayDisconnect,MsgsAck]
[2024-10-15T10:29:14.417] [DEBUG] - [Encrypted messages put in a queue to be sent]
[2024-10-15T10:29:14.417] [DEBUG] - [Waiting for messages to send... false]
[2024-10-15T10:29:14.462] [DEBUG] - [Handling container]
[2024-10-15T10:29:14.463] [DEBUG] - [Handling update Updates]
[2024-10-15T10:29:14.463] [DEBUG] - [Handling update Updates]
[2024-10-15T10:29:14.463] [DEBUG] - [Receiving items from the network...]
[2024-10-15T10:29:14.464] [DEBUG] - [Handling update Updates]
[2024-10-15T10:29:14.465] [DEBUG] - [Receiving items from the network...]
[2024-10-15T10:29:14.466] [DEBUG] - [Handling update Updates]
[2024-10-15T10:29:14.466] [DEBUG] - [Receiving items from the network...]
[2024-10-15T10:29:14.468] [DEBUG] - [Handling update Updates]
[2024-10-15T10:29:14.469] [DEBUG] - [Receiving items from the network...]
[2024-10-15T10:29:14.471] [DEBUG] - [Handling update Updates]
[2024-10-15T10:29:14.472] [DEBUG] - [Receiving items from the network...]
[2024-10-15T10:29:14.474] [DEBUG] - [Handling update Updates]
[2024-10-15T10:29:14.474] [DEBUG] - [Receiving items from the network...]
[2024-10-15T10:29:14.476] [DEBUG] - [Handling update Updates]
[2024-10-15T10:29:14.476] [DEBUG] - [Receiving items from the network...]
[2024-10-15T10:29:14.477] [DEBUG] - [Handling container]
[2024-10-15T10:29:14.477] [DEBUG] - [Handling pong for message 7425839345085552228]
[2024-10-15T10:29:14.477] [DEBUG] - [Handling update UpdateShort]
[2024-10-15T10:29:14.477] [DEBUG] - [Handling update Updates]
[2024-10-15T10:29:14.477] [DEBUG] - [Receiving items from the network...]
[2024-10-15T10:29:15.611] [DEBUG] - [Send PingDelayDisconnect]
[2024-10-15T10:29:15.612] [DEBUG] - [Assigned msgId = 7425839350168519632 to PingDelayDisconnect]
[2024-10-15T10:29:15.612] [DEBUG] - [Assigned msgId = 7425839350168519636 to MsgsAck]
[2024-10-15T10:29:15.612] [DEBUG] - [Got 2 message(s) to send]
[2024-10-15T10:29:15.612] [DEBUG] - [Encrypting 2 message(s) in 92 bytes for sending]
[2024-10-15T10:29:15.612] [DEBUG] - [Sending   PingDelayDisconnect,MsgsAck]
[2024-10-15T10:29:15.613] [DEBUG] - [Encrypted messages put in a queue to be sent]
[2024-10-15T10:29:15.613] [DEBUG] - [Waiting for messages to send... false]
[2024-10-15T10:29:15.663] [DEBUG] - [Handling pong for message 7425839350168519632]
[2024-10-15T10:29:15.663] [DEBUG] - [Receiving items from the network...]
[2024-10-15T10:29:23.479] [DEBUG] - [Send PingDelayDisconnect]
[2024-10-15T10:29:23.480] [DEBUG] - [Assigned msgId = 7425839384000258124 to PingDelayDisconnect]
[2024-10-15T10:29:23.480] [DEBUG] - [Assigned msgId = 7425839384000258128 to MsgsAck]
[2024-10-15T10:29:23.480] [DEBUG] - [Got 2 message(s) to send]
[2024-10-15T10:29:23.480] [DEBUG] - [Encrypting 2 message(s) in 188 bytes for sending]
[2024-10-15T10:29:23.481] [DEBUG] - [Sending   PingDelayDisconnect,MsgsAck]
[2024-10-15T10:29:23.481] [DEBUG] - [Encrypted messages put in a queue to be sent]
[2024-10-15T10:29:23.481] [DEBUG] - [Waiting for messages to send... false]
[2024-10-15T10:29:23.524] [DEBUG] - [Handling update Updates]
[2024-10-15T10:29:23.524] [DEBUG] - [Receiving items from the network...]
[2024-10-15T10:29:23.525] [DEBUG] - [Handling update Updates]
[2024-10-15T10:29:23.525] [DEBUG] - [Receiving items from the network...]
[2024-10-15T10:29:23.526] [DEBUG] - [Handling update Updates]
[2024-10-15T10:29:23.526] [DEBUG] - [Receiving items from the network...]
[2024-10-15T10:29:23.528] [DEBUG] - [Handling update Updates]
[2024-10-15T10:29:23.528] [DEBUG] - [Receiving items from the network...]
[2024-10-15T10:29:23.530] [DEBUG] - [Handling container]
[2024-10-15T10:29:23.530] [DEBUG] - [Handling pong for message 7425839384000258124]
[2024-10-15T10:29:23.531] [DEBUG] - [Handling update Updates]
[2024-10-15T10:29:23.531] [DEBUG] - [Receiving items from the network...]
[2024-10-15T10:29:23.532] [DEBUG] - [Handling update Updates]
[2024-10-15T10:29:23.532] [DEBUG] - [Receiving items from the network...]
[2024-10-15T10:29:24.664] [DEBUG] - [Send PingDelayDisconnect]
[2024-10-15T10:29:24.664] [DEBUG] - [Assigned msgId = 7425839389031225480 to PingDelayDisconnect]
[2024-10-15T10:29:24.665] [DEBUG] - [Assigned msgId = 7425839389031225484 to MsgsAck]
[2024-10-15T10:29:24.665] [DEBUG] - [Got 2 message(s) to send]
[2024-10-15T10:29:24.665] [DEBUG] - [Encrypting 2 message(s) in 92 bytes for sending]
[2024-10-15T10:29:24.665] [DEBUG] - [Sending   PingDelayDisconnect,MsgsAck]
[2024-10-15T10:29:24.665] [DEBUG] - [Encrypted messages put in a queue to be sent]
[2024-10-15T10:29:24.666] [DEBUG] - [Waiting for messages to send... false]
[2024-10-15T10:29:24.708] [DEBUG] - [Handling pong for message 7425839389031225480]
[2024-10-15T10:29:24.708] [DEBUG] - [Receiving items from the network...]
[2024-10-15T10:29:32.539] [DEBUG] - [Send PingDelayDisconnect]
[2024-10-15T10:29:32.540] [DEBUG] - [Assigned msgId = 7425839422894963556 to PingDelayDisconnect]
[2024-10-15T10:29:32.540] [DEBUG] - [Assigned msgId = 7425839422894963560 to MsgsAck]
[2024-10-15T10:29:32.540] [DEBUG] - [Got 2 message(s) to send]
[2024-10-15T10:29:32.540] [DEBUG] - [Encrypting 2 message(s) in 148 bytes for sending]
[2024-10-15T10:29:32.541] [DEBUG] - [Sending   PingDelayDisconnect,MsgsAck]
[2024-10-15T10:29:32.541] [DEBUG] - [Encrypted messages put in a queue to be sent]
[2024-10-15T10:29:32.542] [DEBUG] - [Waiting for messages to send... false]
[2024-10-15T10:29:32.584] [DEBUG] - [Handling container]
[2024-10-15T10:29:32.584] [DEBUG] - [Handling pong for message 7425839422894963556]
[2024-10-15T10:29:32.585] [DEBUG] - [Handling update Updates]
[2024-10-15T10:29:32.585] [DEBUG] - [Receiving items from the network...]
[2024-10-15T10:29:32.589] [DEBUG] - [Handling update Updates]
[2024-10-15T10:29:32.589] [DEBUG] - [Receiving items from the network...]
[2024-10-15T10:29:33.724] [DEBUG] - [Send PingDelayDisconnect]
[2024-10-15T10:29:33.725] [DEBUG] - [Assigned msgId = 7425839427925930916 to PingDelayDisconnect]
[2024-10-15T10:29:33.725] [DEBUG] - [Assigned msgId = 7425839427929930624 to MsgsAck]
[2024-10-15T10:29:33.725] [DEBUG] - [Got 2 message(s) to send]
[2024-10-15T10:29:33.725] [DEBUG] - [Encrypting 2 message(s) in 92 bytes for sending]
[2024-10-15T10:29:33.726] [DEBUG] - [Sending   PingDelayDisconnect,MsgsAck]
[2024-10-15T10:29:33.726] [DEBUG] - [Encrypted messages put in a queue to be sent]
[2024-10-15T10:29:33.726] [DEBUG] - [Waiting for messages to send... false]
[2024-10-15T10:29:33.770] [DEBUG] - [Handling pong for message 7425839427925930916]
[2024-10-15T10:29:33.770] [DEBUG] - [Receiving items from the network...]
...
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

1 participant