-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Production Deployment not work on android browser #785
Comments
Try including the babel polyfill:
And then at the top of
|
It's curious that the old version didn't have this problem... if you can confirm whether the above works or doesn't we can dig into it further accordingly. |
@davezuko I am seeing the same issue with IE 10 and IE 11. I forked your repo here: https://github.com/gschwa/react-redux-starter-kit and added a Dockerfile so I could deploy the production files. What is very annoying and frustrating is when running as "development" to debug the issue the site works! As you can imagine this is critical for my current project so any thoughts would be great. I can add a Docker readme if you need help getting it going. |
@davezuko even easier to recreate issue:
To see how it works when running in "development":
|
@gschwa I will try this next time I get access to IE. Does the same issue occur in Chrome/FF? |
@davezuko I tested it in Chrome/FF/Safari with no issues. You can DL a free VM from Microsoft here: https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/mac/ |
Thanks @gschwa, will use that. I'm currently traveling so just don't have the ability to do much actual work. Are you getting the same exact error as the OP? |
The error I am getting is: Uncaught Error: Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings. And when I run in development I get no errors and the site works beautifully. Did that answer your question? I can provide any details you require plus I will continue to try solve on my end. I really hate IE. |
@gschwa one other thing you can try until I can get around to this is to disable UglifyJS. If the error stops occurring then we know for sure it's a result of the minification process (I had to debug something like this the other day, only reason I bring it up). |
@davezuko that was my thought as well and I disabled all the production webpack plugins but I still get the same error. Of course, now it is easier to see the code and the stack trace:
Line 6821 is:
Seems very odd. |
@gschwa last thought: try taking out Though, if I am right, I have no idea why it's not a compile time error. If I'm wrong then things make a little more sense, but I have less of an idea as to what to pursue next. |
That was it!! What was the purpose of including that? |
@davezuko the code you reply didn't work. It's still the same error. |
@creatorkuang You tried removing these lines: https://github.com/davezuko/react-redux-starter-kit/blob/master/build/webpack.config.js#L129-L133 and it didn't work? |
@gschwa that plugin performs production optimizations such as extracting static elements, removing propTypes (they are ignored by React in production but their existence still takes up needless bytes) and a few other things. So whatever it's doing to the code is somehow breaking it in certain environments. If you're feeling up to the challenge you could try to reproduce the issue in a minimal example and forward it to its repo's issues. I'll have to consider now whether or not we keep it and accept the risks. |
@gschwa It works when i remove these lines. Thanks for point out the problem :) |
@davezuko @gschwa I found the problem it's related to Symbol. You could check |
@creatorkuang And were you able to keep react-optimize or no? |
@gschwa I keep react-optimize. You could check my push |
@davezuko adding the babel-polyfill fixed the issue while keeping the react-promise preset |
@gschwa and @creatorkuang I will add babel-polyfill as a default dependency in the vendor bundle tomorrow. |
This is still broken in master. I see babel-polyfill was added but it wasn't added to compiler_vendor config as suggested by @creatorkuang in his code snippet. If I don't add it to compiler_config, it doesn't work in IE11. Also great find @creatorkuang, it saved me yesterday! Oh the time developers across the world waste testing IE... |
@davezuko |
I just folk the code and use
npm run deploy:prod
and then runNODE_ENV='production' npm run start
, when i try to test it with android browser,it just show me blank page and i got this error in console:Uncaught Error: Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.
Chrome Mobile did not has this error .
Any idea of how to solve this ?
I test it with default browser with Galaxy Note3.
The older version (2.0.0-alpha.4) did not have this problem.
The text was updated successfully, but these errors were encountered: