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

WhatsApp/0 returns content (preview generated) as expected while Whatsapp/2 doesn't #174

Open
paulincai opened this issue Mar 20, 2019 · 3 comments

Comments

@paulincai
Copy link

paulincai commented Mar 20, 2019

I use the latest versions of node and server Prerenders.

WhatsApp/0, as I see it in the logs is for the mobile App and WhatsApp/2 is for both Web and OSX App (possibly Windows App too)

Will just link my comment into another Issue:
From the server log:

54.170.31.203 - - [20/Mar/2019:22:07:41 +0000] "GET /https://www.activitree.com/activities/culture/archaeological_site HTTP/1.1" 200 36042 "-" "WhatsApp/0.3.2386 N"                                
54.170.31.203 - - [20/Mar/2019:22:08:02 +0000] "GET /https://www.activitree.com/activities/culture/archaeological_site HTTP/1.1" 200 36042 "-" "WhatsApp/2.19.31 i"   

#168 (comment)

@thoop
Copy link
Contributor

thoop commented Mar 28, 2019

That is unexpected since the prerender-node middleware checks for WhatsApp as a substring of the incoming user agent (both lowercased before compared) So I would expect both of those requests to return a prerendered page.

I'm not able to reproduce this in local testing either. Using both of those user agents seem to return a prerendered page for me when testing a website of mine with prerender-node installed.

So when you use WhatsApp/2 is it just returning your javascript page?

@paulincai
Copy link
Author

Hi @thoop, I would assume the prerendered page is returned cause I can see the response on the Prerender server console when I share a link on my mobile (tried both and Android phone and Iphone):

NGINX:

54.155.24.245 - - [30/Mar/2019:16:28:31 +0000] "GET /https://www.activitree.com/ HTTP/1.1" 200 41179 "-"                                                          
"WhatsApp/2.19.34 A"   

Prerender:

2019-03-30T16:28:31.613Z got 200 in 13ms for https://www.activitree.com/ 

This is similar to the responses when I share from Whatsapp on my MAC, the only difference is that MAC Whatsapp and browser Whatsapp show the preview. You can experience that with this link https://www.activitree.com and I can confirm in advance that the Prerender server will have similar responses (all my routes are Prerendered already.)

@thoop
Copy link
Contributor

thoop commented Apr 1, 2019

Hmm, could it be possible that WhatsApp on mobile had a previously cached version of your page from before you installed Prerender? Otherwise, that seems like it's working as expected but WhatsApp just isn't showing the info properly.

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