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

[BUG] Link Preview doesn't work properly in sendText WEBJS class with some links #302

Open
Sysoev86 opened this issue Apr 20, 2024 · 8 comments
Labels
bug Something isn't working engine:WEBJS

Comments

@Sysoev86
Copy link

Sysoev86 commented Apr 20, 2024

The problem is that when a link is contained in WEBJS sendText class, then the preview at the top of the message will not show a summary of the page. But if you send the same link again, then the page preview at the top of the text will be.

Maybe it is necessary to make some delay of sending a message, so that the preview of the page had time to load in chromium?

@allburov
Copy link
Contributor

allburov commented Apr 21, 2024

Interesting, it's likely because of redirect from the original link to
https://sauna-sosnovka.ru/?id=7216&tel=9833416932#scroll7
If you open https://sauna-sosnovka.ru/ekj - it return 302 instead of 200 and whatsapp web (chromium) has to follow it.

wget -v https://sauna-sosnovka.ru/ekj
--2024-04-21 18:38:23--  https://sauna-sosnovka.ru/ekj
Resolving sauna-sosnovka.ru (sauna-sosnovka.ru)... 212.107.255.37
Connecting to sauna-sosnovka.ru (sauna-sosnovka.ru)|212.107.255.37|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: /?id=7216&tel=9833416932#scroll7 [following]
--2024-04-21 18:38:23--  https://sauna-sosnovka.ru/?id=7216&tel=9833416932
Reusing existing connection to sauna-sosnovka.ru:443.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘ekj’

Even in official WhatsApp Web it takes time to follow all redirects and show the preview.

Works perfectly when I send static links like https://waha.devlike.pro/

Try improving the site itself following https://ogp.me/ with no redirects and we'll try handle it properly in the project side (no ETA tho for that)

patron:PRO

@allburov
Copy link
Contributor

@allburov allburov added bug Something isn't working engine:WEBJS labels Apr 21, 2024
@Sysoev86
Copy link
Author

Sysoev86 commented Apr 21, 2024

thank you !
I fixed the site and made the code 200, but the information still doesn't load in time :(

IMG_5333

The first message was sent waha WEBJS sendText
I sent the second message manually from my smartphone

wget -v https://sauna-sosnovka.ru/r7z
--2024-04-21 23:22:36--  https://sauna-sosnovka.ru/r7z
Resolving sauna-sosnovka.ru (sauna-sosnovka.ru)... 212.107.255.37
Connecting to sauna-sosnovka.ru (sauna-sosnovka.ru)|212.107.255.37|:443... connected.
HTTP request sent, awaiting response... 200 OK
<meta property="og:title" content="Внести предоплату на 25.04.24 с 11:00 по 18:00 за Грачева Юлия Алексеевна" />
<meta property="og:url" content="https://sauna-sosnovka.ru/r7z" />
<meta property="og:type" content="website" />
<meta property="og:image" content="img/logo.png" />

@devlikepro devlikepro changed the title [Feature Request] Link Preview in sendText WEBJS class [BUG] Link Preview sometime doesn't work in sendText WEBJS class Jul 5, 2024
@devlikepro devlikepro changed the title [BUG] Link Preview sometime doesn't work in sendText WEBJS class [BUG] Link Preview doesn't work properly in sendText WEBJS class with some links Jul 5, 2024
@MarkusWollny
Copy link

MarkusWollny commented Jan 9, 2025

We're seeing the same issue when posting links to a WhatsApp channel. A configurable delay between message composition and sending the message would very likely help to resolve this.

patron:PLUS

@Andi-Herzog
Copy link

We're experiencing the same issue. Specifically, thumbnails are not loading, and at times, the title and description tags are not being imported properly, similar to the OP's case.
When editing the post by removing the URL, saving the changes, and then editing again to repost the same link, the preview is generated correctly. It seems there may be a required delay between inserting the URL into the text box and sending the message.

@Andi-Herzog
Copy link

We have switched to the NOWEB engine, and link previews are now working. They are slightly different, as they no longer feature a large header image. Instead, a small thumbnail appears next to the title and description — but at least it works!

@devlikepro
Copy link
Contributor

devlikepro commented Jan 12, 2025

Hi all! Could you provide request payload with exact url? Please specify what engine you're using too 🙏
It depends a lot on the links and engine you're using, as @Andi-Herzog noticed!

patron:PRO

@devlikepro
Copy link
Contributor

devlikepro commented Jan 12, 2025

Related about amazon links and captcha #596

patron:PRO

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

No branches or pull requests

5 participants