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

发送大小为29.9MB的文件报错 'Received message larger than max (41907119 vs. 4194304) #2686

Open
RemSynch opened this issue May 3, 2024 · 9 comments

Comments

@RemSynch
Copy link

RemSynch commented May 3, 2024

发送文件的代码为:
file = FileBox.from_file(data)
发送的文件是一个flac的音频文件,大小为29.9MB。
报错日志:
Wechaty - ERROR - internal error <(<Status.RESOURCE_EXHAUSTED: 8>, 'Received message larger than max (43183569 vs. 4194304)', None)>

经查是因为grpc默认消息体大小是4M,大于4M则会抛出该异常
但是我没有找到应该如何修改wechaty的客户端与服务端的grpc参数。

Copy link

dosubot bot commented May 3, 2024

To address the 'Received message larger than max' error due to the gRPC message size limit when sending large files with Wechaty, you'll need to modify the gRPC parameters for both the client and server sides. Specifically, you should adjust the maxReceiveMessageLength and maxSendMessageLength options to accommodate larger files.

This adjustment involves modifying the underlying implementation of the classes responsible for initializing the gRPC server and client within the Wechaty framework. Look for where the PuppetServer and IoClient classes initialize the gRPC server and client, respectively, and include the necessary configuration options for message size limits there.

Keep in mind that increasing the gRPC message size limit can impact the performance and memory usage of your application. Consider these factors carefully and explore alternative methods for handling large files, such as chunking or streaming the file data, which might be more efficient and less resource-intensive.

Unfortunately, without direct access to the Wechaty repository's specific implementation details for these classes, I can't provide a step-by-step guide. You may need to consult the documentation or source code of the wechaty-puppet-service package or related packages for more detailed instructions on configuring these gRPC options.

Details

Sources


About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

To continue the conversation, mention @dosu.

@huan
Copy link
Member

huan commented May 5, 2024

@RemSynch I think you are running into wechaty/puppet-service#86

Please provide more related information after you learn from that Issue so that our community will have more information for future improvements.

Also, you are welcome to join the Discord if you have not: https://discord.gg/7q8NBZbQzt

@aqpmzngldh
Copy link

@RemSynch I think you are running into wechaty/puppet-service#86

Please provide more related information after you learn from that Issue so that our community will have more information for future improvements.

Also, you are welcome to join the Discord if you have not: https://discord.gg/7q8NBZbQzt

请教一个问题,就是本地运行正常,当我部署到服务器上,登录后手机端这边微信就下线了,提示为了你的账号安全,请重新登录,这是怎么回事呢

@RemSynch
Copy link
Author

RemSynch commented May 8, 2024

@RemSynch I think you are running into wechaty/puppet-service#86
Please provide more related information after you learn from that Issue so that our community will have more information for future improvements.
Also, you are welcome to join the Discord if you have not: https://discord.gg/7q8NBZbQzt

请教一个问题,就是本地运行正常,当我部署到服务器上,登录后手机端这边微信就下线了,提示为了你的账号安全,请重新登录,这是怎么回事呢

你用的是哪种puppet呢?我是用的UOS绕过网页端检测登录的那种wechaty-puppet-wechat,刚刚重新登录了一遍没有发现这种情况,也是服务器。重磅:使用UOS微信桌面版协议登录,wechaty免费版web协议重放荣光
如果是用padtoken的我没试过。

@aqpmzngldh
Copy link

@RemSynch I think you are running into wechaty/puppet-service#86
Please provide more related information after you learn from that Issue so that our community will have more information for future improvements.
Also, you are welcome to join the Discord if you have not: https://discord.gg/7q8NBZbQzt

请教一个问题,就是本地运行正常,当我部署到服务器上,登录后手机端这边微信就下线了,提示为了你的账号安全,请重新登录,这是怎么回事呢

你用的是哪种puppet呢?我是用的UOS绕过网页端检测登录的那种wechaty-puppet-wechat,刚刚重新登录了一遍没有发现这种情况,也是服务器。重磅:使用UOS微信桌面版协议登录,wechaty免费版web协议重放荣光 如果是用padtoken的我没试过。

我用的是这种https://github.com/wechaty/puppet-padlocal你用过这个吗

@aqpmzngldh
Copy link

