Reactivesearch: Sites created with Reactivesearch have rendering issues on mobile

Created on 16 Jan 2018  路  11Comments  路  Source: appbaseio/reactivesearch

Issue Type:

Possible Bug

Description:

Sites created with Reactivesearch have rendering issues when testing with https://search.google.com/test/mobile-friendly. It shows a blank screen.

Screenshots:

screen shot 2018-01-16 at 6 25 32 am

Minimal reproduction of the problem with instructions:

Go to https://search.google.com/test/mobile-friendly.

Reactivesearch version: x.y.z

2.0.0

bug

Most helpful comment

Looked into debugging this and came across this site:

https://blog.codaxy.com/debugging-googlebot-crawl-errors-for-javascript-applications-5d9134c06ee7

I added the code to my app and here's the stack trace:

Stack: TypeError: undefined is not a function at new betterWs at new AppbaseClient at new ReactiveBase at constructClassInstance at updateClassComponent at beginWork at performUnitofWork at workLoop at HTMLUnknownElement.calllCallback (+20 lines more)

All 11 comments

IMO this could be an issue with transpilation. We're targeting only latest 2 versions of browsers. @metagrover anyway we can test this hypothesis?

UPDATE: On mobile, site renders as blank using Firefox focus but works fine on Chrome browser. It works fine on both using a different mobile phone.

Tried a different config on demo site. However it doesn't solves the issue. Commit ref

Googlebot also has trouble crawling reactivesearch websites, when using Fetch as Google through the webmaster tools (same result using both Desktop and Mobile render):

selection_078

The issue is with the polyfill being absent. Google bot uses an older version of Chrome to render pages. Adding the following polyfill fixes the issue:

<script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>

screen shot 2018-01-18 at 2 48 30 pm

We should add polyfill in

  • [ ] website
  • [ ] demo apps

I added to the bottom of my index.html for my demo site (www.thepricebot.net) and it still won't render when using the Mobile Friendly tool or the Fetch as Google tool. I cloned gitxplore-app and added it to index.html and still the same, won't render.

@metagrover can we verify if this works on a demo app?

Looked into debugging this and came across this site:

https://blog.codaxy.com/debugging-googlebot-crawl-errors-for-javascript-applications-5d9134c06ee7

I added the code to my app and here's the stack trace:

Stack: TypeError: undefined is not a function at new betterWs at new AppbaseClient at new ReactiveBase at constructClassInstance at updateClassComponent at beginWork at performUnitofWork at workLoop at HTMLUnknownElement.calllCallback (+20 lines more)

Thanks @Guazi, that was incredibly helpful. The problem was with the web-socket connection handshake, which I've fixed and tested with the booksearch app here:

screen shot 2018-01-22 at 10 54 42 am

:tada: FUN FACT: I'm not using any polyfill script here, works perfectly without it.

Probably because of babel polyfill?

Yes, and that's why we should not remove babel-polyfill from appbase-js

Fixed in 2.2.0 馃帀

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jkhaui picture jkhaui  路  3Comments

mihalo picture mihalo  路  4Comments

tiagogm picture tiagogm  路  3Comments

willopez picture willopez  路  3Comments

felubra picture felubra  路  3Comments