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

Sending URL in message results in Node timeout #535

Open
open-sudo opened this issue Dec 25, 2024 · 2 comments
Open

Sending URL in message results in Node timeout #535

open-sudo opened this issue Dec 25, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@open-sudo
Copy link

The code is:

whatsapp.sendMessage(jid,"wa.me")

or

whatsapp.sendMessage(jid,"google.com")

This call will hang for a few minutes and then terminate with RequestException: Node timed out. I initially thought that all valid URLs will cause this timeout, but I observed that following call works fine:

whatsapp.sendMessage(jid,"foolish.com")

What I also observed is that in the timeout exception, there is a content field with an array of integers. This array is hundreds if not thousands of integers, which is odd given the simple 5 letter string i am sending.

@Auties00
Copy link
Owner

The code is:

whatsapp.sendMessage(jid,"wa.me")

or

whatsapp.sendMessage(jid,"google.com")

This call will hang for a few minutes and then terminate with RequestException: Node timed out. I initially thought that all valid URLs will cause this timeout, but I observed that following call works fine:

whatsapp.sendMessage(jid,"foolish.com")

What I also observed is that in the timeout exception, there is a content field with an array of integers. This array is hundreds if not thousands of integers, which is odd given the simple 5 letter string i am sending.

The length is normal, it’s just computing the jpeg thumbnail for the url. To fix the bug for now you can set the text preview setting to disabled, but I’ll have it fixed In the release after I finish working on leap

@Auties00 Auties00 added the bug Something isn't working label Dec 25, 2024
@open-sudo
Copy link
Author

Thanks. That works beautifully.

 Whatsapp.webBuilder().lastConnection().textPreviewSetting(TextPreviewSetting.DISABLED)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants