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

连接服务失败,控制台有报错 #6

Closed
ChenMoGe2 opened this issue Sep 15, 2022 · 2 comments
Closed

连接服务失败,控制台有报错 #6

ChenMoGe2 opened this issue Sep 15, 2022 · 2 comments

Comments

@ChenMoGe2
Copy link

nodejs版本:v16.17.0
npm版本:8.15.0
运行命令:npm run dev
环境:centos 7

报错信息:

[2022-09-15T14:18:44.574Z] [ERROR] - [WebSocket connection failed attempt: 3]
MTProtoSender.js:194 TypeError: Cannot read properties of undefined (reading 'digest')
at Hash.digest (crypto.js:104:57)
at Object.sha256 (Helpers.js:215:19)
at doAuthentication (Authenticator.ts:80:52)
at async MTProtoSender._connect (MTProtoSender.js:278:25)
at async MTProtoSender.connect (MTProtoSender.js:183:17)
at async TelegramClient.connect (TelegramClient.js:198:31)
at async TelegramClient.start (TelegramClient.js:888:13)
at async init (client.ts:96:7)
at async initApi (provider.ts:42:3)
at async onmessage (worker.ts:23:7)

每次连接ws服务后都会报这个错(连接已经建立,好像是在握手时出了问题)。这个是因为nodejs的版本导致的吗?还请大神帮忙看下,谢谢!

@loyldg
Copy link
Owner

loyldg commented Sep 16, 2022

如果是环境问题的话,你可以直接克隆一个官方的版本,不进行代码修改,编译出来试一试.看一下是否会报相同的错误

@ChenMoGe2
Copy link
Author

如果是环境问题的话,你可以直接克隆一个官方的版本,不进行代码修改,编译出来试一试.看一下是否会报相同的错误

好的,谢谢。
我看了是我这边的问题,官方的是能通过的,我再找找看问题吧,谢谢。

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

2 participants