@RemSynch I think you are running into wechaty/puppet-service#86
Please provide more related information after you learn from that Issue so that our community will have more information for future improvements.
Also, you are welcome to join the Discord if you have not: https://discord.gg/7q8NBZbQzt

请教一个问题,就是本地运行正常,当我部署到服务器上,登录后手机端这边微信就下线了,提示为了你的账号安全,请重新登录,这是怎么回事呢

你用的是哪种puppet呢?我是用的UOS绕过网页端检测登录的那种wechaty-puppet-wechat,刚刚重新登录了一遍没有发现这种情况,也是服务器。重磅:使用UOS微信桌面版协议登录,wechaty免费版web协议重放荣光 如果是用padtoken的我没试过。

我的情况还比较复杂,有一个刚开始也报错,后来不知道怎么的就成功了,后来我尝试添加多个的时候还是报错,你能帮我看看我的项目部署在你那块吗

@aqpmzngldh
Copy link

@RemSynch I think you are running into wechaty/puppet-service#86
Please provide more related information after you learn from that Issue so that our community will have more information for future improvements.
Also, you are welcome to join the Discord if you have not: https://discord.gg/7q8NBZbQzt

请教一个问题,就是本地运行正常,当我部署到服务器上,登录后手机端这边微信就下线了,提示为了你的账号安全,请重新登录,这是怎么回事呢

你用的是哪种puppet呢?我是用的UOS绕过网页端检测登录的那种wechaty-puppet-wechat,刚刚重新登录了一遍没有发现这种情况,也是服务器。重磅:使用UOS微信桌面版协议登录,wechaty免费版web协议重放荣光 如果是用padtoken的我没试过。

我用的是这种https://github.com/wechaty/puppet-padlocal你用过这个吗

这种不支持语音发送,所以我换了,我刚开始也用的那个,那个确实可以,但是支持的功能不是很多

@RemSynch
Copy link
Author

RemSynch commented May 9, 2024

@RemSynch I think you are running into wechaty/puppet-service#86
Please provide more related information after you learn from that Issue so that our community will have more information for future improvements.
Also, you are welcome to join the Discord if you have not: https://discord.gg/7q8NBZbQzt

请教一个问题,就是本地运行正常,当我部署到服务器上,登录后手机端这边微信就下线了,提示为了你的账号安全,请重新登录,这是怎么回事呢

你用的是哪种puppet呢?我是用的UOS绕过网页端检测登录的那种wechaty-puppet-wechat,刚刚重新登录了一遍没有发现这种情况,也是服务器。重磅:使用UOS微信桌面版协议登录,wechaty免费版web协议重放荣光 如果是用padtoken的我没试过。

我用的是这种https://github.com/wechaty/puppet-padlocal你用过这个吗

这种不支持语音发送,所以我换了,我刚开始也用的那个,那个确实可以,但是支持的功能不是很多

padlocal我看要钱我就没去试了,不过这种是平板协议理论上来说也不会退出手机端吧?还是说你的服务器离你太远了微信认为你在搞鬼不让你登(虽然我还不知道第三方提供的token会不会这样,因为你说你本地可以)你今天成功了吗?没有的话我明天试试

@aqpmzngldh
Copy link

@RemSynch I think you are running into wechaty/puppet-service#86
Please provide more related information after you learn from that Issue so that our community will have more information for future improvements.
Also, you are welcome to join the Discord if you have not: https://discord.gg/7q8NBZbQzt

请教一个问题,就是本地运行正常,当我部署到服务器上,登录后手机端这边微信就下线了,提示为了你的账号安全,请重新登录,这是怎么回事呢

你用的是哪种puppet呢?我是用的UOS绕过网页端检测登录的那种wechaty-puppet-wechat,刚刚重新登录了一遍没有发现这种情况,也是服务器。重磅:使用UOS微信桌面版协议登录,wechaty免费版web协议重放荣光 如果是用padtoken的我没试过。

我用的是这种https://github.com/wechaty/puppet-padlocal你用过这个吗

这种不支持语音发送,所以我换了,我刚开始也用的那个,那个确实可以,但是支持的功能不是很多

padlocal我看要钱我就没去试了,不过这种是平板协议理论上来说也不会退出手机端吧?还是说你的服务器离你太远了微信认为你在搞鬼不让你登(虽然我还不知道第三方提供的token会不会这样,因为你说你本地可以)你今天成功了吗?没有的话我明天试试

我今天成功了,是我配置有问题

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