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

Do Not hava chat #19

Open
XINGYUOU opened this issue Jan 19, 2025 · 9 comments
Open

Do Not hava chat #19

XINGYUOU opened this issue Jan 19, 2025 · 9 comments

Comments

@XINGYUOU
Copy link

Image

why do not have any chat?

@jarvis2f
Copy link
Owner

Is there an error log?

@ccivm
Copy link

ccivm commented Jan 20, 2025

I encountered the same issue. Here's the relevant log:

2025-01-20 14:41:39 [2025-01-20 06:41:39] [SEVERE] Cannot invoke "telegram.files.repository.TelegramRecord.id()" because "this.telegramRecord" is null
2025-01-20 14:41:39 java.lang.NullPointerException: Cannot invoke "telegram.files.repository.TelegramRecord.id()" because "this.telegramRecord" is null
2025-01-20 14:41:39 at telegram.files.TelegramVerticle.onMessageReceived(TelegramVerticle.java:808)
2025-01-20 14:41:39 at telegram.files.TelegramUpdateHandler.onResult(TelegramUpdateHandler.java:43)
2025-01-20 14:41:39 at org.drinkless.tdlib.Client$ResponseReceiver.processResult(Client.java:190)
2025-01-20 14:41:39 at org.drinkless.tdlib.Client$ResponseReceiver.run(Client.java:172)
2025-01-20 14:41:39 at java.base/java.lang.Thread.run(Unknown Source)

