Create-react-app: Android: Browser compatibility problems

Created on 28 Feb 2018  路  6Comments  路  Source: facebook/create-react-app

Hello everyone,

I'm having problems with create-react-app on Android Browser 4 (Jelly Bean). I realized that 40% of the mobile traffic was not able to checkout in my application in production (In Brazil old devices are common).

My first attempt was to create a new project and run it using Genymotion to ensure that the problem wasn't in my implementation.
image
The result was the same of my application.

node v8.9.4
npm 5.6.0
[email protected]
Android 4.3 (Genymotion Virtualbox)
Android Browser 4 on Android (Jelly Bean)

I have seen applications that work on this device like http://trustcore.io/login. I've been looking so far for a solution but I didn't found any workaround.

Appreciate any suggestion or idea. Thanks! 馃槃

question

Most helpful comment

SOLUTION

Adding <script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script> in public/index.js it works.

Thanks for your time @viankakrisna! 馃槃

All 6 comments

you might be interested in this https://stackoverflow.com/questions/21627328/genymotion-how-to-debug-with-chrome-dev-tools to see what exactly the error is

@viankakrisna Thanks for your reply. Actually I'm using weinre to test my application. I'm sorry for the lack of information.

  1. I started by running the weinre server and adding the code bellow in public/index.html.
<script src="http://192.168.1.111:8888/target/target-script-min.js#anonymous"></script>
  1. Started testing if it works inserting a console.log(this); in the render function of src/App.js.

It is works on Android 5.1
image

It isn't rendering anything at all on Android 4.3
image

  1. I Check if Javascript was enabled
    image

@juanpinheiro have you tried the chrome devtool to debug it?

@viankakrisna Yes, I did. Unfortunately it is not compatible with Android 4.3.

image
image

SOLUTION

Adding <script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script> in public/index.js it works.

Thanks for your time @viankakrisna! 馃槃

Thanks @juanpinheiro for the solution! I was using create-react-app for a little test project and when browsing using my old android phone I was seeing a blank page. Now after applying the polyfill it just works!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

stopachka picture stopachka  路  3Comments

Aranir picture Aranir  路  3Comments

JimmyLv picture JimmyLv  路  3Comments

alleroux picture alleroux  路  3Comments

rdamian3 picture rdamian3  路  3Comments