jarvis2f added a commit that referenced this issue Jan 20, 2025
…after the account was logged in for the first time.(#19)
@jarvis2f
Copy link
Owner

jarvis2f commented Jan 20, 2025

I encountered the same issue. Here's the relevant log:

2025-01-20 14:41:39 [2025-01-20 06:41:39] [SEVERE] Cannot invoke "telegram.files.repository.TelegramRecord.id()" because "this.telegramRecord" is null 2025-01-20 14:41:39 java.lang.NullPointerException: Cannot invoke "telegram.files.repository.TelegramRecord.id()" because "this.telegramRecord" is null 2025-01-20 14:41:39 at telegram.files.TelegramVerticle.onMessageReceived(TelegramVerticle.java:808) 2025-01-20 14:41:39 at telegram.files.TelegramUpdateHandler.onResult(TelegramUpdateHandler.java:43) 2025-01-20 14:41:39 at org.drinkless.tdlib.Client$ResponseReceiver.processResult(Client.java:190) 2025-01-20 14:41:39 at org.drinkless.tdlib.Client$ResponseReceiver.run(Client.java:172) 2025-01-20 14:41:39 at java.base/java.lang.Thread.run(Unknown Source)

Oh, thanks! I have found the problem and fixed it in the dev branch. You can use the following two methods to solve this problem before releasing a new version:

  1. After the account is added, restart the container

  2. Use the dev version of the container: ghcr.io/jarvis2f/telegram-files:dev

@ccivm
Copy link

ccivm commented Jan 20, 2025

I encountered the same issue. Here's the relevant log:
2025-01-20 14:41:39 [2025-01-20 06:41:39] [SEVERE] Cannot invoke "telegram.files.repository.TelegramRecord.id()" because "this.telegramRecord" is null 2025-01-20 14:41:39 java.lang.NullPointerException: Cannot invoke "telegram.files.repository.TelegramRecord.id()" because "this.telegramRecord" is null 2025-01-20 14:41:39 at telegram.files.TelegramVerticle.onMessageReceived(TelegramVerticle.java:808) 2025-01-20 14:41:39 at telegram.files.TelegramUpdateHandler.onResult(TelegramUpdateHandler.java:43) 2025-01-20 14:41:39 at org.drinkless.tdlib.Client$ResponseReceiver.processResult(Client.java:190) 2025-01-20 14:41:39 at org.drinkless.tdlib.Client$ResponseReceiver.run(Client.java:172) 2025-01-20 14:41:39 at java.base/java.lang.Thread.run(Unknown Source)

Oh, thanks! I have found the problem and fixed it in the dev branch. You can use the following two methods to solve this problem before releasing a new version:

  1. After the account is added, restart the container
  2. Use the dev version of the container: ghcr.io-jarvis2f-telegram-files:dev

Hi,

I was unable to verify the issue , as I can only add accounts successfully when I’m lucky. Most of the time, I encounter the following behavior in the logs:

Image

Setting telegram.files log level to ALL
07:48:23 0|telegram-files-web | ▲ Next.js 15.0.3
07:48:23 0|telegram-files-web | - Local: http://localhost:3000
07:48:23 0|telegram-files-web | - Network: http://0.0.0.0:3000
07:48:23 0|telegram-files-web | ✓ Starting...
07:48:23 0|telegram-files-web | ✓ Ready in 295ms
[2025-01-20 07:48:23] [INFO] Database initialized
[2025-01-20 07:48:23] [INFO] API server started on port 8080
[2025-01-20 07:48:23] [INFO] Successfully deployed 0 telegram verticles
[2025-01-20 07:48:23] [INFO] Auto download verticle started!
|History scan interval: 120000 ms
|Download interval: 10000 ms
|Download limit: 5 per telegram account!
|Auto chats: 0

[2025-01-20 07:48:23] [INFO] ? Start success
[2025-01-20 07:48:42] [FINE] Upgraded to WebSocket. SessionId: 053b0a31f2ff046b5b26be4fef26e3e1
[2025-01-20 07:48:43] [FINE] WebSocket closed. SessionId: 053b0a31f2ff046b5b26be4fef26e3e1
[2025-01-20 07:48:43] [FINE] Upgraded to WebSocket. SessionId: 053b0a31f2ff046b5b26be4fef26e3e1
[2025-01-20 07:48:43] [FINE] WebSocket closed. SessionId: 053b0a31f2ff046b5b26be4fef26e3e1
[2025-01-20 07:48:43] [FINE] Upgraded to WebSocket. SessionId: 053b0a31f2ff046b5b26be4fef26e3e1
[2025-01-20 07:48:43] [FINE] WebSocket closed. SessionId: 053b0a31f2ff046b5b26be4fef26e3e1
[2025-01-20 07:48:43] [FINE] Upgraded to WebSocket. SessionId: 053b0a31f2ff046b5b26be4fef26e3e1
[2025-01-20 07:48:44] [FINE] WebSocket closed. SessionId: 053b0a31f2ff046b5b26be4fef26e3e1
[2025-01-20 07:48:44] [FINE] Upgraded to WebSocket. SessionId: 053b0a31f2ff046b5b26be4fef26e3e1
[2025-01-20 07:48:44] [FINE] WebSocket closed. SessionId: 053b0a31f2ff046b5b26be4fef26e3e1
[2025-01-20 07:49:11] [FINE] [c14856bb235a] Receive authorization state update: AuthorizationStateWaitTdlibParameters
[2025-01-20 07:49:12] [FINE] TDLib: [ 0][t 1][1737359352.208351373][Binlog.cpp:691][#1][!RunOnSchedulerWorker] Failed to rename binlog of size 128 to /app/data/account/786f55c6-2907-4a0a-b42e-c14856bb235a/td.binlog: [PosixError : No such file or directory : 2 : Stat for file "/app/data/account/786f55c6-2907-4a0a-b42e-c14856bb235a/td.binlog" failed]. Temp file size is 0, new size 0
It appears that the application is unable to rename the binlog file because the directory /app/data/account/786f55c6-2907-4a0a-b42e-c14856bb235a/ does not exist.

I have set up the environment as follows:

services:
telegram-files:
container_name: telegram-files
image: ghcr.io/jarvis2f/telegram-files:dev
restart: always
healthcheck:
test: [ "CMD", "curl", "-f", "http://127.0.0.1/api/health" ]
interval: 30s
retries: 3
timeout: 10s
start_period: 30s
environment:
LOG_LEVEL: 'ALL'
APP_ENV: "prod"
APP_ROOT: "/app/data"
TELEGRAM_API_ID: ""
TELEGRAM_API_HASH: "
"
HTTP_PROXY: "http://192.168.66.102:7890"
HTTPS_PROXY: "http://192.168.66.102:7890"
ports:
- "6543:80"
volumes:
- ./data:/app/data
Could you provide any insights on what might be causing the directory not to be created or accessed properly?

Thank you!

@jarvis2f
Copy link
Owner

I encountered the same issue. Here's the relevant log:
2025-01-20 14:41:39 [2025-01-20 06:41:39] [SEVERE] Cannot invoke "telegram.files.repository.TelegramRecord.id()" because "this.telegramRecord" is null 2025-01-20 14:41:39 java.lang.NullPointerException: Cannot invoke "telegram.files.repository.TelegramRecord.id()" because "this.telegramRecord" is null 2025-01-20 14:41:39 at telegram.files.TelegramVerticle.onMessageReceived(TelegramVerticle.java:808) 2025-01-20 14:41:39 at telegram.files.TelegramUpdateHandler.onResult(TelegramUpdateHandler.java:43) 2025-01-20 14:41:39 at org.drinkless.tdlib.Client$ResponseReceiver.processResult(Client.java:190) 2025-01-20 14:41:39 at org.drinkless.tdlib.Client$ResponseReceiver.run(Client.java:172) 2025-01-20 14:41:39 at java.base/java.lang.Thread.run(Unknown Source)

Oh, thanks! I have found the problem and fixed it in the dev branch. You can use the following two methods to solve this problem before releasing a new version:

  1. After the account is added, restart the container
  2. Use the dev version of the container: ghcr.io-jarvis2f-telegram-files:dev

Hi,

I was unable to verify the issue , as I can only add accounts successfully when I’m lucky. Most of the time, I encounter the following behavior in the logs:

Image

Setting telegram.files log level to ALL 07:48:23 0|telegram-files-web | ▲ Next.js 15.0.3 07:48:23 0|telegram-files-web | - Local: http://localhost:3000 07:48:23 0|telegram-files-web | - Network: http://0.0.0.0:3000 07:48:23 0|telegram-files-web | ✓ Starting... 07:48:23 0|telegram-files-web | ✓ Ready in 295ms [2025-01-20 07:48:23] [INFO] Database initialized [2025-01-20 07:48:23] [INFO] API server started on port 8080 [2025-01-20 07:48:23] [INFO] Successfully deployed 0 telegram verticles [2025-01-20 07:48:23] [INFO] Auto download verticle started! |History scan interval: 120000 ms |Download interval: 10000 ms |Download limit: 5 per telegram account! |Auto chats: 0

[2025-01-20 07:48:23] [INFO] ? Start success [2025-01-20 07:48:42] [FINE] Upgraded to WebSocket. SessionId: 053b0a31f2ff046b5b26be4fef26e3e1 [2025-01-20 07:48:43] [FINE] WebSocket closed. SessionId: 053b0a31f2ff046b5b26be4fef26e3e1 [2025-01-20 07:48:43] [FINE] Upgraded to WebSocket. SessionId: 053b0a31f2ff046b5b26be4fef26e3e1 [2025-01-20 07:48:43] [FINE] WebSocket closed. SessionId: 053b0a31f2ff046b5b26be4fef26e3e1 [2025-01-20 07:48:43] [FINE] Upgraded to WebSocket. SessionId: 053b0a31f2ff046b5b26be4fef26e3e1 [2025-01-20 07:48:43] [FINE] WebSocket closed. SessionId: 053b0a31f2ff046b5b26be4fef26e3e1 [2025-01-20 07:48:43] [FINE] Upgraded to WebSocket. SessionId: 053b0a31f2ff046b5b26be4fef26e3e1 [2025-01-20 07:48:44] [FINE] WebSocket closed. SessionId: 053b0a31f2ff046b5b26be4fef26e3e1 [2025-01-20 07:48:44] [FINE] Upgraded to WebSocket. SessionId: 053b0a31f2ff046b5b26be4fef26e3e1 [2025-01-20 07:48:44] [FINE] WebSocket closed. SessionId: 053b0a31f2ff046b5b26be4fef26e3e1 [2025-01-20 07:49:11] [FINE] [c14856bb235a] Receive authorization state update: AuthorizationStateWaitTdlibParameters [2025-01-20 07:49:12] [FINE] TDLib: [ 0][t 1][1737359352.208351373][Binlog.cpp:691][#1][!RunOnSchedulerWorker] Failed to rename binlog of size 128 to /app/data/account/786f55c6-2907-4a0a-b42e-c14856bb235a/td.binlog: [PosixError : No such file or directory : 2 : Stat for file "/app/data/account/786f55c6-2907-4a0a-b42e-c14856bb235a/td.binlog" failed]. Temp file size is 0, new size 0 It appears that the application is unable to rename the binlog file because the directory /app/data/account/786f55c6-2907-4a0a-b42e-c14856bb235a/ does not exist.

I have set up the environment as follows:

services: telegram-files: container_name: telegram-files image: ghcr.io/jarvis2f/telegram-files:dev restart: always healthcheck: test: [ "CMD", "curl", "-f", "http://127.0.0.1/api/health" ] interval: 30s retries: 3 timeout: 10s start_period: 30s environment: LOG_LEVEL: 'ALL' APP_ENV: "prod" APP_ROOT: "/app/data" TELEGRAM_API_ID: "" TELEGRAM_API_HASH: "" HTTP_PROXY: "http://192.168.66.102:7890" HTTPS_PROXY: "http://192.168.66.102:7890" ports: - "6543:80" volumes: - ./data:/app/data Could you provide any insights on what might be causing the directory not to be created or accessed properly?

Thank you!

Can you paste the actual error returned by the browser interface?

The error in the log below seems to be that tdlib initialization failed because the path does not exist.

Does the path /app/data/account/786f55c6-2907-4a0a-b42e-c14856bb235a exist?

@ccivm
Copy link

ccivm commented Jan 20, 2025

This is a new attempt, and it seems that the file mentioned in the error at the path is actually present. However, I am still encountering the issue.
Image

Image

telegram-files | Setting telegram.files log level to ALL
telegram-files | 08:25:17 0|telegram-files-web | ▲ Next.js 15.0.3
telegram-files | 08:25:17 0|telegram-files-web | - Local: http://localhost:3000
telegram-files | 08:25:17 0|telegram-files-web | - Network: http://0.0.0.0:3000
telegram-files | 08:25:17 0|telegram-files-web | ✓ Starting...
telegram-files | 08:25:17 0|telegram-files-web | ✓ Ready in 356ms
telegram-files | [2025-01-20 08:25:18] [INFO] Database initialized
telegram-files | [2025-01-20 08:25:18] [INFO] API server started on port 8080
telegram-files | [2025-01-20 08:25:18] [INFO] Successfully deployed 0 telegram verticles
telegram-files | [2025-01-20 08:25:18] [INFO] Auto download verticle started!
telegram-files | |History scan interval: 120000 ms
telegram-files | |Download interval: 10000 ms
telegram-files | |Download limit: 5 per telegram account!
telegram-files | |Auto chats: 0
telegram-files |
telegram-files | [2025-01-20 08:25:18] [INFO] ? Start success
telegram-files | [2025-01-20 08:25:25] [FINE] Upgraded to WebSocket. SessionId: 009d0ff8b20c309fb848d5cea6dc808b
telegram-files | [2025-01-20 08:25:29] [FINE] [30e1a549c482] Receive authorization state update: AuthorizationStateWaitTdlibParameters {
telegram-files | }
telegram-files |
telegram-files | [2025-01-20 08:25:30] [FINE] TDLib: [ 0][t 1][1737361530.048036575][Binlog.cpp:691][#1][!RunOnSchedulerWorker] Failed to rename binlog of size 128 to /app/data/account/3ebeb855-bf4b-4d57-aaa7-30e1a549c482/td.binlog: [PosixError : No such file or directory : 2 : Stat for file "/app/data/account/3ebeb855-bf4b-4d57-aaa7-30e1a549c482/td.binlog" failed]. Temp file size is 0, new size 0
telegram-files |

@jarvis2f
Copy link
Owner

This is a new attempt, and it seems that the file mentioned in the error at the path is actually present. However, I am still encountering the issue. Image

Image

telegram-files | Setting telegram.files log level to ALL telegram-files | 08:25:17 0|telegram-files-web | ▲ Next.js 15.0.3 telegram-files | 08:25:17 0|telegram-files-web | - Local: http://localhost:3000 telegram-files | 08:25:17 0|telegram-files-web | - Network: http://0.0.0.0:3000 telegram-files | 08:25:17 0|telegram-files-web | ✓ Starting... telegram-files | 08:25:17 0|telegram-files-web | ✓ Ready in 356ms telegram-files | [2025-01-20 08:25:18] [INFO] Database initialized telegram-files | [2025-01-20 08:25:18] [INFO] API server started on port 8080 telegram-files | [2025-01-20 08:25:18] [INFO] Successfully deployed 0 telegram verticles telegram-files | [2025-01-20 08:25:18] [INFO] Auto download verticle started! telegram-files | |History scan interval: 120000 ms telegram-files | |Download interval: 10000 ms telegram-files | |Download limit: 5 per telegram account! telegram-files | |Auto chats: 0 telegram-files | telegram-files | [2025-01-20 08:25:18] [INFO] ? Start success telegram-files | [2025-01-20 08:25:25] [FINE] Upgraded to WebSocket. SessionId: 009d0ff8b20c309fb848d5cea6dc808b telegram-files | [2025-01-20 08:25:29] [FINE] [30e1a549c482] Receive authorization state update: AuthorizationStateWaitTdlibParameters { telegram-files | } telegram-files | telegram-files | [2025-01-20 08:25:30] [FINE] TDLib: [ 0][t 1][1737361530.048036575][Binlog.cpp:691][#1][!RunOnSchedulerWorker] Failed to rename binlog of size 128 to /app/data/account/3ebeb855-bf4b-4d57-aaa7-30e1a549c482/td.binlog: [PosixError : No such file or directory : 2 : Stat for file "/app/data/account/3ebeb855-bf4b-4d57-aaa7-30e1a549c482/td.binlog" failed]. Temp file size is 0, new size 0 telegram-files |

Have you tried refreshing the page and then clicking the active button to add it?

It seems that you added the HTTP_PROXY parameter to the container, which may not work. The correct way is to use the proxy function in the application.

@ccivm
Copy link

ccivm commented Jan 20, 2025

这是一次新的尝试,看起来错误中提到的文件在路径上确实存在。但是,我仍然遇到这个问题。Image
Image
telegram-files | 将 telegram.files 日志级别设置为所有 telegram-files | 08:25:17 0|telegram-files-web | ▲ Next.js 15.0.3 telegram-files | 08:25:17 0|telegram-files-web | - 本地:http://localhost:3000 telegram-files | 08:25:17 0|telegram-files-web | - 网络:http://0.0.0.0: 3000 telegram-files | 08:25:17 0|telegram-files-web | ✓ 正在启动... telegram-files | 08:25:17 0|telegram-files-web | ✓ 356ms 后准备就绪 telegram-files | [2025-01-20 08:25:18] [INFO] 数据库已初始化 telegram-files | [2025-01-20 08:25:18] [INFO] API 服务器在端口 8080 上启动 telegram-files | [2025-01-20 08:25:18] [INFO] 成功部署 0 个电报 verticles telegram-files | [2025-01-20 08:25:18] [INFO] 自动下载 verticle 已启动! telegram-files | |历史扫描间隔:120000 毫秒 telegram-files | |下载间隔:10000 毫秒 telegram-files | |下载限制:每个电报帐户 5 次! telegram-files | |自动聊天:0 telegram-files | telegram-files | [2025-01-20 08:25:18] [INFO] ? 启动成功 telegram-files | [2025-01-20 08:25:25] [FINE] 升级到 WebSocket。SessionId:009d0ff8b20c309fb848d5cea6dc808b telegram-files | [2025-01-20 08:25:29] [FINE] [30e1a549c482] 接收授权状态更新:AuthorizationStateWaitTdlibParameters { telegram-files | } telegram-files | telegram-files | [2025-01-20 08:25:30] [FINE] TDLib:[ 0] [t 1] [1737361530.048036575] [Binlog.cpp:691] [ #1 ] [!RunOnSchedulerWorker] 无法将大小为 128 的 binlog 重命名为 /app/data/account/3ebeb855-bf4b-4d57-aaa7-30e1a549c482/td.binlog:[PosixError:没有此文件或目录:2:文件“/app/data/account/3ebeb855-bf4b-4d57-aaa7-30e1a549c482/td.binlog”的统计失败]。临时文件大小为 0,新大小为 0 电报文件 |

您是否尝试过刷新页面然后单击active按钮添加它?

看来你是HTTP_PROXY在容器中添加了参数,可能不行,正确的做法是使用应用程序中的代理功能。

I redeployed the setup on CentOS, and strangely, the issue related to td.binlog no longer occurred. At the same time, I removed the proxy configuration from the Compose file and added the proxy settings through the web interface. However, after entering the phone number, I am not receiving any response.

I’m really puzzled about how I managed to successfully add an account earlier. It seems quite unclear to me at this point.i😵

Image

Thank you!

@jarvis2f
Copy link
Owner

@ccivm There may be something wrong with your network. Please confirm that you used the correct proxy when adding an account, and the proxy can access telegram.

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

3 participants